Add deleton_policy to network port resources
In perparation for trainsition from composable network ports managed by heat, to composable network ports managed with other tooling. The upgrade prepare step need to set ``PortDeletionPolicy`` to 'retain', so that network ports are not deleted when running converge. Change-Id: I16281faefdf68fcaee4c51caa47516ea7084418b Partial-Implements: blueprint network-data-v2-ports
This commit is contained in:
parent
27c5f94813
commit
06a6fffc17
|
@ -12,10 +12,19 @@ parameters:
|
|||
default: ovn_mac_addr_net
|
||||
description: The name of the OVNMacAddr network.
|
||||
type: string
|
||||
PortDeletionPolicy:
|
||||
description: >
|
||||
Whether to retain or delete the neutron port resource on deletion of the
|
||||
stack
|
||||
type: string
|
||||
default: delete
|
||||
constraints:
|
||||
- allowed_values: [delete, retain]
|
||||
|
||||
resources:
|
||||
OVNMacAddressPort:
|
||||
type: OS::Neutron::Port
|
||||
deletion_policy: {get_param: PortDeletionPolicy}
|
||||
properties:
|
||||
name: {get_param: PortName}
|
||||
network: {get_param: OVNMacAddressNetworkName}
|
||||
|
|
|
@ -51,6 +51,14 @@ parameters:
|
|||
NodeIndex: # Here for compatibility with from_pool.yaml
|
||||
default: 0
|
||||
type: number
|
||||
PortDeletionPolicy:
|
||||
description: >
|
||||
Whether to retain or delete the neutron port resource on deletion of the
|
||||
stack
|
||||
type: string
|
||||
default: delete
|
||||
constraints:
|
||||
- allowed_values: [delete, retain]
|
||||
|
||||
conditions:
|
||||
network_is_ctlplane:
|
||||
|
@ -72,6 +80,7 @@ resources:
|
|||
|
||||
{{network.name}}Port:
|
||||
type: OS::Neutron::Port
|
||||
deletion_policy: {get_param: PortDeletionPolicy}
|
||||
{%- if set_external_id|default(false) and network.external_resource_vip_id|default('') %}
|
||||
external_id: {{network.external_resource_vip_id}}
|
||||
{%- endif %}
|
||||
|
|
|
@ -45,6 +45,14 @@ parameters:
|
|||
[{'ip_address':'1.2.3.4'}]
|
||||
default: []
|
||||
type: json
|
||||
PortDeletionPolicy:
|
||||
description: >
|
||||
Whether to retain or delete the neutron port resource on deletion of the
|
||||
stack
|
||||
type: string
|
||||
default: delete
|
||||
constraints:
|
||||
- allowed_values: [delete, retain]
|
||||
|
||||
conditions:
|
||||
network_is_ctlplane:
|
||||
|
@ -65,6 +73,7 @@ conditions:
|
|||
resources:
|
||||
VipPort:
|
||||
type: OS::Neutron::Port
|
||||
deletion_policy: {get_param: PortDeletionPolicy}
|
||||
properties:
|
||||
network: {get_param: NetworkName}
|
||||
name: {get_param: PortName}
|
||||
|
|
Loading…
Reference in New Issue