cloudstack_client 0.4.4 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/README.md +3 -1
- data/Rakefile +2 -0
- data/lib/cloudstack_client/commands/configuration.rb +42 -0
- data/lib/cloudstack_client/commands/iso.rb +12 -0
- data/lib/cloudstack_client/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b80296895c3fb887c60c50cd7cea9d642104ced
|
4
|
+
data.tar.gz: 14969d2e36838ca3959046afc206b1874a5f4625
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69ab51febdae2d4f0a807189682971b112e08dbdf880334702a852ce597de07ce4d22b2bff626e8c6f6bf213916a97ff0233722452e4eb64557127c32e0cd264
|
7
|
+
data.tar.gz: d73c4074b2ebef102f6913333674caa470d508635109bf53d716976b93b600eea88494222504e81207dc8bc90d2733fb1eedd846a57f17031f1faa9e7ebd011e
|
data/.gitignore
CHANGED
data/README.md
CHANGED
data/Rakefile
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
module CloudstackClient
|
2
|
+
|
3
|
+
module Configuration
|
4
|
+
|
5
|
+
##
|
6
|
+
# List configuration.
|
7
|
+
|
8
|
+
def list_configurations(args = {})
|
9
|
+
params = {
|
10
|
+
'command' => 'listConfigurations',
|
11
|
+
}
|
12
|
+
|
13
|
+
if args[:zone]
|
14
|
+
zone = get_zone(args[:zone])
|
15
|
+
unless zone
|
16
|
+
puts "Error: Zone #{args[:zone]} not found"
|
17
|
+
exit 1
|
18
|
+
end
|
19
|
+
params['zoneid'] = zone['id']
|
20
|
+
end
|
21
|
+
|
22
|
+
if args[:account]
|
23
|
+
account = list_accounts({name: args[:account]}).first
|
24
|
+
unless account
|
25
|
+
puts "Error: Account #{args[:account]} not found."
|
26
|
+
exit 1
|
27
|
+
end
|
28
|
+
params['domainid'] = account["domainid"]
|
29
|
+
params['account'] = args[:account]
|
30
|
+
end
|
31
|
+
|
32
|
+
params['name'] = args[:name] if args[:name]
|
33
|
+
params['keyword'] = args[:keyword] if args[:keyword]
|
34
|
+
params['category'] = args[:category] if args[:category]
|
35
|
+
|
36
|
+
json = send_request(params)
|
37
|
+
json['configuration'] || []
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
@@ -59,6 +59,18 @@ module CloudstackClient
|
|
59
59
|
nil
|
60
60
|
end
|
61
61
|
|
62
|
+
##
|
63
|
+
# Detaches any ISO file (if any) currently attached to a virtual machine.
|
64
|
+
|
65
|
+
def detach_iso(vm_id, args = {})
|
66
|
+
params = {
|
67
|
+
'command' => 'detachIso',
|
68
|
+
'virtualmachineid' => vm_id
|
69
|
+
}
|
70
|
+
json = send_request(params)
|
71
|
+
args[:sync] ? send_request(params) : send_async_request(params)['virtualmachine']
|
72
|
+
end
|
73
|
+
|
62
74
|
end
|
63
75
|
|
64
76
|
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.
|
4
|
+
version: 0.5.0
|
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-
|
11
|
+
date: 2014-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|
@@ -55,6 +55,7 @@ files:
|
|
55
55
|
- Gemfile
|
56
56
|
- LICENSE.txt
|
57
57
|
- README.md
|
58
|
+
- Rakefile
|
58
59
|
- cloudstack_client.gemspec
|
59
60
|
- lib/cloudstack_client.rb
|
60
61
|
- lib/cloudstack_client/client.rb
|
@@ -62,6 +63,7 @@ files:
|
|
62
63
|
- lib/cloudstack_client/commands/affinity_group.rb
|
63
64
|
- lib/cloudstack_client/commands/capacity.rb
|
64
65
|
- lib/cloudstack_client/commands/cluster.rb
|
66
|
+
- lib/cloudstack_client/commands/configuration.rb
|
65
67
|
- lib/cloudstack_client/commands/disk_offering.rb
|
66
68
|
- lib/cloudstack_client/commands/domain.rb
|
67
69
|
- lib/cloudstack_client/commands/host.rb
|