d5001e435fabe150bbc719d51ed94af7a1dcd663
[apex-tripleo-heat-templates.git] / network / ports / ctlplane_vip.yaml
1 heat_template_version: 2015-04-30
2
3 description: >
4   Creates a port for a VIP on the undercloud ctlplane network.
5
6 parameters:
7   NetworkName:
8     description: # Here for compatibility with isolated networks
9     default: ctlplane
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   ControlPlaneNetwork:
19     description: The name of the undercloud Neutron control plane
20     default: ctlplane
21     type: string
22
23
24 resources:
25
26   VipPort:
27     type: OS::Neutron::Port
28     properties:
29       network: {get_param: ControlPlaneNetwork}
30       name: {get_param: PortName}
31       replacement_policy: AUTO
32
33 outputs:
34   ip_address:
35     description: Virtual IP network IP
36     value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
37   ip_subnet:
38     # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?)
39     description: IP/Subnet CIDR for the internal API network IP
40     value:
41           list_join:
42             - ''
43             - - {get_attr: [VipPort, fixed_ips, 0, ip_address]}
44               - '/'
45               - {get_attr: [VipPort, subnets, 0, cidr, -2]}
46               - {get_attr: [VipPort, subnets, 0, cidr, -1]}