cloudstack_client 0.7.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cloudstack_client/commands/resource_limit.rb +43 -0
- data/lib/cloudstack_client/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 171bc985ca8b4d679cd61c18e2eb801f72b329d2
|
4
|
+
data.tar.gz: 278d768791e1374a3811f1fa5f312b310e984ac7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.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:
|
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.
|
115
|
+
rubygems_version: 2.2.2
|
115
116
|
signing_key:
|
116
117
|
specification_version: 4
|
117
118
|
summary: CloudStack API client written in Ruby
|