Add deployed_vip_port templates
Add a new deployed_vip_port template which will replace the current neutron port templates when vip ports are managed outside of the heat stack. Change-Id: Ia1f7e344ccebb2291f1574fdb69c05f00f4c3dc9 Partial-Implements: blueprint network-data-v2-ports
This commit is contained in:
parent
4b4aaeb65a
commit
d498ebe872
40
network/ports/deployed_vip_ctlplane.yaml
Normal file
40
network/ports/deployed_vip_ctlplane.yaml
Normal file
@ -0,0 +1,40 @@
|
||||
heat_template_version: rocky
|
||||
|
||||
description: >
|
||||
Deployed VIP port on the Control Plane network.
|
||||
|
||||
parameters:
|
||||
name: # Here for compatibility
|
||||
default: ''
|
||||
type: string
|
||||
dns_name: # Here for compatibility
|
||||
default: ''
|
||||
type: string
|
||||
network: # Here for compatibility
|
||||
default: ''
|
||||
type: string
|
||||
fixed_ips: # Here for compatibility
|
||||
default: ''
|
||||
type: comma_delimited_list
|
||||
replacement_policy: # Here for compatibility
|
||||
default: ''
|
||||
type: string
|
||||
tags: # Here for compatibility
|
||||
default: []
|
||||
type: comma_delimited_list
|
||||
|
||||
ControlPlaneVipData:
|
||||
description: >
|
||||
Control Plane Virtual IP data
|
||||
default: {}
|
||||
type: json
|
||||
|
||||
outputs:
|
||||
name:
|
||||
value: {get_param: [ControlPlaneVipData, name]}
|
||||
fixed_ips:
|
||||
value: {get_param: [ControlPlaneVipData, fixed_ips]}
|
||||
network:
|
||||
value: {get_param: [ControlPlaneVipData, network]}
|
||||
subnets:
|
||||
value: {get_param: [ControlPlaneVipData, subnets]}
|
67
network/ports/deployed_vip_port.j2
Normal file
67
network/ports/deployed_vip_port.j2
Normal file
@ -0,0 +1,67 @@
|
||||
heat_template_version: rocky
|
||||
|
||||
description: >
|
||||
Deployed VIP port on the {{network.name}} network.
|
||||
|
||||
parameters:
|
||||
StackName: # Here for compatibility
|
||||
description: Name of the overcloud heat stack
|
||||
default: overcloud
|
||||
type: string
|
||||
PortName:
|
||||
description: Name of the port
|
||||
default: ''
|
||||
type: string
|
||||
DnsName: # Here for compatibility
|
||||
description: DNS name of the port
|
||||
default: ''
|
||||
type: string
|
||||
ControlPlaneIP: # Here for compatibility with noop.yaml
|
||||
description: IP address on the control plane
|
||||
default: ''
|
||||
type: string
|
||||
ControlPlaneSubnetCidr: # Here for compatibility with noop.yaml
|
||||
default: ''
|
||||
description: >
|
||||
The subnet CIDR of the control plane network. (The parameter is
|
||||
automatically resolved from the ctlplane subnet's cidr attribute.)
|
||||
type: string
|
||||
ControlPlaneNetwork: # Here for compatibility with ctlplane_vip.yaml
|
||||
description: The name of the undercloud Neutron control plane
|
||||
default: ctlplane
|
||||
type: string
|
||||
ControlPlaneSubnet: # Here for compatibility with ctlplane_vip.yaml
|
||||
description: The name of the undercloud Neutron control plane subnet
|
||||
default: ctlplane-subnet
|
||||
type: string
|
||||
FixedIPs: # Here for compatibility
|
||||
description: >
|
||||
Control the IP allocation for the VIP port. E.g.
|
||||
[{'ip_address':'1.2.3.4'}]
|
||||
default: []
|
||||
type: json
|
||||
IPPool: # Here for compatibility with from_pool.yaml
|
||||
default: {}
|
||||
type: json
|
||||
NodeIndex: # Here for compatibility with from_pool.yaml
|
||||
default: 0
|
||||
type: number
|
||||
VipPort: # Here for compatibility
|
||||
type: boolean
|
||||
default: false
|
||||
VipPortMap:
|
||||
description: >
|
||||
A map of deployed port data
|
||||
default: {}
|
||||
type: json
|
||||
|
||||
outputs:
|
||||
ip_address:
|
||||
description: {{network.name}} network VIP
|
||||
value: {get_param: [VipPortMap, {{network.name_lower}}, ip_address]}
|
||||
ip_address_uri:
|
||||
description: {{network.name}} network VIP (with brackets for IPv6 URLs)
|
||||
value: {get_param: [VipPortMap, {{network.name_lower}}, ip_address_uri]}
|
||||
ip_subnet:
|
||||
description: IP/Subnet CIDR for the {{network.name}} network VIP
|
||||
value: {get_param: [VipPortMap, {{network.name_lower}}, ip_subnet]}
|
1
network/ports/deployed_vip_port.network.j2.yaml
Normal file
1
network/ports/deployed_vip_port.network.j2.yaml
Normal file
@ -0,0 +1 @@
|
||||
{% include 'deployed_vip_port.j2' %}
|
@ -362,6 +362,10 @@ def clean_templates(base_path, role_data_path, network_data_path):
|
||||
'network', 'ports', '%s_v6.yaml' % network['name_lower'])
|
||||
ports_from_pool_v6_path = os.path.join(
|
||||
'network', 'ports', '%s_from_pool_v6.yaml' % network['name_lower'])
|
||||
deployed_ports_path = os.path.join(
|
||||
'network', 'ports', 'deployed_%s.yaml' % network['name_lower'])
|
||||
deployed_vip_ports_path = os.path.join(
|
||||
'network', 'ports', 'deployed_vip_%s.yaml' % network['name_lower'])
|
||||
|
||||
delete(network_path)
|
||||
delete(network_from_pool_path)
|
||||
@ -373,6 +377,8 @@ def clean_templates(base_path, role_data_path, network_data_path):
|
||||
delete(ports_from_pool_path)
|
||||
delete(ports_v6_path)
|
||||
delete(ports_from_pool_v6_path)
|
||||
delete(deployed_ports_path)
|
||||
delete(deployed_vip_ports_path)
|
||||
|
||||
with open(role_data_path) as role_data_file:
|
||||
role_data = yaml.safe_load(role_data_file)
|
||||
|
Loading…
Reference in New Issue
Block a user