diff options
Diffstat (limited to 'network/ports')
-rw-r--r-- | network/ports/ctlplane_vip.yaml | 4 | ||||
-rw-r--r-- | network/ports/external.yaml | 6 | ||||
-rw-r--r-- | network/ports/external_from_pool.yaml | 45 | ||||
-rw-r--r-- | network/ports/from_service.yaml | 34 | ||||
-rw-r--r-- | network/ports/internal_api.yaml | 6 | ||||
-rw-r--r-- | network/ports/internal_api_from_pool.yaml | 45 | ||||
-rw-r--r-- | network/ports/management.yaml | 42 | ||||
-rw-r--r-- | network/ports/net_ip_list_map.yaml | 4 | ||||
-rw-r--r-- | network/ports/net_ip_map.yaml | 4 | ||||
-rw-r--r-- | network/ports/net_ip_subnet_map.yaml | 4 | ||||
-rw-r--r-- | network/ports/net_vip_map_external.yaml | 4 | ||||
-rw-r--r-- | network/ports/noop.yaml | 12 | ||||
-rw-r--r-- | network/ports/storage.yaml | 6 | ||||
-rw-r--r-- | network/ports/storage_from_pool.yaml | 45 | ||||
-rw-r--r-- | network/ports/storage_mgmt.yaml | 6 | ||||
-rw-r--r-- | network/ports/storage_mgmt_from_pool.yaml | 45 | ||||
-rw-r--r-- | network/ports/tenant.yaml | 6 | ||||
-rw-r--r-- | network/ports/tenant_from_pool.yaml | 45 | ||||
-rw-r--r-- | network/ports/vip.yaml | 4 |
19 files changed, 365 insertions, 2 deletions
diff --git a/network/ports/ctlplane_vip.yaml b/network/ports/ctlplane_vip.yaml index ab6b18f8..7a7043bd 100644 --- a/network/ports/ctlplane_vip.yaml +++ b/network/ports/ctlplane_vip.yaml @@ -5,6 +5,10 @@ description: > 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: # Here for compatibility with isolated networks default: ctlplane diff --git a/network/ports/external.yaml b/network/ports/external.yaml index 4180a223..7624eb9f 100644 --- a/network/ports/external.yaml +++ b/network/ports/external.yaml @@ -27,6 +27,12 @@ parameters: [{'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: diff --git a/network/ports/external_from_pool.yaml b/network/ports/external_from_pool.yaml new file mode 100644 index 00000000..8e9dc7c2 --- /dev/null +++ b/network/ports/external_from_pool.yaml @@ -0,0 +1,45 @@ +heat_template_version: 2015-04-30 + +description: > + Returns an IP from a network mapped list of IPs + +parameters: + ExternalNetName: + description: Name of the external 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 + 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 + ExternalNetCidr: + default: '10.0.0.0/24' + description: Cidr for the external network. + type: string + +outputs: + ip_address: + description: external network IP + 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]} diff --git a/network/ports/from_service.yaml b/network/ports/from_service.yaml new file mode 100644 index 00000000..6b669f41 --- /dev/null +++ b/network/ports/from_service.yaml @@ -0,0 +1,34 @@ +heat_template_version: 2015-04-30 + +description: > + Returns an IP from a service mapped list of IPs + +parameters: + ServiceName: + description: Name of the service to lookup + default: '' + type: string + NetworkName: # Here for compatability with ctlplane_vip.yaml + description: Name of the network where the VIP will be created + default: ctlplane + type: string + PortName: # Here for compatability with ctlplane_vip.yaml + description: Name of the port + default: '' + type: string + ControlPlaneIP: # Here for compatability with ctlplane_vip.yaml + description: IP address on the control plane + default: '' + type: string + ControlPlaneNetwork: # Here for compatability with ctlplane_vip.yaml + description: The name of the undercloud Neutron control plane + default: ctlplane + type: string + ServiceVips: + default: {} + type: json + +outputs: + ip_address: + description: network IP + value: {get_param: [ServiceVips, {get_param: ServiceName}]} diff --git a/network/ports/internal_api.yaml b/network/ports/internal_api.yaml index 01cdfe9b..f84e8f71 100644 --- a/network/ports/internal_api.yaml +++ b/network/ports/internal_api.yaml @@ -22,6 +22,12 @@ parameters: [{'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: diff --git a/network/ports/internal_api_from_pool.yaml b/network/ports/internal_api_from_pool.yaml new file mode 100644 index 00000000..b98e1fb1 --- /dev/null +++ b/network/ports/internal_api_from_pool.yaml @@ -0,0 +1,45 @@ +heat_template_version: 2015-04-30 + +description: > + Returns an IP from a network mapped list of IPs + +parameters: + InternalApiNetName: + description: Name of the internal API 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 + 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 + InternalApiNetCidr: + default: '172.16.2.0/24' + description: Cidr for the internal API network. + type: string + +outputs: + ip_address: + description: internal API network IP + 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]} diff --git a/network/ports/management.yaml b/network/ports/management.yaml new file mode 100644 index 00000000..1d15ca60 --- /dev/null +++ b/network/ports/management.yaml @@ -0,0 +1,42 @@ +heat_template_version: 2015-04-30 + +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 + +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_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]} diff --git a/network/ports/net_ip_list_map.yaml b/network/ports/net_ip_list_map.yaml index 257d3f9b..32272bd6 100644 --- a/network/ports/net_ip_list_map.yaml +++ b/network/ports/net_ip_list_map.yaml @@ -19,6 +19,9 @@ parameters: TenantIpList: default: [] type: comma_delimited_list + ManagementIpList: + default: [] + type: comma_delimited_list outputs: net_ip_map: @@ -32,3 +35,4 @@ outputs: storage: {get_param: StorageIpList} storage_mgmt: {get_param: StorageMgmtIpList} tenant: {get_param: TenantIpList} + management: {get_param: ManagementIpList} diff --git a/network/ports/net_ip_map.yaml b/network/ports/net_ip_map.yaml index 7aaed160..c6386025 100644 --- a/network/ports/net_ip_map.yaml +++ b/network/ports/net_ip_map.yaml @@ -19,6 +19,9 @@ parameters: TenantIp: default: '' type: string + ManagementIp: + default: '' + type: string outputs: net_ip_map: @@ -32,3 +35,4 @@ outputs: storage: {get_param: StorageIp} storage_mgmt: {get_param: StorageMgmtIp} tenant: {get_param: TenantIp} + management: {get_param: ManagementIp} diff --git a/network/ports/net_ip_subnet_map.yaml b/network/ports/net_ip_subnet_map.yaml index cf59adb3..2f933eaa 100644 --- a/network/ports/net_ip_subnet_map.yaml +++ b/network/ports/net_ip_subnet_map.yaml @@ -19,6 +19,9 @@ parameters: TenantIpSubnet: default: '' type: string + ManagementIpSubnet: + default: '' + type: string ControlPlaneSubnetCidr: # Override this via parameter_defaults default: '24' description: The subnet CIDR of the control plane network. @@ -41,3 +44,4 @@ outputs: storage: {get_param: StorageIpSubnet} storage_mgmt: {get_param: StorageMgmtIpSubnet} tenant: {get_param: TenantIpSubnet} + management: {get_param: ManagementIpSubnet} diff --git a/network/ports/net_vip_map_external.yaml b/network/ports/net_vip_map_external.yaml index 36426b32..23e1f992 100644 --- a/network/ports/net_vip_map_external.yaml +++ b/network/ports/net_vip_map_external.yaml @@ -2,7 +2,7 @@ heat_template_version: 2015-04-30 parameters: # Set these via parameter defaults to configure external VIPs - ControlNetworkVip: + ControlPlaneIP: default: '' type: string ExternalNetworkVip: @@ -43,7 +43,7 @@ outputs: A Hash containing a mapping of network names to assigned IPs for a specific machine. value: - ctlplane: {get_param: ControlNetworkVip} + ctlplane: {get_param: ControlPlaneIP} external: {get_param: ExternalNetworkVip} internal_api: {get_param: InternalApiNetworkVip} storage: {get_param: StorageNetworkVip} diff --git a/network/ports/noop.yaml b/network/ports/noop.yaml index 028624fd..ac946cd9 100644 --- a/network/ports/noop.yaml +++ b/network/ports/noop.yaml @@ -4,6 +4,10 @@ description: > Returns the control plane port (provisioning network) as the ip_address. parameters: + ServiceName: # Here for compatibility with from_service.yaml + description: Name of the service to lookup + default: '' + type: string ControlPlaneIP: description: IP address on the control plane type: string @@ -27,6 +31,14 @@ parameters: default: '24' description: The subnet CIDR of the control plane network. type: string + IPPool: # Here for compatibility with from_pool.yaml + default: {} + description: A network mapped list of IPs + type: json + NodeIndex: # Here for compatibility with from_pool.yaml + default: 0 + description: Index of the IP to get from Pool + type: number outputs: ip_address: diff --git a/network/ports/storage.yaml b/network/ports/storage.yaml index 1d2384c5..a07e5a4f 100644 --- a/network/ports/storage.yaml +++ b/network/ports/storage.yaml @@ -22,6 +22,12 @@ parameters: [{'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: diff --git a/network/ports/storage_from_pool.yaml b/network/ports/storage_from_pool.yaml new file mode 100644 index 00000000..668bc6f6 --- /dev/null +++ b/network/ports/storage_from_pool.yaml @@ -0,0 +1,45 @@ +heat_template_version: 2015-04-30 + +description: > + Returns an IP from a network mapped list of IPs + +parameters: + StorageNetName: + description: Name of the storage 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 + 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 + StorageNetCidr: + default: '172.16.1.0/24' + description: Cidr for the storage network. + type: string + +outputs: + ip_address: + description: storage network IP + 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]} diff --git a/network/ports/storage_mgmt.yaml b/network/ports/storage_mgmt.yaml index f10e3582..4890bf5a 100644 --- a/network/ports/storage_mgmt.yaml +++ b/network/ports/storage_mgmt.yaml @@ -22,6 +22,12 @@ parameters: [{'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: diff --git a/network/ports/storage_mgmt_from_pool.yaml b/network/ports/storage_mgmt_from_pool.yaml new file mode 100644 index 00000000..bea87105 --- /dev/null +++ b/network/ports/storage_mgmt_from_pool.yaml @@ -0,0 +1,45 @@ +heat_template_version: 2015-04-30 + +description: > + Returns an IP from a network mapped list of IPs + +parameters: + StorageMgmtNetName: + description: Name of the storage MGMT 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 + 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 + StorageMgmtNetCidr: + default: '172.16.3.0/24' + description: Cidr for the storage MGMT network. + type: string + +outputs: + ip_address: + description: storage MGMT network IP + 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]} diff --git a/network/ports/tenant.yaml b/network/ports/tenant.yaml index ccdc57ee..86c58f2f 100644 --- a/network/ports/tenant.yaml +++ b/network/ports/tenant.yaml @@ -22,6 +22,12 @@ parameters: [{'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: diff --git a/network/ports/tenant_from_pool.yaml b/network/ports/tenant_from_pool.yaml new file mode 100644 index 00000000..29303bb6 --- /dev/null +++ b/network/ports/tenant_from_pool.yaml @@ -0,0 +1,45 @@ +heat_template_version: 2015-04-30 + +description: > + Returns an IP from a network mapped list of IPs + +parameters: + TenantNetName: + description: Name of the tenant 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 + 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 + TenantNetCidr: + default: '172.16.0.0/24' + description: Cidr for the tenant network. + type: string + +outputs: + ip_address: + description: tenant network IP + 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]} diff --git a/network/ports/vip.yaml b/network/ports/vip.yaml index ab6cd2c0..9bb6cde2 100644 --- a/network/ports/vip.yaml +++ b/network/ports/vip.yaml @@ -5,6 +5,10 @@ description: > 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 |