cloudstack-cli 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/cloudstack-cli.gemspec +1 -1
- data/lib/cloudstack-cli/cli.rb +4 -1
- data/lib/cloudstack-cli/commands/affinity_group.rb +27 -0
- data/lib/cloudstack-cli/commands/storage_pool.rb +7 -1
- data/lib/cloudstack-cli/version.rb +1 -1
- metadata +20 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d936c9ce9b6b98ebfad8f153383bf1fe5bea27ff
|
4
|
+
data.tar.gz: dfd0d79bfb8a58d2610ff7d3e3a6e3a6bec89c04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c0affd7753cca382d7eb9585e625b5e5be392687c0ee5a1a52a4a3713671f75bb458aad892c3eb74e20a3ec9d38cbb689e86ed63b3e5b088d752dae8e98b711
|
7
|
+
data.tar.gz: b8a2ea5f26106af1367c8fbc4f5e088aadb121a55cbbaac11ea6e857b822577dbc83f793413540b8cfb86d460db565d733ae6bf648ed0a8f4d9854641bb7c7e1
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
GIT
|
2
2
|
remote: git@github.com:niwo/cloudstack_client.git
|
3
|
-
revision:
|
3
|
+
revision: 8ad913e604d701c566061feee464b0556c5b3889
|
4
4
|
branch: master
|
5
5
|
specs:
|
6
|
-
cloudstack_client (0.4.
|
6
|
+
cloudstack_client (0.4.1)
|
7
7
|
|
8
8
|
PATH
|
9
9
|
remote: .
|
data/cloudstack-cli.gemspec
CHANGED
data/lib/cloudstack-cli/cli.rb
CHANGED
@@ -128,6 +128,9 @@ module CloudstackCli
|
|
128
128
|
subcommand :storage_pool, StoragePool
|
129
129
|
|
130
130
|
desc "region SUBCOMMAND ...ARGS", "Manage regions"
|
131
|
-
subcommand :region, Region
|
131
|
+
subcommand :region, Region
|
132
|
+
|
133
|
+
desc "affinity_group SUBCOMMAND ...ARGS", "Manage affinity_groups"
|
134
|
+
subcommand :affinity_group, AffinityGroup
|
132
135
|
end
|
133
136
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
class AffinityGroup < CloudstackCli::Base
|
2
|
+
|
3
|
+
desc 'list', 'list affinity groups'
|
4
|
+
option :account
|
5
|
+
option :name
|
6
|
+
option :type
|
7
|
+
option :listall
|
8
|
+
option :keyword
|
9
|
+
def list
|
10
|
+
affinity_groups = client.list_affinity_groups(options)
|
11
|
+
if affinity_groups.size < 1
|
12
|
+
say "No affinity groups found."
|
13
|
+
else
|
14
|
+
table = [%w(Domain Account Name, Description, VMs)]
|
15
|
+
affinity_groups.each do |group|
|
16
|
+
table << [
|
17
|
+
group['domain'], group['account'],
|
18
|
+
group['name'], group['description'],
|
19
|
+
group['virtualmachineIds'] ? group['virtualmachineIds'].size : nil
|
20
|
+
]
|
21
|
+
end
|
22
|
+
print_table table
|
23
|
+
say "Total number of affinity groups: #{affinity_groups.size}"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -10,10 +10,16 @@ class StoragePool < CloudstackCli::Base
|
|
10
10
|
say "No storage pools found."
|
11
11
|
else
|
12
12
|
table = [%w(Name Pod_Name State Zone)]
|
13
|
+
table[0] << "Size [GB]"
|
14
|
+
table[0] << "Used [GB]"
|
15
|
+
table[0] << "Used [%]"
|
13
16
|
storage_pools.each do |storage_pool|
|
17
|
+
total = storage_pool['disksizetotal'] / 1024**3
|
18
|
+
used = (storage_pool['disksizeused'] / 1024**3) rescue 0
|
14
19
|
table << [
|
15
20
|
storage_pool['name'], storage_pool['podname'],
|
16
|
-
storage_pool['state'], storage_pool['zonename']
|
21
|
+
storage_pool['state'], storage_pool['zonename'],
|
22
|
+
total, used, (100.0 / total * used).round(0)
|
17
23
|
]
|
18
24
|
end
|
19
25
|
print_table table
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudstack-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nik Wolfgramm
|
@@ -14,64 +14,64 @@ dependencies:
|
|
14
14
|
name: rdoc
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '4.1'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.1'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: thor
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0.18'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.18'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: cloudstack_client
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0.4'
|
62
|
-
- -
|
62
|
+
- - ">="
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: 0.4.
|
64
|
+
version: 0.4.1
|
65
65
|
type: :runtime
|
66
66
|
prerelease: false
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
|
-
- - ~>
|
69
|
+
- - "~>"
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '0.4'
|
72
|
-
- -
|
72
|
+
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 0.4.
|
74
|
+
version: 0.4.1
|
75
75
|
description: cloudstack-cli is a CloudStack API client written in Ruby.
|
76
76
|
email:
|
77
77
|
- nik.wolfgramm@gmail.com
|
@@ -80,7 +80,7 @@ executables:
|
|
80
80
|
extensions: []
|
81
81
|
extra_rdoc_files: []
|
82
82
|
files:
|
83
|
-
- .gitignore
|
83
|
+
- ".gitignore"
|
84
84
|
- Gemfile
|
85
85
|
- Gemfile.lock
|
86
86
|
- LICENSE.txt
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- lib/cloudstack-cli/base.rb
|
92
92
|
- lib/cloudstack-cli/cli.rb
|
93
93
|
- lib/cloudstack-cli/commands/account.rb
|
94
|
+
- lib/cloudstack-cli/commands/affinity_group.rb
|
94
95
|
- lib/cloudstack-cli/commands/capacity.rb
|
95
96
|
- lib/cloudstack-cli/commands/cluster.rb
|
96
97
|
- lib/cloudstack-cli/commands/compute_offer.rb
|
@@ -127,23 +128,23 @@ licenses:
|
|
127
128
|
metadata: {}
|
128
129
|
post_install_message:
|
129
130
|
rdoc_options:
|
130
|
-
- --line-numbers
|
131
|
-
- --inline-source
|
131
|
+
- "--line-numbers"
|
132
|
+
- "--inline-source"
|
132
133
|
require_paths:
|
133
134
|
- lib
|
134
135
|
required_ruby_version: !ruby/object:Gem::Requirement
|
135
136
|
requirements:
|
136
|
-
- -
|
137
|
+
- - ">="
|
137
138
|
- !ruby/object:Gem::Version
|
138
139
|
version: 1.9.3
|
139
140
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
141
|
requirements:
|
141
|
-
- -
|
142
|
+
- - ">="
|
142
143
|
- !ruby/object:Gem::Version
|
143
144
|
version: '0'
|
144
145
|
requirements: []
|
145
146
|
rubyforge_project:
|
146
|
-
rubygems_version: 2.0
|
147
|
+
rubygems_version: 2.2.0
|
147
148
|
signing_key:
|
148
149
|
specification_version: 4
|
149
150
|
summary: cloudstack-cli CloudStack API client
|