Merge "ExistingNeutronNetwork didn't return IPs for the instance" into stable/newton
This commit is contained in:
commit
038affd0af
|
@ -59,6 +59,13 @@ Workflow:
|
|||
$.name = $this.internalNetworkName or
|
||||
$.id = $this.internalNetworkName).first().id
|
||||
|
||||
- If: $._internalNetworkId = $.internalNetworkName
|
||||
Then:
|
||||
$._internalNetworkName: $._getNetworks().where(
|
||||
$.id = $this._internalNetworkId).first().name
|
||||
Else:
|
||||
$._internalNetworkName: $.internalNetworkName
|
||||
|
||||
- If: $.internalSubnetworkName = null
|
||||
Then:
|
||||
$.internalSubnetworkName: $._getSubnetworks().where(
|
||||
|
@ -137,7 +144,8 @@ Workflow:
|
|||
netRef => $._internalNetworkId,
|
||||
subnetRef => $._internalSubnetworkId,
|
||||
floatingIpResourceName => $fipName,
|
||||
floatingIpNetRef => $floatingIpNetRef
|
||||
floatingIpNetRef => $floatingIpNetRef,
|
||||
netName => $._internalNetworkName
|
||||
)
|
||||
|
||||
describe:
|
||||
|
|
|
@ -150,7 +150,8 @@ Methods:
|
|||
netRef => $netRef,
|
||||
subnetRef => $subnetRef,
|
||||
floatingIpResourceName => $fipName,
|
||||
floatingIpNetRef => $extNetId
|
||||
floatingIpNetRef => $extNetId,
|
||||
netName => $._getHeatName()
|
||||
)
|
||||
|
||||
# (sjmc7) This is a workaround for https://bugs.launchpad.net/heat/+bug/1299259
|
||||
|
@ -163,19 +164,8 @@ Methods:
|
|||
- $._getRouterInterfaceName()
|
||||
- $result.template: $result.template.mergeWith($template)
|
||||
|
||||
- $addressOutputName: format('adresses-{0}-in-{1}', $instance.name, $this.name)
|
||||
- $ipsOutputTemplate:
|
||||
outputs:
|
||||
$addressOutputName:
|
||||
description: format('Addresses for {0} in {1}', $instance.name, $this.name)
|
||||
value:
|
||||
get_attr: [$instance.name, 'addresses', $._getHeatName()]
|
||||
- $result.template: $result.template.mergeWith($ipsOutputTemplate)
|
||||
- $result.instanceOutputs: $result.instanceOutputs.append($addressOutputName)
|
||||
|
||||
- Return: $result
|
||||
|
||||
|
||||
describe:
|
||||
Body:
|
||||
- $.deploy()
|
||||
|
@ -209,14 +199,6 @@ Methods:
|
|||
- $region.stack.push()
|
||||
- $.openstackId: null
|
||||
|
||||
getInstanceIpList:
|
||||
Arguments:
|
||||
- instance:
|
||||
Contract: $.class(Instance).notNull()
|
||||
Body:
|
||||
- Return: $.getRegion().stack.output().get(format('adresses-{0}-in-{1}', $instance.name, $this.name)).select($["addr"]).distinct()
|
||||
|
||||
|
||||
_getRouterInterfaceName:
|
||||
Body:
|
||||
Return: format('ri-{0}', id($))
|
||||
|
|
|
@ -49,10 +49,14 @@ Methods:
|
|||
Contract: $.string()
|
||||
- floatingIpNetRef:
|
||||
Contract: $
|
||||
- netName:
|
||||
Contract: $.string().notNull()
|
||||
Body:
|
||||
- $netExplorer: $._getNetExplorer()
|
||||
- $securityGroupsEnabled: $netExplorer.listNeutronExtensions().alias.contains('security-group')
|
||||
- $portName: format('port-{0}-{1}', id($), $instance.name)
|
||||
|
||||
- $addressesOutputName: format('addresses-{0}-{1}', $instance.name, id($this))
|
||||
- $patchTemplate:
|
||||
resources:
|
||||
$portName:
|
||||
|
@ -62,6 +66,11 @@ Methods:
|
|||
fixed_ips:
|
||||
- subnet: $subnetRef
|
||||
replacement_policy: AUTO
|
||||
outputs:
|
||||
$addressesOutputName:
|
||||
description: format('Addresses for {0} in {1}', $instance.name, $netName)
|
||||
value:
|
||||
get_attr: [$instance.name, 'addresses', $netName]
|
||||
|
||||
- If: bool($securityGroupName) and $securityGroupsEnabled
|
||||
Then:
|
||||
|
@ -74,7 +83,7 @@ Methods:
|
|||
- $patchTemplate: $patchTemplate.mergeWith($template)
|
||||
|
||||
- $instanceResources: [$portName]
|
||||
- $instanceOutputs: []
|
||||
- $instanceOutputs: [$addressesOutputName]
|
||||
|
||||
- For: sip
|
||||
In: $sharedIps
|
||||
|
@ -115,7 +124,6 @@ Methods:
|
|||
instanceResources: $instanceResources
|
||||
instanceOutputs: $instanceOutputs
|
||||
|
||||
|
||||
generateSecurityGroupManager:
|
||||
Body:
|
||||
- $region: $.getRegion()
|
||||
|
@ -127,3 +135,11 @@ Methods:
|
|||
Else:
|
||||
- $._environment.reporter.report($this, "Warning! Security groups are disabled!")
|
||||
- Return: new(sys:DummySecurityGroupManager, $region)
|
||||
|
||||
getInstanceIpList:
|
||||
Arguments:
|
||||
- instance:
|
||||
Contract: $.class(Instance).notNull()
|
||||
Body:
|
||||
- Return: $.getRegion().stack.output()[
|
||||
format('addresses-{0}-{1}', $instance.name, id($this))].addr.distinct()
|
||||
|
|
Loading…
Reference in New Issue