Merge "Remove deprecated overcloud-resource-registry.yaml"
[apex-tripleo-heat-templates.git] / network / ports / external.yaml
1 heat_template_version: 2015-04-30
2
3 description: >
4   Creates a port on the external network. The IP address will be chosen
5   automatically if FixedIPs is empty.
6
7 parameters:
8   ExternalNetName:
9     description: Name of the external neutron network
10     default: external
11     type: string
12   PortName:
13     description: Name of the port
14     default: ''
15     type: string
16   ControlPlaneIP: # Here for compatibility with noop.yaml
17     description: IP address on the control plane
18     default: ''
19     type: string
20   ControlPlaneNetwork: # Here for compatibility with ctlplane_vip.yaml
21     description: The name of the undercloud Neutron control plane
22     default: ctlplane
23     type: string
24   FixedIPs:
25     description: >
26         Control the IP allocation for the VIP port. E.g.
27         [{'ip_address':'1.2.3.4'}]
28     default: []
29     type: json
30
31 resources:
32
33   ExternalPort:
34     type: OS::Neutron::Port
35     properties:
36       network: {get_param: ExternalNetName}
37       name: {get_param: PortName}
38       fixed_ips: {get_param: FixedIPs}
39       replacement_policy: AUTO
40
41 outputs:
42   ip_address:
43     description: external network IP
44     value: {get_attr: [ExternalPort, fixed_ips, 0, ip_address]}
45   ip_subnet:
46     # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?)
47     description: IP/Subnet CIDR for the external network IP
48     value:
49           list_join:
50             - ''
51             - - {get_attr: [ExternalPort, fixed_ips, 0, ip_address]}
52               - '/'
53               - {get_attr: [ExternalPort, subnets, 0, cidr, -2]}
54               - {get_attr: [ExternalPort, subnets, 0, cidr, -1]}