Merge "Two-phase Instance deployment support"

This commit is contained in:
Jenkins 2016-06-21 01:00:17 +00:00 committed by Gerrit Code Review
commit a1757cab29
2 changed files with 28 additions and 3 deletions

View File

@ -103,7 +103,7 @@ Methods:
Body:
$.sharedIps: $ips
deploy:
beginDeploy:
Body:
- $.validateBootSource()
- $securityGroupName: coalesce(
@ -162,6 +162,9 @@ Methods:
# Any additional template preparation
- $.instanceTemplate: $.prepareStackTemplate($.instanceTemplate)
- $.environment.stack.updateTemplate($.instanceTemplate)
endDeploy:
Body:
- $.environment.stack.push()
- $outputs: $.environment.stack.output()
- $.ipAddresses: $outputs.get(format('{0}-assigned-ips', $this.name)).values().flatten().distinct()
@ -173,6 +176,11 @@ Methods:
Then: $.setAttr(fipAssigned, true)
- $.environment.instanceNotifier.trackCloudInstance($this)
deploy:
Body:
- $this.beginDeploy()
- $this.endDeploy()
detectPrimaryNetwork:
Body:
- $._primaryNetwork: null
@ -283,7 +291,7 @@ Methods:
device_type: $blockDevice.deviceType
boot_index: $blockDevice.bootIndex
releaseResources:
beginReleaseResources:
Body:
- $template: $.environment.stack.current()
- If: bool($template.resources) and bool($template.outputs)
@ -301,6 +309,12 @@ Methods:
- $template.outputs: $template.outputs.deleteAll($outputsToDelete)
- $.environment.stack.setTemplate($template)
endReleaseResources:
Body:
- $template: $.environment.stack.current()
- If: bool($template.resources) and bool($template.outputs)
Then:
- $.environment.stack.push()
- $.setAttr(instanceResources, [])
- $.setAttr(instanceOutputs, [])
@ -309,6 +323,11 @@ Methods:
- $.ipAddresses: []
- $.floatingIpAddress: null
releaseResources:
Body:
- $this.beginReleaseResources()
- $this.endReleaseResources()
validateBootSource:
Body:
- If: $.image = null and len($.blockDevices) = 0
@ -347,4 +366,4 @@ Methods:
getRef:
Body:
Return:
get_resource: $.name
get_resource: $.name

View File

@ -0,0 +1,6 @@
---
features:
- >
Instance.deploy() can now be split into two phases: beginDeploy() and
endDeploy(). This allows the application developer to provision multiple
instances at once without the need to push the stack for each instance.