Add update yaml backward compatibe with PublicVirtualIP on ctlplane
[apex-tripleo-heat-templates.git] / network / ports / storage_mgmt.yaml
1 heat_template_version: 2015-04-30
2
3 description: >
4   Creates a port on the storage_mgmt API network.
5
6 parameters:
7   StorageMgmtNetName:
8     description: Name of the storage_mgmt API neutron network
9     default: storage_mgmt
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   StorageMgmtPort:
29     type: OS::Neutron::Port
30     properties:
31       network: {get_param: StorageMgmtNetName}
32       name: {get_param: PortName}
33       fixed_ips: {get_param: FixedIPs}
34       replacement_policy: AUTO
35
36 outputs:
37   ip_address:
38     description: storage_mgmt network IP
39     value: {get_attr: [StorageMgmtPort, 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 storage_mgmt network IP
43     value:
44           list_join:
45             - ''
46             - - {get_attr: [StorageMgmtPort, fixed_ips, 0, ip_address]}
47               - '/'
48               - {get_attr: [StorageMgmtPort, subnets, 0, cidr, -2]}
49               - {get_attr: [StorageMgmtPort, subnets, 0, cidr, -1]}