diff --git a/network/ports/deployed_vip_ctlplane.yaml b/network/ports/deployed_vip_ctlplane.yaml new file mode 100644 index 0000000000..5f5c82e545 --- /dev/null +++ b/network/ports/deployed_vip_ctlplane.yaml @@ -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]} diff --git a/network/ports/deployed_vip_port.j2 b/network/ports/deployed_vip_port.j2 new file mode 100644 index 0000000000..3be0a7ff44 --- /dev/null +++ b/network/ports/deployed_vip_port.j2 @@ -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]} diff --git a/network/ports/deployed_vip_port.network.j2.yaml b/network/ports/deployed_vip_port.network.j2.yaml new file mode 100644 index 0000000000..245d8707ca --- /dev/null +++ b/network/ports/deployed_vip_port.network.j2.yaml @@ -0,0 +1 @@ +{% include 'deployed_vip_port.j2' %} diff --git a/tools/process-templates.py b/tools/process-templates.py index 9fdc9b1ec3..fb7ab5efac 100755 --- a/tools/process-templates.py +++ b/tools/process-templates.py @@ -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)