cloudstack-cli 0.3.9 → 0.3.10
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.
- data/Gemfile.lock +2 -2
- data/lib/cloudstack-cli/cli.rb +15 -0
- data/lib/cloudstack-cli/commands/router.rb +1 -1
- data/lib/cloudstack-cli/version.rb +1 -1
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/lib/cloudstack-cli/cli.rb
CHANGED
|
@@ -56,6 +56,21 @@ module CloudstackCli
|
|
|
56
56
|
config = old_config.merge(config)
|
|
57
57
|
end
|
|
58
58
|
File.open(file, 'w+') {|f| f.write(config.to_yaml) }
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
desc "environments", "list cloudstack-cli environments"
|
|
62
|
+
def environments(file = options[:config])
|
|
63
|
+
config = {}
|
|
64
|
+
if File.exists? file
|
|
65
|
+
begin
|
|
66
|
+
config = YAML::load(IO.read(file))
|
|
67
|
+
rescue
|
|
68
|
+
error "Can't load configuration from file #{config_file}."
|
|
69
|
+
exit 1
|
|
70
|
+
end
|
|
71
|
+
say "cloudstack-cli environments besides the default:", :yellow
|
|
72
|
+
config.each_key {|key| puts key unless key.class == Symbol }
|
|
73
|
+
end
|
|
59
74
|
end
|
|
60
75
|
|
|
61
76
|
desc "command COMMAND [arg1=val1 arg2=val2...]", "run a custom api command"
|
|
@@ -151,7 +151,7 @@ class Router < CloudstackCli::Base
|
|
|
151
151
|
router["account"],
|
|
152
152
|
router["project"],
|
|
153
153
|
router["redundantstate"],
|
|
154
|
-
router["nic"].first ? router["nic"].first['ipaddress'] : "",
|
|
154
|
+
router["nic"] && router["nic"].first ? router["nic"].first['ipaddress'] : "",
|
|
155
155
|
router["linklocalip"],
|
|
156
156
|
router["state"],
|
|
157
157
|
router["isredundantrouter"],
|
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.3.
|
|
4
|
+
version: 0.3.10
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-10-
|
|
12
|
+
date: 2013-10-30 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rdoc
|