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