Update app dev framework with multi-region support

When security rules were applied they were were
applied to the environment's Heat stack. Now they
are applied to each region's stack application
instances belong in.

Change-Id: Ia94cf24bcf517af7db57117f86c7b802423f81df
This commit is contained in:
Stan Lagun
2016-08-29 11:40:34 -07:00
parent 2f2132350d
commit 077a3c364b

View File

@@ -362,11 +362,26 @@ Methods:
Contract: $.class(ServerGroup).notNull()
Body:
- $sr: $this.getSecurityRules()
- $env: $this.find(std:Environment)
- If: $sr and $env
- If: $sr
Then:
- $env.securityGroupManager.addGroupIngress($sr)
- $env.stack.push()
- $regions: $servers.select($.getRegion()).distinct()
- $regions.pselect($this._configureSecurityGroup($, $sr))
_configureSecurityGroup:
Usage: Static
Arguments:
- region:
Contract: $.class(std:CloudRegion).notNull()
- rules:
Contract:
- FromPort: $.int().notNull()
ToPort: $.int().notNull()
IpProtocol: $.string().notNull()
External: $.bool().notNull()
Ethertype: $.string().check($ in list(null, 'IPv4', 'IPv6'))
Body:
- $region.securityGroupManager.addGroupIngress($rules)
- $region.stack.push()
getSecurityRules:
Body: