modules/mu/mommacat.rb in cloud-mu-3.1.0 vs modules/mu/mommacat.rb in cloud-mu-3.1.1
- old
+ new
@@ -362,11 +362,11 @@
else
orig_cfg['vpc']['mommacat'] = self
MU::Config::Ref.get(orig_cfg['vpc'])
end
orig_cfg['vpc'].delete('mommacat')
- orig_cfg['vpc'] = ref if ref.kitten
+ orig_cfg['vpc'] = ref if ref.kitten(shallow: true)
end
begin
# Load up MU::Cloud objects for all our kittens in this deploy
orig_cfg['environment'] = @environment # not always set in old deploys
@@ -414,11 +414,11 @@
def cloudsUsed
seen = []
seen << @original_config['cloud'] if @original_config['cloud']
MU::Cloud.resource_types.values.each { |attrs|
type = attrs[:cfg_plural]
- if @original_config.has_key?(type)
+ if @original_config[type]
@original_config[type].each { |resource|
seen << resource['cloud'] if resource['cloud']
}
end
}
@@ -434,11 +434,11 @@
# clouds = []
seen << @original_config['credentials'] if @original_config['credentials']
# defaultcloud = @original_config['cloud']
MU::Cloud.resource_types.values.each { |attrs|
type = attrs[:cfg_plural]
- if @original_config.has_key?(type)
+ if @original_config[type]
@original_config[type].each { |resource|
if resource['credentials']
seen << resource['credentials']
else
cloudclass = if @original_config['cloud']
@@ -464,10 +464,10 @@
return [] if !@original_config
regions = []
regions << @original_config['region'] if @original_config['region']
MU::Cloud.resource_types.each_pair { |res_type, attrs|
type = attrs[:cfg_plural]
- if @original_config.has_key?(type)
+ if @original_config[type]
@original_config[type].each { |resource|
if resource['cloud']
cloudclass = Object.const_get("MU").const_get("Cloud").const_get(resource['cloud'])
resclass = Object.const_get("MU").const_get("Cloud").const_get(resource['cloud']).const_get(res_type.to_s)
if resclass.isGlobal?