heat_template_version: wallaby

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
  IsVirtualIP: # 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]}
