Merge "Convert JSON generations from bash to python"
[apex-tripleo-heat-templates.git] / network / ports / management.yaml
1 heat_template_version: 2015-04-30
2
3 description: >
4   Creates a port on the management network. The IP address will be chosen
5   automatically if FixedIPs is empty.
6
7 parameters:
8   ManagementNetName:
9     description: Name of the management neutron network
10     default: management
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     type: string
19
20 resources:
21
22   ManagementPort:
23     type: OS::Neutron::Port
24     properties:
25       network: {get_param: ManagementNetName}
26       name: {get_param: PortName}
27       replacement_policy: AUTO
28
29 outputs:
30   ip_address:
31     description: management network IP
32     value: {get_attr: [ManagementPort, fixed_ips, 0, ip_address]}
33   ip_subnet:
34     # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?)
35     description: IP/Subnet CIDR for the management network IP
36     value:
37           list_join:
38             - ''
39             - - {get_attr: [ManagementPort, fixed_ips, 0, ip_address]}
40               - '/'
41               - {get_attr: [ManagementPort, subnets, 0, cidr, -2]}
42               - {get_attr: [ManagementPort, subnets, 0, cidr, -1]}