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

- old
+ new

@@ -59,12 +59,11 @@ else MU.setVar("dataDir", MU.mainDataDir) end -# XXX AWS needs to check MU::Cloud::AWS.isGovCloud? on some things, or gracefully handle the API not existing - types_in_order = ["Collection", "Function", "ServerPool", "ContainerCluster", "SearchDomain", "Server", "MsgQueue", "Database", "CacheCluster", "StoragePool", "LoadBalancer", "FirewallRule", "Alarm", "Notifier", "Log", "VPC", "DNSZone", "Collection"] + types_in_order = ["Collection", "Function", "ServerPool", "ContainerCluster", "SearchDomain", "Server", "MsgQueue", "Database", "CacheCluster", "StoragePool", "LoadBalancer", "FirewallRule", "Alarm", "Notifier", "Log", "VPC", "DNSZone", "Collection", "Habitat"] # Load up our deployment metadata if !mommacat.nil? @mommacat = mommacat else @@ -159,10 +158,11 @@ 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, @@ -182,10 +182,10 @@ end # XXX move to MU::AWS if provider == "AWS" resp = MU::Cloud::AWS.ec2(region: r, credentials: credset).describe_key_pairs( - filters: [{name: "key-name", values: [keyname]}] + filters: [{name: "key-name", values: [keyname]}] ) resp.data.key_pairs.each { |keypair| MU.log "Deleting key pair #{keypair.key_name} from #{r}" MU::Cloud::AWS.ec2(region: r, credentials: credset).delete_key_pair(key_name: keypair.key_name) if !@noop }