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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20779611c9bf0415cd3b21dd3c66d26f3420f81e
4
- data.tar.gz: 0c8028ee8e322b7e091acaaf4ed8dbe32e4b6bb4
3
+ metadata.gz: 8b80296895c3fb887c60c50cd7cea9d642104ced
4
+ data.tar.gz: 14969d2e36838ca3959046afc206b1874a5f4625
5
5
  SHA512:
6
- metadata.gz: fa661e5349b428162a9553516e940328dd19f1006e97c2dabd87e1689a422840833680e4ec21a745819ce9957e251d5723c054ecbe6e37750aca40b1264286fa
7
- data.tar.gz: a76e3df97e98cd7042a55572013fa2380bc329f237266404a9095f6232eb3c7f3c39b7c26d15faac8a4d0a2920d1658550f233292635449480a8de42d7e01d11
6
+ metadata.gz: 69ab51febdae2d4f0a807189682971b112e08dbdf880334702a852ce597de07ce4d22b2bff626e8c6f6bf213916a97ff0233722452e4eb64557127c32e0cd264
7
+ data.tar.gz: d73c4074b2ebef102f6913333674caa470d508635109bf53d716976b93b600eea88494222504e81207dc8bc90d2733fb1eedd846a57f17031f1faa9e7ebd011e
data/.gitignore CHANGED
@@ -1,3 +1,5 @@
1
1
  Gemfile.lock
2
2
  .bundle/*
3
- .bundle
3
+ .bundle
4
+ pkg/*
5
+ pkg
data/README.md CHANGED
@@ -8,7 +8,9 @@ A CloudStack API client written in Ruby.
8
8
 
9
9
  Install the cloudstack_client gem:
10
10
 
11
- $ gem install cloudstack_client
11
+ ```bash
12
+ $ gem install cloudstack_client
13
+ ```
12
14
 
13
15
  ## Usage
14
16
 
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -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
@@ -1,3 +1,3 @@
1
1
  module CloudstackClient
2
- VERSION = "0.4.4"
2
+ VERSION = "0.5.0"
3
3
  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.4
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-02-19 00:00:00.000000000 Z
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