ns-fog 1.22.2 → 1.22.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/fog.gemspec +1 -1
- data/lib/fog/qingcloud/core.rb +8 -0
- data/lib/fog/qingcloud/model.rb +1 -2
- data/lib/fog/qingcloud/models/compute/server.rb +14 -1
- metadata +1 -1
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.
|
9
|
+
s.version = '1.22.3'
|
10
10
|
s.date = '2014-05-29'
|
11
11
|
s.rubyforge_project = 'fog'
|
12
12
|
|
data/lib/fog/qingcloud/core.rb
CHANGED
@@ -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')
|
data/lib/fog/qingcloud/model.rb
CHANGED
@@ -5,7 +5,7 @@ module Fog
|
|
5
5
|
module Compute
|
6
6
|
class QingCloud
|
7
7
|
|
8
|
-
class Server < Fog::
|
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
|