cloudstack_client 0.4.2 → 0.4.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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/cloudstack_client/commands/server.rb +37 -13
- 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: ffd63beb8ab67704569e056c8179fa7038ae5794
|
4
|
+
data.tar.gz: 26304d025eb85cce68304fec2cb4aa129fd89d94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 629ca9e1c0e1625020da16904cbef4fd922ac2e2acd08aff9daa9373e994524e156ed6b0e6ca1001db4cbb0771fd93b367daa00159c283ebe3b4dce18044025b
|
7
|
+
data.tar.gz: ec077e92e135282048b52432c865346bd0d4c97b38342d4c914602488d217db11c7f5ea6529beb993ef8f51dd2a699e417b202cf81dffb440d2c7035332f2598
|
data/README.md
CHANGED
@@ -11,8 +11,6 @@ module CloudstackClient
|
|
11
11
|
'listAll' => true,
|
12
12
|
'name' => name
|
13
13
|
}
|
14
|
-
params['projectid'] = args[:project_id] if args[:project_id]
|
15
|
-
|
16
14
|
|
17
15
|
params['domainid'] = args[:domain_id] if args[:domain_id]
|
18
16
|
if args[:account]
|
@@ -25,6 +23,18 @@ module CloudstackClient
|
|
25
23
|
params['account'] = args[:account]
|
26
24
|
end
|
27
25
|
|
26
|
+
if args[:project]
|
27
|
+
project = get_project(args[:project])
|
28
|
+
if !project
|
29
|
+
msg = "Project '#{args[:project]}' is invalid"
|
30
|
+
puts "Error: #{msg}"
|
31
|
+
exit 1
|
32
|
+
end
|
33
|
+
params['projectid'] = project['id']
|
34
|
+
elsif args[:project_id]
|
35
|
+
params['projectid'] = args[:project_id]
|
36
|
+
end
|
37
|
+
|
28
38
|
json = send_request(params)
|
29
39
|
machines = json['virtualmachine']
|
30
40
|
|
@@ -106,7 +116,7 @@ module CloudstackClient
|
|
106
116
|
'command' => 'listVirtualMachines',
|
107
117
|
'listAll' => true
|
108
118
|
}
|
109
|
-
params['
|
119
|
+
params['state'] = args[:state] if args[:state]
|
110
120
|
params['state'] = args[:status] if args[:status]
|
111
121
|
params['groupid'] = args[:group_id] if args[:group_id]
|
112
122
|
|
@@ -129,6 +139,18 @@ module CloudstackClient
|
|
129
139
|
params['account'] = args[:account]
|
130
140
|
end
|
131
141
|
|
142
|
+
if args[:project]
|
143
|
+
project = get_project(args[:project])
|
144
|
+
if !project
|
145
|
+
msg = "Project '#{args[:project]}' is invalid"
|
146
|
+
puts "Error: #{msg}"
|
147
|
+
exit 1
|
148
|
+
end
|
149
|
+
params['projectid'] = project['id']
|
150
|
+
elsif args[:project_id]
|
151
|
+
params['projectid'] = args[:project_id]
|
152
|
+
end
|
153
|
+
|
132
154
|
json = send_request(params)
|
133
155
|
json['virtualmachine'] || []
|
134
156
|
end
|
@@ -191,15 +213,6 @@ module CloudstackClient
|
|
191
213
|
exit 1
|
192
214
|
end
|
193
215
|
|
194
|
-
if args[:project]
|
195
|
-
project = get_project(args[:project])
|
196
|
-
if !project
|
197
|
-
msg = "Project '#{args[:project]}' is invalid"
|
198
|
-
puts "Error: #{msg}"
|
199
|
-
exit 1
|
200
|
-
end
|
201
|
-
end
|
202
|
-
|
203
216
|
networks = []
|
204
217
|
if args[:networks]
|
205
218
|
args[:networks].each do |name|
|
@@ -230,7 +243,6 @@ module CloudstackClient
|
|
230
243
|
'networkids' => network_ids.join(',')
|
231
244
|
}
|
232
245
|
params['name'] = args[:name] if args[:name]
|
233
|
-
params['projectid'] = project['id'] if project
|
234
246
|
params['diskofferingid'] = disk_offering['id'] if disk_offering
|
235
247
|
params['hypervisor'] = (args[:hypervisor] || 'vmware') if iso
|
236
248
|
params['keypair'] = args[:keypair] if args[:keypair]
|
@@ -248,6 +260,18 @@ module CloudstackClient
|
|
248
260
|
params['account'] = args[:account]
|
249
261
|
end
|
250
262
|
|
263
|
+
if args[:project]
|
264
|
+
project = get_project(args[:project])
|
265
|
+
if !project
|
266
|
+
msg = "Project '#{args[:project]}' is invalid"
|
267
|
+
puts "Error: #{msg}"
|
268
|
+
exit 1
|
269
|
+
end
|
270
|
+
params['projectid'] = project['id']
|
271
|
+
elsif args[:project_id]
|
272
|
+
params['projectid'] = args[:project_id]
|
273
|
+
end
|
274
|
+
|
251
275
|
args[:sync] ? send_request(params) : send_async_request(params)['virtualmachine']
|
252
276
|
end
|
253
277
|
|