diff options
Diffstat (limited to 'network/ports')
25 files changed, 625 insertions, 52 deletions
diff --git a/network/ports/ctlplane_vip.yaml b/network/ports/ctlplane_vip.yaml index 7a7043bd..5ac7d344 100644 --- a/network/ports/ctlplane_vip.yaml +++ b/network/ports/ctlplane_vip.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2015-04-30 +heat_template_version: 2015-10-15 description: > Creates a port for a VIP on the undercloud ctlplane network. @@ -45,13 +45,14 @@ outputs: ip_address: description: Virtual IP network IP value: {get_attr: [VipPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: Virtual IP network IP (for compatibility with vip_v6.yaml) + value: {get_attr: [VipPort, fixed_ips, 0, ip_address]} ip_subnet: - # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) description: IP/Subnet CIDR for the ctlplane network. value: list_join: - '' - - {get_attr: [VipPort, fixed_ips, 0, ip_address]} - '/' - - {get_attr: [VipPort, subnets, 0, cidr, -2]} - - {get_attr: [VipPort, subnets, 0, cidr, -1]} + - {str_split: ['/', {get_attr: [VipPort, subnets, 0, cidr]}, 1]} diff --git a/network/ports/external.yaml b/network/ports/external.yaml index 7624eb9f..c4f815fb 100644 --- a/network/ports/external.yaml +++ b/network/ports/external.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2015-04-30 +heat_template_version: 2015-10-15 description: > Creates a port on the external network. The IP address will be chosen @@ -48,13 +48,14 @@ outputs: ip_address: description: external network IP value: {get_attr: [ExternalPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: external network IP (for compatibility with external_v6.yaml) + value: {get_attr: [ExternalPort, fixed_ips, 0, ip_address]} ip_subnet: - # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) description: IP/Subnet CIDR for the external network IP value: list_join: - '' - - {get_attr: [ExternalPort, fixed_ips, 0, ip_address]} - '/' - - {get_attr: [ExternalPort, subnets, 0, cidr, -2]} - - {get_attr: [ExternalPort, subnets, 0, cidr, -1]} + - {str_split: ['/', {get_attr: [ExternalPort, subnets, 0, cidr]}, 1]} diff --git a/network/ports/external_from_pool.yaml b/network/ports/external_from_pool.yaml index 8e9dc7c2..98f2aa35 100644 --- a/network/ports/external_from_pool.yaml +++ b/network/ports/external_from_pool.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2015-04-30 +heat_template_version: 2015-10-15 description: > Returns an IP from a network mapped list of IPs @@ -33,13 +33,14 @@ outputs: ip_address: description: external network IP value: {get_param: [IPPool, {get_param: ExternalNetName}, {get_param: NodeIndex}]} + ip_address_uri: + description: external network IP (for compatibility with IPv6) + value: {get_param: [IPPool, {get_param: ExternalNetName}, {get_param: NodeIndex}]} ip_subnet: - # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) description: IP/Subnet CIDR for the external network IP value: list_join: - '' - - {get_param: [IPPool, {get_param: ExternalNetName}, {get_param: NodeIndex}]} - '/' - - {get_param: [ExternalNetCidr, -2]} - - {get_param: [ExternalNetCidr, -1]} + - {str_split: ['/', {get_param: ExternalNetCidr}, 1]} diff --git a/network/ports/external_v6.yaml b/network/ports/external_v6.yaml new file mode 100644 index 00000000..522caaa0 --- /dev/null +++ b/network/ports/external_v6.yaml @@ -0,0 +1,68 @@ +heat_template_version: 2015-04-30 + +description: > + Creates a port on the external network. The IP address will be chosen + automatically if FixedIPs is empty. + +parameters: + ExternalNetName: + description: Name of the external neutron network + default: external + type: string + PortName: + description: Name of the port + default: '' + type: string + ControlPlaneIP: # Here for compatability with noop.yaml + description: IP address on the control plane + default: '' + type: string + ControlPlaneNetwork: # Here for compatibility with ctlplane_vip.yaml + description: The name of the undercloud Neutron control plane + default: ctlplane + type: string + FixedIPs: + description: > + Control the IP allocation for the VIP port. E.g. + [{'ip_address':'1.2.3.4'}] + default: [] + type: json + IPPool: # Here for compatibility with from_pool.yaml + default: {} + type: json + NodeIndex: # Here for compatibility with from_pool.yaml + default: 0 + type: number + +resources: + + ExternalPort: + type: OS::Neutron::Port + properties: + network: {get_param: ExternalNetName} + name: {get_param: PortName} + fixed_ips: {get_param: FixedIPs} + replacement_policy: AUTO + +outputs: + ip_address: + description: external network IP + value: {get_attr: [ExternalPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: external network IP with brackets suitable for a URL + value: + list_join: + - '' + - - '[' + - {get_attr: [ExternalPort, fixed_ips, 0, ip_address]} + - ']' + ip_subnet: + # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) + description: IP/Subnet CIDR for the external network IP + value: + list_join: + - '' + - - {get_attr: [ExternalPort, fixed_ips, 0, ip_address]} + - '/' + - {get_attr: [ExternalPort, subnets, 0, cidr, -2]} + - {get_attr: [ExternalPort, subnets, 0, cidr, -1]} diff --git a/network/ports/from_service.yaml b/network/ports/from_service.yaml index 6b669f41..359d77a7 100644 --- a/network/ports/from_service.yaml +++ b/network/ports/from_service.yaml @@ -32,3 +32,6 @@ outputs: ip_address: description: network IP value: {get_param: [ServiceVips, {get_param: ServiceName}]} + ip_address_uri: + description: network IP (for compatibility with IPv6) + value: {get_param: [ServiceVips, {get_param: ServiceName}]} diff --git a/network/ports/internal_api.yaml b/network/ports/internal_api.yaml index f84e8f71..1d521a8d 100644 --- a/network/ports/internal_api.yaml +++ b/network/ports/internal_api.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2015-04-30 +heat_template_version: 2015-10-15 description: > Creates a port on the internal_api network. @@ -43,13 +43,15 @@ outputs: ip_address: description: internal API network IP value: {get_attr: [InternalApiPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: | + internal API network IP (for compatibility with internal_api_v6.yaml) + value: {get_attr: [InternalApiPort, fixed_ips, 0, ip_address]} ip_subnet: - # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) description: IP/Subnet CIDR for the internal API network IP value: list_join: - '' - - {get_attr: [InternalApiPort, fixed_ips, 0, ip_address]} - '/' - - {get_attr: [InternalApiPort, subnets, 0, cidr, -2]} - - {get_attr: [InternalApiPort, subnets, 0, cidr, -1]} + - {str_split: ['/', {get_attr: [InternalApiPort, subnets, 0, cidr]}, 1]} diff --git a/network/ports/internal_api_from_pool.yaml b/network/ports/internal_api_from_pool.yaml index b98e1fb1..c7b04847 100644 --- a/network/ports/internal_api_from_pool.yaml +++ b/network/ports/internal_api_from_pool.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2015-04-30 +heat_template_version: 2015-10-15 description: > Returns an IP from a network mapped list of IPs @@ -33,13 +33,14 @@ outputs: ip_address: description: internal API network IP value: {get_param: [IPPool, {get_param: InternalApiNetName}, {get_param: NodeIndex}]} + ip_address_uri: + description: internal API network IP (for compatibility with internal_api_v6.yaml) + value: {get_param: [IPPool, {get_param: InternalApiNetName}, {get_param: NodeIndex}]} ip_subnet: - # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) description: IP/Subnet CIDR for the internal API network IP value: list_join: - '' - - {get_param: [IPPool, {get_param: InternalApiNetName}, {get_param: NodeIndex}]} - '/' - - {get_param: [InternalApiNetCidr, -2]} - - {get_param: [InternalApiNetCidr, -1]} + - {str_split: ['/', {get_param: InternalApiNetCidr}, 1]} diff --git a/network/ports/internal_api_v6.yaml b/network/ports/internal_api_v6.yaml new file mode 100644 index 00000000..279e6bd0 --- /dev/null +++ b/network/ports/internal_api_v6.yaml @@ -0,0 +1,63 @@ +heat_template_version: 2015-04-30 + +description: > + Creates a port on the internal_api network. + +parameters: + InternalApiNetName: + description: Name of the internal API neutron network + default: internal_api + type: string + PortName: + description: Name of the port + default: '' + type: string + ControlPlaneIP: # Here for compatability with noop.yaml + description: IP address on the control plane + default: '' + type: string + FixedIPs: + description: > + Control the IP allocation for the VIP port. E.g. + [{'ip_address':'1.2.3.4'}] + default: [] + type: json + IPPool: # Here for compatibility with from_pool.yaml + default: {} + type: json + NodeIndex: # Here for compatibility with from_pool.yaml + default: 0 + type: number + +resources: + + InternalApiPort: + type: OS::Neutron::Port + properties: + network: {get_param: InternalApiNetName} + name: {get_param: PortName} + fixed_ips: {get_param: FixedIPs} + replacement_policy: AUTO + +outputs: + ip_address: + description: internal API network IP + value: {get_attr: [InternalApiPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: internal api network IP with brackets suitable for a URL + value: + list_join: + - '' + - - '[' + - {get_attr: [InternalApiPort, fixed_ips, 0, ip_address]} + - ']' + ip_subnet: + # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) + description: IP/Subnet CIDR for the internal API network IP + value: + list_join: + - '' + - - {get_attr: [InternalApiPort, fixed_ips, 0, ip_address]} + - '/' + - {get_attr: [InternalApiPort, subnets, 0, cidr, -2]} + - {get_attr: [InternalApiPort, subnets, 0, cidr, -1]} diff --git a/network/ports/management.yaml b/network/ports/management.yaml index 1d15ca60..967b66e1 100644 --- a/network/ports/management.yaml +++ b/network/ports/management.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2015-04-30 +heat_template_version: 2015-10-15 description: > Creates a port on the management network. The IP address will be chosen @@ -16,6 +16,12 @@ parameters: ControlPlaneIP: # Here for compatibility with noop.yaml description: IP address on the control plane type: string + IPPool: # Here for compatibility with from_pool.yaml + default: {} + type: json + NodeIndex: # Here for compatibility with from_pool.yaml + default: 0 + type: number resources: @@ -30,13 +36,14 @@ outputs: ip_address: description: management network IP value: {get_attr: [ManagementPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: management network IP (for compatibility with management_v6.yaml) + value: {get_attr: [ManagementPort, fixed_ips, 0, ip_address]} ip_subnet: - # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) description: IP/Subnet CIDR for the management network IP value: list_join: - '' - - {get_attr: [ManagementPort, fixed_ips, 0, ip_address]} - '/' - - {get_attr: [ManagementPort, subnets, 0, cidr, -2]} - - {get_attr: [ManagementPort, subnets, 0, cidr, -1]} + - {str_split: ['/', {get_attr: [ManagementPort, subnets, 0, cidr]}, 1]} diff --git a/network/ports/management_from_pool.yaml b/network/ports/management_from_pool.yaml new file mode 100644 index 00000000..fc87e39a --- /dev/null +++ b/network/ports/management_from_pool.yaml @@ -0,0 +1,46 @@ +heat_template_version: 2015-04-30 + +description: > + Returns an IP from a network mapped list of IPs + +parameters: + ManagementNetName: + description: Name of the management network + default: management + type: string + PortName: + description: Name of the port + default: '' + type: string + ControlPlaneIP: # Here for compatability with noop.yaml + description: IP address on the control plane + default: '' + type: string + IPPool: + default: {} + description: A network mapped list of IPs + type: json + NodeIndex: + default: 0 + description: Index of the IP to get from Pool + type: number + ManagementNetCidr: + default: '172.16.4.0/24' + description: Cidr for the management network. + type: string + +outputs: + ip_address: + description: management network IP + value: {get_param: [IPPool, {get_param: ManagementNetName}, {get_param: NodeIndex}]} + ip_address_uri: + description: management network IP (for compatibility with management_v6.yaml) + value: {get_param: [IPPool, {get_param: ManagementNetName}, {get_param: NodeIndex}]} + ip_subnet: + description: IP/Subnet CIDR for the management network IP + value: + list_join: + - '' + - - {get_param: [IPPool, {get_param: ManagementNetName}, {get_param: NodeIndex}]} + - '/' + - {str_split: ['/', {get_param: ManagementNetCidr}, 1]} diff --git a/network/ports/management_v6.yaml b/network/ports/management_v6.yaml new file mode 100644 index 00000000..a94ebc7b --- /dev/null +++ b/network/ports/management_v6.yaml @@ -0,0 +1,54 @@ +heat_template_version: 2015-10-15 + +description: > + Creates a port on the management network. The IP address will be chosen + automatically if FixedIPs is empty. + +parameters: + ManagementNetName: + description: Name of the management neutron network + default: management + type: string + PortName: + description: Name of the port + default: '' + type: string + ControlPlaneIP: # Here for compatibility with noop.yaml + description: IP address on the control plane + type: string + IPPool: # Here for compatibility with from_pool.yaml + default: {} + type: json + NodeIndex: # Here for compatibility with from_pool.yaml + default: 0 + type: number + +resources: + + ManagementPort: + type: OS::Neutron::Port + properties: + network: {get_param: ManagementNetName} + name: {get_param: PortName} + replacement_policy: AUTO + +outputs: + ip_address: + description: management network IP + value: {get_attr: [ManagementPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: management network IP with brackets suitable for a URL + value: + list_join: + - '' + - - '[' + - {get_attr: [ManagementPort, fixed_ips, 0, ip_address]} + - ']' + ip_subnet: + description: IP/Subnet CIDR for the management network IP + value: + list_join: + - '' + - - {get_attr: [ManagementPort, fixed_ips, 0, ip_address]} + - '/' + - {str_split: ['/', {get_attr: [ManagementPort, subnets, 0, cidr]}, 1]} diff --git a/network/ports/net_ip_map.yaml b/network/ports/net_ip_map.yaml index c6386025..6bb4557b 100644 --- a/network/ports/net_ip_map.yaml +++ b/network/ports/net_ip_map.yaml @@ -7,21 +7,45 @@ parameters: ExternalIp: default: '' type: string + ExternalIpUri: + default: '' + type: string + description: IP address with brackets in case of IPv6 InternalApiIp: default: '' type: string + InternalApiIpUri: + default: '' + type: string + description: IP address with brackets in case of IPv6 StorageIp: default: '' type: string + StorageIpUri: + default: '' + type: string + description: IP address with brackets in case of IPv6 StorageMgmtIp: default: '' type: string + StorageMgmtIpUri: + default: '' + type: string + description: IP address with brackets in case of IPv6 TenantIp: default: '' type: string + TenantIpUri: + default: '' + type: string + description: IP address with brackets in case of IPv6 ManagementIp: default: '' type: string + ManagementIpUri: + default: '' + type: string + description: IP address with brackets in case of IPv6 outputs: net_ip_map: @@ -36,3 +60,15 @@ outputs: storage_mgmt: {get_param: StorageMgmtIp} tenant: {get_param: TenantIp} management: {get_param: ManagementIp} + net_ip_uri_map: + description: > + A Hash containing a mapping of netowrk names to assigned IPs for a + specific machine with brackets around IPv6 addresses for use in URLs. + value: + ctlplane: {get_param: ControlPlaneIp} + external: {get_param: ExternalIpUri} + internal_api: {get_param: InternalApiIpUri} + storage: {get_param: StorageIpUri} + storage_mgmt: {get_param: StorageMgmtIpUri} + tenant: {get_param: TenantIpUri} + management: {get_param: ManagementIpUri} diff --git a/network/ports/net_vip_map_external.yaml b/network/ports/net_vip_map_external.yaml index 23e1f992..a40a0bfc 100644 --- a/network/ports/net_vip_map_external.yaml +++ b/network/ports/net_vip_map_external.yaml @@ -24,18 +24,33 @@ parameters: ExternalIp: default: '' type: string + ExternalIpUri: + default: '' + type: string InternalApiIp: default: '' type: string + InternalApiIpUri: + default: '' + type: string StorageIp: default: '' type: string + StorageIpUri: + default: '' + type: string StorageMgmtIp: default: '' type: string + StorageMgmtIpUri: + default: '' + type: string TenantIp: default: '' type: string + TenantIpUri: + default: '' + type: string outputs: net_ip_map: @@ -48,3 +63,13 @@ outputs: internal_api: {get_param: InternalApiNetworkVip} storage: {get_param: StorageNetworkVip} storage_mgmt: {get_param: StorageMgmtNetworkVip} + net_ip_uri_map: + description: > + A Hash containing a mapping of netowrk names to assigned IPs for a + specific machine with brackets around IPv6 addresses for use in URLs. + value: + ctlplane: {get_param: ControlPlaneIP} + external: {get_param: ExternalNetworkVip} + internal_api: {get_param: InternalApiNetworkVip} + storage: {get_param: StorageNetworkVip} + storage_mgmt: {get_param: StorageMgmtNetworkVip} diff --git a/network/ports/noop.yaml b/network/ports/noop.yaml index ac946cd9..96c461e0 100644 --- a/network/ports/noop.yaml +++ b/network/ports/noop.yaml @@ -44,6 +44,9 @@ outputs: ip_address: description: pass thru network IP value: {get_param: ControlPlaneIP} + ip_address_uri: + description: pass thru network IP (for compatibility with vip_v6.yaml) + value: {get_param: ControlPlaneIP} ip_subnet: description: IP/Subnet CIDR for the pass thru network IP value: diff --git a/network/ports/storage.yaml b/network/ports/storage.yaml index a07e5a4f..1ed5cca1 100644 --- a/network/ports/storage.yaml +++ b/network/ports/storage.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2015-04-30 +heat_template_version: 2015-10-15 description: > Creates a port on the storage network. @@ -43,13 +43,14 @@ outputs: ip_address: description: storage network IP value: {get_attr: [StoragePort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: storage network IP (for compatibility with storage_v6.yaml) + value: {get_attr: [StoragePort, fixed_ips, 0, ip_address]} ip_subnet: - # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) description: IP/Subnet CIDR for the storage network IP value: list_join: - '' - - {get_attr: [StoragePort, fixed_ips, 0, ip_address]} - '/' - - {get_attr: [StoragePort, subnets, 0, cidr, -2]} - - {get_attr: [StoragePort, subnets, 0, cidr, -1]} + - {str_split: ['/', {get_attr: [StoragePort, subnets, 0, cidr]}, 1]} diff --git a/network/ports/storage_from_pool.yaml b/network/ports/storage_from_pool.yaml index 668bc6f6..dfc9e752 100644 --- a/network/ports/storage_from_pool.yaml +++ b/network/ports/storage_from_pool.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2015-04-30 +heat_template_version: 2015-10-15 description: > Returns an IP from a network mapped list of IPs @@ -33,13 +33,14 @@ outputs: ip_address: description: storage network IP value: {get_param: [IPPool, {get_param: StorageNetName}, {get_param: NodeIndex}]} + ip_address_uri: + description: storage network IP (for compatibility with storage_v6.yaml) + value: {get_param: [IPPool, {get_param: StorageNetName}, {get_param: NodeIndex}]} ip_subnet: - # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) description: IP/Subnet CIDR for the storage network IP value: list_join: - '' - - {get_param: [IPPool, {get_param: StorageNetName}, {get_param: NodeIndex}]} - '/' - - {get_param: [StorageNetCidr, -2]} - - {get_param: [StorageNetCidr, -1]} + - {str_split: ['/', {get_param: StorageNetCidr}, 1]} diff --git a/network/ports/storage_mgmt.yaml b/network/ports/storage_mgmt.yaml index 4890bf5a..548d226a 100644 --- a/network/ports/storage_mgmt.yaml +++ b/network/ports/storage_mgmt.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2015-04-30 +heat_template_version: 2015-10-15 description: > Creates a port on the storage_mgmt API network. @@ -43,13 +43,15 @@ outputs: ip_address: description: storage_mgmt network IP value: {get_attr: [StorageMgmtPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: | + storage_mgmt network IP (for compatibility with storage_mgmt_v6.yaml) + value: {get_attr: [StorageMgmtPort, fixed_ips, 0, ip_address]} ip_subnet: - # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) description: IP/Subnet CIDR for the storage_mgmt network IP value: list_join: - '' - - {get_attr: [StorageMgmtPort, fixed_ips, 0, ip_address]} - '/' - - {get_attr: [StorageMgmtPort, subnets, 0, cidr, -2]} - - {get_attr: [StorageMgmtPort, subnets, 0, cidr, -1]} + - {str_split: ['/', {get_attr: [StorageMgmtPort, subnets, 0, cidr]}, 1]} diff --git a/network/ports/storage_mgmt_from_pool.yaml b/network/ports/storage_mgmt_from_pool.yaml index bea87105..9c757a6e 100644 --- a/network/ports/storage_mgmt_from_pool.yaml +++ b/network/ports/storage_mgmt_from_pool.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2015-04-30 +heat_template_version: 2015-10-15 description: > Returns an IP from a network mapped list of IPs @@ -33,13 +33,14 @@ outputs: ip_address: description: storage MGMT network IP value: {get_param: [IPPool, {get_param: StorageMgmtNetName}, {get_param: NodeIndex}]} + ip_address_uri: + description: storage MGMT network IP (for compatibility with storage_mgmt_v6.yaml) + value: {get_param: [IPPool, {get_param: StorageMgmtNetName}, {get_param: NodeIndex}]} ip_subnet: - # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) description: IP/Subnet CIDR for the storage MGMT network IP value: list_join: - '' - - {get_param: [IPPool, {get_param: StorageMgmtNetName}, {get_param: NodeIndex}]} - '/' - - {get_param: [StorageMgmtNetCidr, -2]} - - {get_param: [StorageMgmtNetCidr, -1]} + - {str_split: ['/', {get_param: StorageMgmtNetCidr}, 1]} diff --git a/network/ports/storage_mgmt_v6.yaml b/network/ports/storage_mgmt_v6.yaml new file mode 100644 index 00000000..61956be2 --- /dev/null +++ b/network/ports/storage_mgmt_v6.yaml @@ -0,0 +1,63 @@ +heat_template_version: 2015-04-30 + +description: > + Creates a port on the storage_mgmt API network. + +parameters: + StorageMgmtNetName: + description: Name of the storage_mgmt API neutron network + default: storage_mgmt + type: string + PortName: + description: Name of the port + default: '' + type: string + ControlPlaneIP: # Here for compatability with noop.yaml + description: IP address on the control plane + default: '' + type: string + FixedIPs: + description: > + Control the IP allocation for the VIP port. E.g. + [{'ip_address':'1.2.3.4'}] + default: [] + type: json + IPPool: # Here for compatibility with from_pool.yaml + default: {} + type: json + NodeIndex: # Here for compatibility with from_pool.yaml + default: 0 + type: number + +resources: + + StorageMgmtPort: + type: OS::Neutron::Port + properties: + network: {get_param: StorageMgmtNetName} + name: {get_param: PortName} + fixed_ips: {get_param: FixedIPs} + replacement_policy: AUTO + +outputs: + ip_address: + description: storage_mgmt network IP + value: {get_attr: [StorageMgmtPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: storage_mgmt network IP with brackets suitable for a URI + value: + list_join: + - '' + - - '[' + - {get_attr: [StorageMgmtPort, fixed_ips, 0, ip_address]} + - ']' + ip_subnet: + # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) + description: IP/Subnet CIDR for the storage_mgmt network IP + value: + list_join: + - '' + - - {get_attr: [StorageMgmtPort, fixed_ips, 0, ip_address]} + - '/' + - {get_attr: [StorageMgmtPort, subnets, 0, cidr, -2]} + - {get_attr: [StorageMgmtPort, subnets, 0, cidr, -1]} diff --git a/network/ports/storage_v6.yaml b/network/ports/storage_v6.yaml new file mode 100644 index 00000000..13b62276 --- /dev/null +++ b/network/ports/storage_v6.yaml @@ -0,0 +1,63 @@ +heat_template_version: 2015-04-30 + +description: > + Creates a port on the storage network. + +parameters: + StorageNetName: + description: Name of the storage neutron network + default: storage + type: string + PortName: + description: Name of the port + default: '' + type: string + ControlPlaneIP: # Here for compatability with noop.yaml + description: IP address on the control plane + default: '' + type: string + FixedIPs: + description: > + Control the IP allocation for the VIP port. E.g. + [{'ip_address':'1.2.3.4'}] + default: [] + type: json + IPPool: # Here for compatibility with from_pool.yaml + default: {} + type: json + NodeIndex: # Here for compatibility with from_pool.yaml + default: 0 + type: number + +resources: + + StoragePort: + type: OS::Neutron::Port + properties: + network: {get_param: StorageNetName} + name: {get_param: PortName} + fixed_ips: {get_param: FixedIPs} + replacement_policy: AUTO + +outputs: + ip_address: + description: storage network IP + value: {get_attr: [StoragePort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: storage network IP with brackets suitable for a URL + value: + list_join: + - '' + - - '[' + - {get_attr: [StoragePort, fixed_ips, 0, ip_address]} + - ']' + ip_subnet: + # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) + description: IP/Subnet CIDR for the storage network IP + value: + list_join: + - '' + - - {get_attr: [StoragePort, fixed_ips, 0, ip_address]} + - '/' + - {get_attr: [StoragePort, subnets, 0, cidr, -2]} + - {get_attr: [StoragePort, subnets, 0, cidr, -1]} diff --git a/network/ports/tenant.yaml b/network/ports/tenant.yaml index 86c58f2f..d8f78c49 100644 --- a/network/ports/tenant.yaml +++ b/network/ports/tenant.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2015-04-30 +heat_template_version: 2015-10-15 description: > Creates a port on the tenant network. @@ -43,13 +43,14 @@ outputs: ip_address: description: tenant network IP value: {get_attr: [TenantPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: tenant network IP (for compatibility with tenant_v6.yaml) + value: {get_attr: [TenantPort, fixed_ips, 0, ip_address]} ip_subnet: - # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) description: IP/Subnet CIDR for the tenant network IP value: list_join: - '' - - {get_attr: [TenantPort, fixed_ips, 0, ip_address]} - '/' - - {get_attr: [TenantPort, subnets, 0, cidr, -2]} - - {get_attr: [TenantPort, subnets, 0, cidr, -1]} + - {str_split: ['/', {get_attr: [TenantPort, subnets, 0, cidr]}, 1]} diff --git a/network/ports/tenant_from_pool.yaml b/network/ports/tenant_from_pool.yaml index 29303bb6..d5f3156e 100644 --- a/network/ports/tenant_from_pool.yaml +++ b/network/ports/tenant_from_pool.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2015-04-30 +heat_template_version: 2015-10-15 description: > Returns an IP from a network mapped list of IPs @@ -33,13 +33,14 @@ outputs: ip_address: description: tenant network IP value: {get_param: [IPPool, {get_param: TenantNetName}, {get_param: NodeIndex}]} + ip_address_uri: + description: tenant network IP (for compatibility with tenant_v6.yaml) + value: {get_param: [IPPool, {get_param: TenantNetName}, {get_param: NodeIndex}]} ip_subnet: - # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) description: IP/Subnet CIDR for the tenant network IP value: list_join: - '' - - {get_param: [IPPool, {get_param: TenantNetName}, {get_param: NodeIndex}]} - '/' - - {get_param: [TenantNetCidr, -2]} - - {get_param: [TenantNetCidr, -1]} + - {str_split: ['/', {get_param: TenantNetCidr}, 1]} diff --git a/network/ports/tenant_v6.yaml b/network/ports/tenant_v6.yaml new file mode 100644 index 00000000..6ca37549 --- /dev/null +++ b/network/ports/tenant_v6.yaml @@ -0,0 +1,63 @@ +heat_template_version: 2015-04-30 + +description: > + Creates a port on the tenant network. + +parameters: + TenantNetName: + description: Name of the tenant neutron network + default: tenant + type: string + PortName: + description: Name of the port + default: '' + type: string + ControlPlaneIP: # Here for compatability with noop.yaml + description: IP address on the control plane + default: '' + type: string + FixedIPs: + description: > + Control the IP allocation for the VIP port. E.g. + [{'ip_address':'1.2.3.4'}] + default: [] + type: json + IPPool: # Here for compatibility with from_pool.yaml + default: {} + type: json + NodeIndex: # Here for compatibility with from_pool.yaml + default: 0 + type: number + +resources: + + TenantPort: + type: OS::Neutron::Port + properties: + network: {get_param: TenantNetName} + name: {get_param: PortName} + fixed_ips: {get_param: FixedIPs} + replacement_policy: AUTO + +outputs: + ip_address: + description: tenant network IP + value: {get_attr: [TenantPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: tenant network IP with brackets suitable for a URL + value: + list_join: + - '' + - - '[' + - {get_attr: [TenantPort, fixed_ips, 0, ip_address]} + - ']' + ip_subnet: + # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) + description: IP/Subnet CIDR for the tenant network IP + value: + list_join: + - '' + - - {get_attr: [TenantPort, fixed_ips, 0, ip_address]} + - '/' + - {get_attr: [TenantPort, subnets, 0, cidr, -2]} + - {get_attr: [TenantPort, subnets, 0, cidr, -1]} diff --git a/network/ports/vip.yaml b/network/ports/vip.yaml index 9bb6cde2..38322907 100644 --- a/network/ports/vip.yaml +++ b/network/ports/vip.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2015-04-30 +heat_template_version: 2015-10-15 description: > Creates a port for a VIP on the isolated network NetworkName. @@ -45,13 +45,14 @@ outputs: ip_address: description: Virtual IP network IP value: {get_attr: [VipPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: Virtual IP network IP (for compatibility with vip.yaml) + value: {get_attr: [VipPort, fixed_ips, 0, ip_address]} ip_subnet: - # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) description: IP/Subnet CIDR for the network associated with this IP value: list_join: - '' - - {get_attr: [VipPort, fixed_ips, 0, ip_address]} - '/' - - {get_attr: [VipPort, subnets, 0, cidr, -2]} - - {get_attr: [VipPort, subnets, 0, cidr, -1]} + - {str_split: ['/', {get_attr: [VipPort, subnets, 0, cidr]}, 1]} diff --git a/network/ports/vip_v6.yaml b/network/ports/vip_v6.yaml new file mode 100644 index 00000000..de927094 --- /dev/null +++ b/network/ports/vip_v6.yaml @@ -0,0 +1,65 @@ +heat_template_version: 2015-04-30 + +description: > + Creates a port for a VIP on the isolated network NetworkName. + The IP address will be chosen automatically if FixedIPs is empty. + +parameters: + ServiceName: # Here for compatibility with from_service.yaml + description: Name of the service to lookup + default: '' + type: string + NetworkName: + description: Name of the network where the VIP will be created + default: internal_api + type: string + PortName: + description: Name of the port + default: '' + type: string + ControlPlaneIP: # Here for compatability with noop.yaml + description: IP address on the control plane + default: '' + type: string + ControlPlaneNetwork: + description: The name of the undercloud Neutron control plane + default: ctlplane + type: string + FixedIPs: + description: > + Control the IP allocation for the VIP port. E.g. + [{'ip_address':'1.2.3.4'}] + default: [] + type: json + +resources: + VipPort: + type: OS::Neutron::Port + properties: + network: {get_param: NetworkName} + name: {get_param: PortName} + fixed_ips: {get_param: FixedIPs} + replacement_policy: AUTO + +outputs: + ip_address: + description: Virtual IP network IP + value: {get_attr: [VipPort, fixed_ips, 0, ip_address]} + ip_address_uri: + description: Virtual IP with brackets suitable for a URL + value: + list_join: + - '' + - - '[' + - {get_attr: [VipPort, fixed_ips, 0, ip_address]} + - ']' + ip_subnet: + # FIXME: this assumes a 2 digit subnet CIDR (need more heat functions?) + description: IP/Subnet CIDR for the network associated with this IP + value: + list_join: + - '' + - - {get_attr: [VipPort, fixed_ips, 0, ip_address]} + - '/' + - {get_attr: [VipPort, subnets, 0, cidr, -2]} + - {get_attr: [VipPort, subnets, 0, cidr, -1]} |