Bump template version for all templates to "ocata"
[apex-tripleo-heat-templates.git] / network / ports / vip_v6.yaml
1 heat_template_version: ocata
2
3 description: >
4   Creates a port for a VIP on the isolated network NetworkName.
5   The IP address will be chosen automatically if FixedIPs is empty.
6
7 parameters:
8   ServiceName: # Here for compatibility with from_service.yaml
9     description: Name of the service to lookup
10     default: ''
11     type: string
12   NetworkName:
13     description: Name of the network where the VIP will be created
14     default: internal_api
15     type: string
16   PortName:
17     description: Name of the port
18     default: ''
19     type: string
20   ControlPlaneIP: # Here for compatability with noop.yaml
21     description: IP address on the control plane
22     default: ''
23     type: string
24   ControlPlaneNetwork:
25     description: The name of the undercloud Neutron control plane
26     default: ctlplane
27     type: string
28   FixedIPs:
29     description: >
30         Control the IP allocation for the VIP port. E.g.
31         [{'ip_address':'1.2.3.4'}]
32     default: []
33     type: json
34
35 resources:
36   VipPort:
37     type: OS::Neutron::Port
38     properties:
39       network: {get_param: NetworkName}
40       name: {get_param: PortName}
41       fixed_ips: {get_param: FixedIPs}
42       replacement_policy: AUTO
43
44 outputs:
45   ip_address:
46     description: Virtual IP network IP
47     value: {get_attr: [VipPort, fixed_ips, 0, ip_address]}
48   ip_address_uri:
49     description: Virtual IP with brackets suitable for a URL
50     value:
51           list_join:
52           - ''
53           - - '['
54             - {get_attr: [VipPort, fixed_ips, 0, ip_address]}
55             - ']'
56   ip_subnet:
57     description: IP/Subnet CIDR for the network associated with this IP
58     value:
59           list_join:
60             - ''
61             - - {get_attr: [VipPort, fixed_ips, 0, ip_address]}
62               - '/'
63               - {str_split: ['/', {get_attr: [VipPort, subnets, 0, cidr]}, 1]}