cloudstack_client 0.2.15 → 0.2.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cloudstack_client/commands/server.rb +7 -10
- data/lib/cloudstack_client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a54023e0e305d388823c7303ffe6c803c2a59bc
|
4
|
+
data.tar.gz: ed2dded3f88230f3bbc02b408cf19cf8ab1e30ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d49a959f95b0494611ab4acccc30789b0983bcc8da2b16ce835b050db28bbeae581c91818dca0e7a78ffb74329a9725a2d7d305fbbf69ca5afa1b42db976c27
|
7
|
+
data.tar.gz: 2f95d6a9754c727f2834ed4c246ff82912ad2ea0b21e68bb92be37f5cda07a756ffe45a555a34056bd1aba96f5fdc2937321ffc824dbf1cc91a057b55b59973c
|
@@ -236,7 +236,7 @@ module CloudstackClient
|
|
236
236
|
# Stops the server with the specified name.
|
237
237
|
#
|
238
238
|
|
239
|
-
def stop_server(name, forced=nil, project_id=nil)
|
239
|
+
def stop_server(name, forced=nil, project_id=nil, async=true)
|
240
240
|
server = get_server(name, project_id)
|
241
241
|
if !server || !server['id']
|
242
242
|
puts "Error: Virtual machine '#{name}' does not exist"
|
@@ -249,15 +249,14 @@ module CloudstackClient
|
|
249
249
|
}
|
250
250
|
params['forced'] = true if forced
|
251
251
|
|
252
|
-
|
253
|
-
json['virtualmachine']
|
252
|
+
async ? send_async_request(params)['virtualmachine'] : send_request(params)
|
254
253
|
end
|
255
254
|
|
256
255
|
##
|
257
256
|
# Start the server with the specified name.
|
258
257
|
#
|
259
258
|
|
260
|
-
def start_server(name, project_id=nil)
|
259
|
+
def start_server(name, project_id=nil, async=true)
|
261
260
|
server = get_server(name, project_id)
|
262
261
|
if !server || !server['id']
|
263
262
|
puts "Error: Virtual machine '#{name}' does not exist"
|
@@ -269,15 +268,14 @@ module CloudstackClient
|
|
269
268
|
'id' => server['id']
|
270
269
|
}
|
271
270
|
|
272
|
-
|
273
|
-
json['virtualmachine']
|
271
|
+
async ? send_async_request(params)['virtualmachine'] : send_request(params)
|
274
272
|
end
|
275
273
|
|
276
274
|
##
|
277
275
|
# Reboot the server with the specified name.
|
278
276
|
#
|
279
277
|
|
280
|
-
def reboot_server(name, project_id=nil)
|
278
|
+
def reboot_server(name, project_id=nil, async=true)
|
281
279
|
server = get_server(name, project_id)
|
282
280
|
if !server || !server['id']
|
283
281
|
puts "Error: Virtual machine '#{name}' does not exist"
|
@@ -289,8 +287,7 @@ module CloudstackClient
|
|
289
287
|
'id' => server['id']
|
290
288
|
}
|
291
289
|
|
292
|
-
|
293
|
-
json['virtualmachine']
|
290
|
+
async ? send_async_request(params)['virtualmachine'] : send_request(params)
|
294
291
|
end
|
295
292
|
|
296
293
|
##
|
@@ -302,7 +299,7 @@ module CloudstackClient
|
|
302
299
|
'command' => 'destroyVirtualMachine',
|
303
300
|
'id' => id
|
304
301
|
}
|
305
|
-
|
302
|
+
|
306
303
|
async ? send_async_request(params)['virtualmachine'] : send_request(params)
|
307
304
|
end
|
308
305
|
|