Merge "Allow port security to be disabled"

This commit is contained in:
Zuul 2018-04-14 01:26:15 +00:00 committed by Gerrit Code Review
commit 003da9ce1c
1 changed files with 15 additions and 1 deletions

View File

@ -17,6 +17,10 @@ Namespaces:
Name: NeutronNetworkBase
Properties:
port_security_disable:
Contract: $.bool()
Extends: Network
Methods:
@ -82,7 +86,7 @@ Methods:
- subnet: $subnetRef
- $patchTemplate: $patchTemplate.mergeWith($template)
- If: $securityGroupsEnabled
- If: $securityGroupsEnabled and not $.port_security_disable
Then:
- If: len($securityGroups) > 0 and $securityGroups[0] != ""
Then:
@ -107,6 +111,16 @@ Methods:
- get_resource: $securityGroupName
- $patchTemplate: $patchTemplate.mergeWith($template)
- If: $.port_security_disable
Then:
- $template:
resources:
$portName:
properties:
port_security_enabled: false
- $patchTemplate: $patchTemplate.mergeWith($template)
- $instanceResources: [$portName]
- $instanceOutputs: [$addressesOutputName]