modules/mu/clouds/google/server_pool.rb in cloud-mu-3.1.5 vs modules/mu/clouds/google/server_pool.rb in cloud-mu-3.1.6
- old
+ new
@@ -430,30 +430,30 @@
# @param noop [Boolean]: If true, will only print what would be done
# @param ignoremaster [Boolean]: If true, will remove resources not flagged as originating from this Mu server
# @param region [String]: The cloud provider region
# @return [void]
def self.cleanup(noop: false, ignoremaster: false, region: MU.curRegion, credentials: nil, flags: {})
- flags["project"] ||= MU::Cloud::Google.defaultProject(credentials)
- return if !MU::Cloud::Google::Habitat.isLive?(flags["project"], credentials)
+ flags["habitat"] ||= MU::Cloud::Google.defaultProject(credentials)
+ return if !MU::Cloud::Google::Habitat.isLive?(flags["habitat"], credentials)
filter = %Q{(labels.mu-id = "#{MU.deploy_id.downcase}")}
if !ignoremaster and MU.mu_public_ip
filter += %Q{ AND (labels.mu-master-ip = "#{MU.mu_public_ip.gsub(/\./, "_")}")}
end
MU.log "Placeholder: Google ServerPool artifacts do not support labels, so ignoremaster cleanup flag has no effect", MU::DEBUG, details: filter
if !flags["global"]
["region_autoscaler", "region_instance_group_manager"].each { |type|
MU::Cloud::Google.compute(credentials: credentials).delete(
type,
- flags["project"],
+ flags["habitat"],
region,
noop
)
}
else
MU::Cloud::Google.compute(credentials: credentials).delete(
"instance_template",
- flags["project"],
+ flags["habitat"],
noop
)
end
end