diff options
author | elijah <elijah@riseup.net> | 2013-06-26 21:39:23 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-06-26 21:39:23 -0700 |
commit | e0763033e497fdb7956aa62534b5f8bee0f83a12 (patch) | |
tree | fc401d97f2180eded26142d541f5ffe12df15ec0 /lib/leap_cli/config | |
parent | e202826340c3293d4cb2a8900cbbd628bc1b9289 (diff) |
added command `leap compile zone`
Diffstat (limited to 'lib/leap_cli/config')
-rw-r--r-- | lib/leap_cli/config/manager.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/leap_cli/config/manager.rb b/lib/leap_cli/config/manager.rb index 05df22f..f34566c 100644 --- a/lib/leap_cli/config/manager.rb +++ b/lib/leap_cli/config/manager.rb @@ -19,10 +19,21 @@ module LeapCli attr_reader :services, :tags, :nodes, :provider, :common, :secrets attr_reader :base_services, :base_tags, :base_provider, :base_common + # + # returns the Hash of the contents of facts.json + # def facts @facts ||= JSON.parse(Util.read_file(:facts) || "{}") end + # + # returns an Array of all the environments defined for this provider. + # the returned array includes nil (for the default environment) + # + def environments + @environments ||= [nil] + self.tags.collect {|name, tag| tag['environment']}.compact + end + ## ## IMPORT EXPORT ## |