modules/mu/cleanup.rb in cloud-mu-2.0.0.pre.alpha2 vs modules/mu/cleanup.rb in cloud-mu-2.0.0.pre.alpha3

- old
+ new

@@ -89,11 +89,11 @@ creds = {} MU::Cloud.supportedClouds.each { |cloud| if $MU_CFG[cloud.downcase] and $MU_CFG[cloud.downcase].size > 0 cloudclass = Object.const_get("MU").const_get("Cloud").const_get(cloud) creds[cloud] ||= {} - $MU_CFG[cloud.downcase].keys.each { |credset| + cloudclass.listCredentials.each { |credset| creds[cloud][credset] = cloudclass.listRegions(credentials: credset) } end } parent_thread_id = Thread.current.object_id @@ -113,11 +113,12 @@ if $MU_CFG[provider.downcase][credset]["project"] # XXX GCP credential schema needs an array for projects projects << $MU_CFG[provider.downcase][credset]["project"] end - if projects == [""] + if projects == [] + projects << "" # dummy MU.log "Checking for #{provider}/#{credset} resources from #{MU.deploy_id} in #{r}", MU::NOTICE end # We do these in an order that unrolls dependent resources # sensibly, and we hit :Collection twice because AWS @@ -158,10 +159,9 @@ next end if @mommacat.nil? or @mommacat.numKittens(types: [t]) > 0 begin - puts t if t == "Habitat" resclass = Object.const_get("MU").const_get("Cloud").const_get(t) resclass.cleanup( noop: @noop, ignoremaster: @ignoremaster, region: r,