diff --git a/network/ports/deployed_port.j2 b/network/ports/deployed_port.j2 new file mode 100644 index 0000000000..68d299b38d --- /dev/null +++ b/network/ports/deployed_port.j2 @@ -0,0 +1,74 @@ +heat_template_version: rocky + +description: > + Deployed 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 + NodePortMap: + description: > + A map of deployed port data + default: {} + type: json + +resources: + + {{network.name}}DeployedPort: + type: OS::Heat::Value + properties: + value: + ip_address: {get_param: [NodePortMap, {get_param: DnsName}, {{network.name_lower}}, ip_address]} + ip_address_uri: {get_param: [NodePortMap, {get_param: DnsName}, {{network.name_lower}}, ip_address_uri]} + ip_subnet: {get_param: [NodePortMap, {get_param: DnsName}, {{network.name_lower}}, ip_subnet]} + +outputs: + ip_address: + description: {{network.name}} network IP + value: {get_attr: [{{network.name}}DeployedPort, value, ip_address]} + ip_address_uri: + description: {{network.name}} network IP (with brackets for IPv6 URLs) + value: {get_attr: [{{network.name}}DeployedPort, value, ip_address_uri]} + ip_subnet: + description: IP/Subnet CIDR for the {{network.name}} network IP + value: {get_attr: [{{network.name}}DeployedPort, value, ip_subnet]} diff --git a/network/ports/deployed_port.network.j2.yaml b/network/ports/deployed_port.network.j2.yaml new file mode 100644 index 0000000000..35907e5c06 --- /dev/null +++ b/network/ports/deployed_port.network.j2.yaml @@ -0,0 +1 @@ +{% include 'deployed_port.j2' %}