diff options
author | elijah <elijah@riseup.net> | 2016-07-21 00:55:12 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2016-08-23 13:37:34 -0700 |
commit | 205b61dfe721e6d88fc06b050a0497eeb35f4e02 (patch) | |
tree | 518b5799f56d9e224d7ca2d85b3d29ef0c01b3c6 /lib/leap_cli/config/environment.rb | |
parent | 6fab56fb40256fb2e541ee3ad61490f03254d38e (diff) |
added 'leap vm' command
Diffstat (limited to 'lib/leap_cli/config/environment.rb')
-rw-r--r-- | lib/leap_cli/config/environment.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/leap_cli/config/environment.rb b/lib/leap_cli/config/environment.rb index 398fd023..dadd9eaf 100644 --- a/lib/leap_cli/config/environment.rb +++ b/lib/leap_cli/config/environment.rb @@ -30,10 +30,12 @@ module LeapCli; module Config # shared, non-inheritable def nodes; @@nodes; end def secrets; @@secrets; end + def cloud; @@cloud; end def initialize(manager, name, search_dir, parent, options={}) @@nodes ||= nil @@secrets ||= nil + @@cloud ||= nil @manager = manager @name = name @@ -64,6 +66,7 @@ module LeapCli; module Config @partials = Config::ObjectList.new @provider = Config::Provider.new @common = Config::Object.new + @cloud = Config::Cloud.new return end @@ -89,7 +92,9 @@ module LeapCli; module Config @partials.values.each {|partial| partial.delete('name'); } # - # shared: currently non-inheritable + # shared + # + # shared configs are also non-inheritable # load the first ones we find, and only those. # if @@nodes.nil? || @@nodes.empty? @@ -98,6 +103,9 @@ module LeapCli; module Config if @@secrets.nil? || @@secrets.empty? @@secrets = load_json(Path.named_path(:secrets_config, search_dir), Config::Secrets, options) end + if @@cloud.nil? || @@cloud.empty? + @@cloud = load_json(Path.named_path(:cloud_config, search_dir), Config::Cloud) + end end # |