cloudstack-cli 0.5.1 → 0.5.2
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 +4 -4
- data/Gemfile.lock +3 -3
- data/cloudstack-cli.gemspec +1 -1
- data/lib/cloudstack-cli/commands/router.rb +4 -4
- data/lib/cloudstack-cli/commands/server.rb +6 -3
- data/lib/cloudstack-cli/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24a87620cddd407c902b4bc7ed058d420b05170c
|
4
|
+
data.tar.gz: 88b2c0a0f5bb44712e7b42830da763758b5110c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3815b16fcaf9d305794b962bb3f7ad14894f632283d165f1292c77477d593c427bc1bc099aeee36fea82eec1ecd2d6f2d7b0eee14b9648789c7773cff2e44326
|
7
|
+
data.tar.gz: edca004a13f99293864617cc40c252fb189d0f438a082b1adeaf4b302db670b44ecd477298fdee0e26757a609f4425017a5b8b677a6391970eb38e716d39357e
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cloudstack-cli (0.5.
|
5
|
-
cloudstack_client (~> 0.3.
|
4
|
+
cloudstack-cli (0.5.2)
|
5
|
+
cloudstack_client (~> 0.3.4)
|
6
6
|
thor (~> 0.18.1)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
cloudstack_client (0.3.
|
11
|
+
cloudstack_client (0.3.4)
|
12
12
|
json (1.8.1)
|
13
13
|
rake (10.0.4)
|
14
14
|
rdoc (4.0.1)
|
data/cloudstack-cli.gemspec
CHANGED
@@ -75,7 +75,7 @@ class Router < CloudstackCli::Base
|
|
75
75
|
def stop(*names)
|
76
76
|
routers = names.map {|name| get_router(name)}
|
77
77
|
print_routers(routers)
|
78
|
-
exit unless options[:force] || yes?("\nStop router(s) above?", :magenta)
|
78
|
+
exit unless options[:force] || yes?("\nStop router(s) above? [y/N]:", :magenta)
|
79
79
|
jobs = routers.map do |router|
|
80
80
|
{id: client.stop_router(router['id'], async: false)['jobid'], name: "Stop router #{router['name']}"}
|
81
81
|
end
|
@@ -88,7 +88,7 @@ class Router < CloudstackCli::Base
|
|
88
88
|
def start(*names)
|
89
89
|
routers = names.map {|name| get_router(name)}
|
90
90
|
print_routers(routers)
|
91
|
-
exit unless options[:force] || yes?("\nStart router(s) above?", :magenta)
|
91
|
+
exit unless options[:force] || yes?("\nStart router(s) above? [y/N]:", :magenta)
|
92
92
|
jobs = routers.map do |router|
|
93
93
|
{id: client.start_router(router['id'], async: false)['jobid'], name: "Start router #{router['name']}"}
|
94
94
|
end
|
@@ -101,7 +101,7 @@ class Router < CloudstackCli::Base
|
|
101
101
|
def restart(*names)
|
102
102
|
routers = names.map {|name| get_router(name)}
|
103
103
|
print_routers(routers)
|
104
|
-
exit unless options[:force] || yes?("\nRestart router(s) above?", :magenta)
|
104
|
+
exit unless options[:force] || yes?("\nRestart router(s) above? [y/N]:", :magenta)
|
105
105
|
jobs = routers.map do |router|
|
106
106
|
{id: client.stop_router(router['id'], async: false)['jobid'], name: "Stop router #{router['name']}"}
|
107
107
|
end
|
@@ -122,7 +122,7 @@ class Router < CloudstackCli::Base
|
|
122
122
|
def destroy(*names)
|
123
123
|
routers = names.map {|name| get_router(name)}
|
124
124
|
print_routers(routers)
|
125
|
-
exit unless options[:force] || yes?("\nDestroy router(s) above?", :magenta)
|
125
|
+
exit unless options[:force] || yes?("\nDestroy router(s) above? [y/N]:", :magenta)
|
126
126
|
jobs = routers.map do |router|
|
127
127
|
{id: client.destroy_router(router['id'], async: false)['jobid'], name: "Destroy router #{router['name']}"}
|
128
128
|
end
|
@@ -5,9 +5,11 @@ class Server < CloudstackCli::Base
|
|
5
5
|
option :account
|
6
6
|
option :zone
|
7
7
|
option :command, desc: "command to execute for each server: START, STOP or RESTART"
|
8
|
+
option :status
|
9
|
+
option :listall
|
8
10
|
def list
|
9
11
|
if options[:project]
|
10
|
-
if options[:project].downcase
|
12
|
+
if %w(all -1).include? options[:project].downcase
|
11
13
|
options[:project_id] = -1
|
12
14
|
project_id = -1
|
13
15
|
else
|
@@ -20,7 +22,7 @@ class Server < CloudstackCli::Base
|
|
20
22
|
if servers.size < 1
|
21
23
|
puts "No servers found."
|
22
24
|
else
|
23
|
-
table = [["Name", "
|
25
|
+
table = [["Name", "Status", "Offering", "Zone", project_id ? "Project" : "Account", "IP's"]]
|
24
26
|
servers.each do |server|
|
25
27
|
table << [
|
26
28
|
server['name'],
|
@@ -32,9 +34,10 @@ class Server < CloudstackCli::Base
|
|
32
34
|
]
|
33
35
|
end
|
34
36
|
print_table table
|
37
|
+
say "Total number of servers: #{servers.count}"
|
35
38
|
|
36
39
|
if options[:command]
|
37
|
-
args = { project_id: project_id,
|
40
|
+
args = { project_id: project_id, sync: true, account: options[:account] }
|
38
41
|
case options[:command].downcase
|
39
42
|
when "start"
|
40
43
|
exit unless yes?("\nStart the server(s) above? [y/N]:", :magenta)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudstack-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nik Wolfgramm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdoc
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.3.
|
61
|
+
version: 0.3.4
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.3.
|
68
|
+
version: 0.3.4
|
69
69
|
description: cloudstack-cli is a CloudStack API client written in Ruby.
|
70
70
|
email:
|
71
71
|
- nik.wolfgramm@gmail.com
|