Application Catalog for OpenStack
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

33 lines
818 B

Namespaces:
=: io.murano
sys: io.murano.system
Name: CloudResource
Properties:
regionName:
Contract: $.string()
Methods:
.init:
Body:
$._region: null
getRegion:
Meta:
'io.murano.metadata.engine.Synchronize':
onThis: false
Body:
- If: $._region = null
Then:
- $env: $.find(Environment).require()
- $regionName: generate($this, $ != null, $.find(CloudResource)).
select($.regionName).where($ != null).first($env.region)
- $._region: $.find(CloudRegion)
- If: $._region = null or $._region.name != $regionName
Then:
$._region: $env.regions[$regionName]
- If: $._region != null
Then:
- sys:GC.subscribeDestruction($this, $._region)
- Return: $._region