From 205b61dfe721e6d88fc06b050a0497eeb35f4e02 Mon Sep 17 00:00:00 2001 From: elijah Date: Thu, 21 Jul 2016 00:55:12 -0700 Subject: added 'leap vm' command --- lib/leap_cli/config/environment.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/leap_cli/config/environment.rb') 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 # -- cgit v1.2.3