ab72083da2b1563f7b7b0d1d516cdb777319f22c
[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   ControlPlaneNetwork:
19     description: The name of the undercloud Neutron control plane
20     default: ctlplane
21     type: string
22
23 resources:
24
25   VipPort:
26     type: OS::Neutron::Port
27     properties:
28       network: {get_param: NetworkName}
29       name: {get_param: PortName}
30       replacement_policy: AUTO
31
32 outputs:
33   ip_address:
34     description: Virtual IP network IP
35     value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
36   ip_subnet:
37     # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?)
38     description: IP/Subnet CIDR for the internal API network IP
39     value:
40           list_join:
41             - ''
42             - - {get_attr: [VipPort, fixed_ips, 0, ip_address]}
43               - '/'
44               - {get_attr: [VipPort, subnets, 0, cidr, -2]}
45               - {get_attr: [VipPort, subnets, 0, cidr, -1]}