modules/mu/config.rb in cloud-mu-3.0.1 vs modules/mu/config.rb in cloud-mu-3.0.2
- old
+ new
@@ -523,11 +523,11 @@
cloud_id: @id,
deploy_id: @deploy_id,
region: @region,
habitats: hab_arg,
credentials: @credentials,
- dummy_ok: (["habitats", "folders", "users", "groups"].include?(@type))
+ dummy_ok: (["habitats", "folders", "users", "groups", "vpcs"].include?(@type))
)
@obj ||= found.first if found
rescue ThreadError => e
# Sometimes MommaCat calls us in a potential deadlock situation;
# don't be the cause of a fatal error if so, we don't need this
@@ -1784,10 +1784,13 @@
end
end
acl = {"name" => name, "rules" => rules, "vpc" => realvpc, "cloud" => cloud, "admin" => true, "credentials" => credentials }
+ if cloud == "Google" and acl["vpc"] and acl["vpc"]["habitat"]
+ acl['project'] = acl["vpc"]["habitat"]["id"] || acl["vpc"]["habitat"]["name"]
+ end
acl.delete("vpc") if !acl["vpc"]
if !resclass.isGlobal? and !region.nil? and !region.empty?
acl["region"] = region
end
@admin_firewall_rules << acl if !@admin_firewall_rules.include?(acl)
@@ -1970,9 +1973,16 @@
@@bindings
end
# Namespace magic to pass to ERB's result method.
def get_binding(keyset)
+ environment = $environment
+ myPublicIp = $myPublicIp
+ myRoot = $myRoot
+ myAZ = $myAZ
+ myRegion = $myRegion
+ myAppName = $myAppName
+
# return MU::Config.global_bindings[keyset] if MU::Config.global_bindings[keyset]
MU::Config.global_bindings[keyset] = binding
MU::Config.global_bindings[keyset]
end