Merge "Fix grammar nits in bond-with-vlans templates"
[apex-tripleo-heat-templates.git] / network / ports / vip.yaml
1 heat_template_version: 2015-04-30
2
3 description: >
4   Creates a port for a VIP on the isolated network NetworkName.
5
6 parameters:
7   NetworkName:
8     description: Name of the network where the VIP will be created
9     default: internal_api
10     type: string
11   PortName:
12     description: Name of the port
13     default: ''
14     type: string
15   ControlPlaneIP: # Here for compatability with noop.yaml
16     description: IP address on the control plane
17     type: string
18
19 resources:
20
21   VipPort:
22     type: OS::Neutron::Port
23     properties:
24       network: {get_param: NetworkName}
25       name: {get_param: PortName}
26       replacement_policy: AUTO
27
28 outputs:
29   ip_address:
30     description: Virtual IP network IP
31     value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
32   ip_subnet:
33     # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?)
34     description: IP/Subnet CIDR for the internal API network IP
35     value:
36           list_join:
37             - ''
38             - - {get_attr: [VipPort, fixed_ips, 0, ip_address]}
39               - '/'
40               - {get_attr: [VipPort, subnets, 0, cidr, -2]}
41               - {get_attr: [VipPort, subnets, 0, cidr, -1]}