Merge "Make CephStorageDeployment depend on NetworkDeployment"
[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.
5
6 parameters:
7   ExternalNetName:
8     description: Name of the external neutron network
9     default: external
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   ExternalPort:
22     type: OS::Neutron::Port
23     properties:
24       network: {get_param: ExternalNetName}
25       name: {get_param: PortName}
26       replacement_policy: AUTO
27
28 outputs:
29   ip_address:
30     description: external network IP
31     value: {get_attr: [ExternalPort, 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 external network IP
35     value:
36           list_join:
37             - ''
38             - - {get_attr: [ExternalPort, fixed_ips, 0, ip_address]}
39               - '/'
40               - {get_attr: [ExternalPort, subnets, 0, cidr, -2]}
41               - {get_attr: [ExternalPort, subnets, 0, cidr, -1]}