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 CHANGED
@@ -1,13 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cloudstack-cli (0.3.8)
4
+ cloudstack-cli (0.3.9)
5
5
  thor (~> 0.18.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- json (1.8.0)
10
+ json (1.8.1)
11
11
  rake (10.0.4)
12
12
  rdoc (4.0.1)
13
13
  json (~> 1.4)
@@ -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"],
@@ -1,3 +1,3 @@
1
1
  module CloudstackCli
2
- VERSION = "0.3.9"
2
+ VERSION = "0.3.10"
3
3
  end
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.9
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-24 00:00:00.000000000 Z
12
+ date: 2013-10-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdoc