b96fbd0efe090b66325294b5e3f50c5a5b17efe0
[apex-tripleo-heat-templates.git] / network / ports / storage_mgmt.yaml
1 heat_template_version: ocata
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   IPPool: # Here for compatibility with from_pool.yaml
26     default: {}
27     type: json
28   NodeIndex: # Here for compatibility with from_pool.yaml
29     default: 0
30     type: number
31
32 resources:
33
34   StorageMgmtPort:
35     type: OS::Neutron::Port
36     properties:
37       network: {get_param: StorageMgmtNetName}
38       name: {get_param: PortName}
39       fixed_ips: {get_param: FixedIPs}
40       replacement_policy: AUTO
41
42 outputs:
43   ip_address:
44     description: storage_mgmt network IP
45     value: {get_attr: [StorageMgmtPort, fixed_ips, 0, ip_address]}
46   ip_address_uri:
47     description: |
48         storage_mgmt network IP (for compatibility with storage_mgmt_v6.yaml)
49     value: {get_attr: [StorageMgmtPort, fixed_ips, 0, ip_address]}
50   ip_subnet:
51     description: IP/Subnet CIDR for the storage_mgmt network IP
52     value:
53           list_join:
54             - ''
55             - - {get_attr: [StorageMgmtPort, fixed_ips, 0, ip_address]}
56               - '/'
57               - {str_split: ['/', {get_attr: [StorageMgmtPort, subnets, 0, cidr]}, 1]}