35d07ba6a9837d3fd5af15d7c960b3ffbf776645
[apex-tripleo-heat-templates.git] / network / ports / storage.yaml
1 heat_template_version: 2015-04-30
2
3 description: >
4   Creates a port on the storage network.
5
6 parameters:
7   StorageNetName:
8     description: Name of the storage neutron network
9     default: storage
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     type: string
18
19 resources:
20
21   StoragePort:
22     type: OS::Neutron::Port
23     properties:
24       network: {get_param: StorageNetName}
25       name: {get_param: PortName}
26       replacement_policy: AUTO
27
28 outputs:
29   ip_address:
30     description: storage network IP
31     value: {get_attr: [StoragePort, 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 storage network IP
35     value:
36           list_join:
37             - ''
38             - - {get_attr: [StoragePort, fixed_ips, 0, ip_address]}
39               - '/'
40               - {get_attr: [StoragePort, subnets, 0, cidr, -2]}
41               - {get_attr: [StoragePort, subnets, 0, cidr, -1]}
42