ns-fog 1.22.2 → 1.22.3

Sign up to get free protection for your applications and to get access to all the features.
data/fog.gemspec CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
6
6
  ## If your rubyforge_project name is different, then edit it and comment out
7
7
  ## the sub! line in the Rakefile
8
8
  s.name = 'ns-fog'
9
- s.version = '1.22.2'
9
+ s.version = '1.22.3'
10
10
  s.date = '2014-05-29'
11
11
  s.rubyforge_project = 'fog'
12
12
 
@@ -5,6 +5,14 @@ module Fog
5
5
  extend Fog::Provider
6
6
  service(:compute, 'Compute')
7
7
 
8
+ def self.wait_timeout
9
+ @wait_timeout || Fog.timeout
10
+ end
11
+
12
+ def self.wait_timeout=(timeout)
13
+ @wait_timeout = timeout
14
+ end
15
+
8
16
  def self.indexed_param(key, values)
9
17
  params = {}
10
18
  unless key.include?('%d')
@@ -32,8 +32,7 @@ module Fog
32
32
 
33
33
  def wait_for(&block)
34
34
  wait_policy = lambda { |retries| retries < 8 ? 9 - retries : 1 }
35
- timeout = 80
36
- super(timeout, wait_policy, &block)
35
+ super(Fog::QingCloud.wait_timeout, wait_policy, &block)
37
36
  end
38
37
  end
39
38
  end
@@ -5,7 +5,7 @@ module Fog
5
5
  module Compute
6
6
  class QingCloud
7
7
 
8
- class Server < Fog::QingCloud::Model
8
+ class Server < Fog::Compute::Server
9
9
  extend Fog::Deprecation
10
10
  identity :id, :aliases => 'instance_id'
11
11
 
@@ -196,6 +196,19 @@ module Fog
196
196
  nics.map{|x| x.private_ip}
197
197
  end
198
198
 
199
+ def wait_for(&block)
200
+ wait_policy = lambda { |retries| retries < 8 ? 9 - retries : 1 }
201
+ super(Fog::QingCloud.wait_timeout, wait_policy, &block)
202
+ end
203
+
204
+ def modify_attributes(name, description)
205
+ requires :id
206
+ raise Fog::QingCloud::Errors::CommonClientError, "name or description must be specified" unless name || description
207
+ service.modify_resource_attributes(id, 'instance', name, description)
208
+ merge_attributes('instance_name' => name, 'description' => description)
209
+ true
210
+ end
211
+
199
212
  end
200
213
 
201
214
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ns-fog
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.22.2
4
+ version: 1.22.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: