cloudstack_client 0.7.1 → 0.8.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2e6572f2978a68ebcb38a986ac7488dc6ba8e59c
4
- data.tar.gz: dd0d4dc3bc194ca89b6a40b664f3c3d404c5e72a
3
+ metadata.gz: 171bc985ca8b4d679cd61c18e2eb801f72b329d2
4
+ data.tar.gz: 278d768791e1374a3811f1fa5f312b310e984ac7
5
5
  SHA512:
6
- metadata.gz: 3464332207e5b38f71113a0f733580125a4bf59c39a9a237e50a61b16ebdd9f7bc0d14015b7656a3e98bb4c5cb97d7cc2bafd4d014f10a5b1f1a3c6bd0eedfe6
7
- data.tar.gz: 9189e7543dd3e651783c0cac743cb2e673e6ee2edb9f8d6474198fa9e5b68c7658809c4f6583008829b00a6688d10538bf36c6700a069a882499d8946d901a3d
6
+ metadata.gz: 7b94a587d9b4ff1a57bf6a8821312e720f702db85dfecea2fadd25041d9f9e79767bc48af63bd391213cf7e191e5597548662a63b3fbff0fa78a339ddb438450
7
+ data.tar.gz: b3ba8d97417319f749390706fee563dc3d8719f6d3e4cbbfe25badbe60ada487f43e21314fa699afd111fda4d3bcccc1feecde5cace56dd04cfa35b85e6f1051
@@ -0,0 +1,43 @@
1
+ module CloudstackClient
2
+
3
+ module ResourceLimit
4
+
5
+ ##
6
+ # List resource limits.
7
+
8
+ def list_resource_limits(args = {})
9
+ params = {
10
+ 'command' => 'listResourceLimits',
11
+ }
12
+
13
+ if args[:account]
14
+ account = list_accounts({name: args[:account]}).first
15
+ unless account
16
+ puts "Error: Account #{args[:account]} not found."
17
+ exit 1
18
+ end
19
+ params['domainid'] = account["domainid"]
20
+ params['account'] = args[:account]
21
+ end
22
+
23
+ if args[:project]
24
+ project = get_project(args[:project])
25
+ if !project
26
+ msg = "Project '#{args[:project]}' is invalid"
27
+ puts "Error: #{msg}"
28
+ exit 1
29
+ end
30
+ params['projectid'] = project['id']
31
+ elsif args[:project_id]
32
+ params['projectid'] = args[:project_id]
33
+ end
34
+
35
+ params['type'] = args[:type] if args[:type]
36
+
37
+ json = send_request(params)
38
+ json['resourcelimit'] || []
39
+ end
40
+
41
+ end
42
+
43
+ end
@@ -1,3 +1,3 @@
1
1
  module CloudstackClient
2
- VERSION = "0.7.1"
2
+ VERSION = "0.8.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.7.1
4
+ version: 0.8.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-09-19 00:00:00.000000000 Z
11
+ date: 2015-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
@@ -76,6 +76,7 @@ files:
76
76
  - lib/cloudstack_client/commands/port_forwarding_rule.rb
77
77
  - lib/cloudstack_client/commands/project.rb
78
78
  - lib/cloudstack_client/commands/region.rb
79
+ - lib/cloudstack_client/commands/resource_limit.rb
79
80
  - lib/cloudstack_client/commands/router.rb
80
81
  - lib/cloudstack_client/commands/server.rb
81
82
  - lib/cloudstack_client/commands/service_offering.rb
@@ -111,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
112
  version: '0'
112
113
  requirements: []
113
114
  rubyforge_project:
114
- rubygems_version: 2.0.3
115
+ rubygems_version: 2.2.2
115
116
  signing_key:
116
117
  specification_version: 4
117
118
  summary: CloudStack API client written in Ruby