cloudstack_client 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dec70317784dcbbde93d5f8b66b22b0e93229f48
|
4
|
+
data.tar.gz: 3d53de49fd5d9ca92edf12082f6d1f89dc274cb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c5d69c56cf83e03576eafccc1bcca0484b58398033ac1a25933a348819c6c196a908067d8d8c97b4e2e506b0f76ac931bd27d53cc79ba6af995d4ef57c0c230
|
7
|
+
data.tar.gz: 8e35e1d89ad61a8a2dd827c71a778894d94c48ebd066e60d0010eb3609b20ad3ac7266350ba91baf7a3e468dc54f0ade57c5fafc753e5d4e88cfe515df925537
|
@@ -14,7 +14,7 @@ module CloudstackClient
|
|
14
14
|
params['projectid'] = args[:project_id] if args[:project_id]
|
15
15
|
|
16
16
|
if args[:account]
|
17
|
-
if account = list_accounts(
|
17
|
+
if account = list_accounts(name: args[:account]).first
|
18
18
|
params['domainid'] = account["domainid"]
|
19
19
|
params['account'] = args[:account]
|
20
20
|
end
|
@@ -96,28 +96,28 @@ module CloudstackClient
|
|
96
96
|
##
|
97
97
|
# Lists servers.
|
98
98
|
|
99
|
-
def list_servers(
|
99
|
+
def list_servers(args = {})
|
100
100
|
params = {
|
101
101
|
'command' => 'listVirtualMachines',
|
102
102
|
'listAll' => true
|
103
103
|
}
|
104
|
-
params['projectid'] =
|
105
|
-
params['state'] =
|
106
|
-
params['groupid'] =
|
104
|
+
params['projectid'] = args[:project_id] if args[:project_id]
|
105
|
+
params['state'] = args[:status] if args[:status]
|
106
|
+
params['groupid'] = args[:group_id] if args[:group_id]
|
107
107
|
|
108
|
-
if
|
109
|
-
zone = get_zone(
|
108
|
+
if args[:zone]
|
109
|
+
zone = get_zone(args[:zone])
|
110
110
|
unless zone
|
111
|
-
puts "Error: Zone #{
|
111
|
+
puts "Error: Zone #{args[:zone]} not found"
|
112
112
|
exit 1
|
113
113
|
end
|
114
114
|
params['zoneid'] = zone['id']
|
115
115
|
end
|
116
116
|
|
117
|
-
if
|
118
|
-
if account = list_accounts(
|
117
|
+
if args[:account]
|
118
|
+
if account = list_accounts(name: args[:account]).first
|
119
119
|
params['domainid'] = account["domainid"]
|
120
|
-
params['account'] =
|
120
|
+
params['account'] = args[:account]
|
121
121
|
end
|
122
122
|
end
|
123
123
|
|
@@ -14,7 +14,7 @@ module CloudstackClient
|
|
14
14
|
params['listall'] = true if args[:listall]
|
15
15
|
|
16
16
|
if args[:account]
|
17
|
-
account = list_accounts(
|
17
|
+
account = list_accounts(name: args[:account]).first
|
18
18
|
unless account
|
19
19
|
puts "Error: Account #{args[:account]} not found."
|
20
20
|
exit 1
|
@@ -5,12 +5,33 @@ module CloudstackClient
|
|
5
5
|
##
|
6
6
|
# Lists all volumes.
|
7
7
|
|
8
|
-
def list_volumes(
|
8
|
+
def list_volumes(args = {})
|
9
9
|
params = {
|
10
10
|
'command' => 'listVolumes',
|
11
11
|
'listall' => true,
|
12
12
|
}
|
13
|
-
|
13
|
+
|
14
|
+
if args[:zone]
|
15
|
+
zone = get_zone(args[:zone])
|
16
|
+
unless zone
|
17
|
+
puts "Error: Zone #{args[:zone]} not found"
|
18
|
+
exit 1
|
19
|
+
end
|
20
|
+
params['zoneid'] = zone['id']
|
21
|
+
end
|
22
|
+
|
23
|
+
if args[:account]
|
24
|
+
if account = list_accounts(name: args[:account]).first
|
25
|
+
params['domainid'] = account["domainid"]
|
26
|
+
params['account'] = args[:account]
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
params['projectid'] = args[:project_id] if args[:project_id]
|
31
|
+
params['type'] = args[:type] if args[:type]
|
32
|
+
params['keyword'] = args[:keyword] if args[:keyword]
|
33
|
+
params['name'] = args[:name] if args[:name]
|
34
|
+
|
14
35
|
json = send_request(params)
|
15
36
|
json['volume'] || []
|
16
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudstack_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nik Wolfgramm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|