From f5f655379725ed72cbc00005be3417fde82a1953 Mon Sep 17 00:00:00 2001 From: Dan Sneddon Date: Thu, 7 Jun 2018 03:36:18 -0700 Subject: [PATCH] Add per-network routes to NIC templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change adds a new {{network.name}}InterfaceRoutes parameter to network config templates. It takes a list of routes i.e: [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] Co-Authored-By: Harald Jensås Partial: blueprint tripleo-routed-networks-templates Depends-On: Ifc5aad7a154c33488a7613c8ee038c92ee6cb1a7 Change-Id: I90aea46d3addab9792c7c9d4feff5c5f61520b9b --- .../net-config-multinode-os-net-config.yaml | 112 +++++++++++++----- ci/common/net-config-multinode.yaml | 104 +++++++++++----- ci/common/net-config-simple-bridge.yaml | 52 ++++++++ .../nic-configs/ceph-storage.yaml | 48 ++++++++ .../nic-configs/cinder-storage.yaml | 48 ++++++++ .../nic-configs/compute.yaml | 48 ++++++++ .../nic-configs/controller.yaml | 48 ++++++++ .../nic-configs/swift-storage.yaml | 48 ++++++++ .../nic-configs/ceph-storage.yaml | 48 ++++++++ .../nic-configs/cinder-storage.yaml | 48 ++++++++ .../multiple-nics/nic-configs/compute.yaml | 48 ++++++++ .../multiple-nics/nic-configs/controller.yaml | 48 ++++++++ .../nic-configs/swift-storage.yaml | 48 ++++++++ .../public-bond/nic-configs/ceph-storage.yaml | 48 ++++++++ .../nic-configs/cinder-storage.yaml | 48 ++++++++ .../public-bond/nic-configs/compute.yaml | 48 ++++++++ .../public-bond/nic-configs/controller.yaml | 48 ++++++++ .../nic-configs/swift-storage.yaml | 48 ++++++++ net-config-bridge.j2.yaml | 8 ++ net-config-linux-bridge.j2.yaml | 8 ++ net-config-noop.j2.yaml | 8 ++ net-config-standalone.j2.yaml | 8 ++ ...g-static-bridge-with-external-dhcp.j2.yaml | 8 ++ net-config-static-bridge.j2.yaml | 8 ++ net-config-static.j2.yaml | 8 ++ net-config-undercloud.j2.yaml | 8 ++ .../controller-no-external.j2.yaml | 37 ++++-- .../bond-with-vlans/controller-v6.j2.yaml | 46 +++++-- .../config/bond-with-vlans/role.role.j2.yaml | 46 ++++--- .../config/multiple-nics/compute-dvr.j2.yaml | 31 +++-- .../multiple-nics/controller-v6.j2.yaml | 43 +++++-- .../config/multiple-nics/role.role.j2.yaml | 20 +++- .../controller-v6.j2.yaml | 46 +++++-- .../role.role.j2.yaml | 20 +++- .../controller-no-external.j2.yaml | 12 +- .../single-nic-vlans/controller-v6.j2.yaml | 46 +++++-- .../config/single-nic-vlans/role.role.j2.yaml | 20 +++- ...outes-in-nic-configs-1628993fcaf6095c.yaml | 8 ++ 38 files changed, 1270 insertions(+), 157 deletions(-) create mode 100644 releasenotes/notes/add-interface-routes-in-nic-configs-1628993fcaf6095c.yaml diff --git a/ci/common/net-config-multinode-os-net-config.yaml b/ci/common/net-config-multinode-os-net-config.yaml index 986a7dc97f..e5d51e60df 100644 --- a/ci/common/net-config-multinode-os-net-config.yaml +++ b/ci/common/net-config-multinode-os-net-config.yaml @@ -9,34 +9,6 @@ parameters: default: '' description: IP address/subnet on the ctlplane network type: string - ExternalIpSubnet: - default: '' - description: IP address/subnet on the external network - type: string - InternalApiIpSubnet: - default: '' - description: IP address/subnet on the internal_api network - type: string - StorageIpSubnet: - default: '' - description: IP address/subnet on the storage network - type: string - StorageMgmtIpSubnet: - default: '' - description: IP address/subnet on the storage_mgmt network - type: string - StorageNFSIpSubnet: - default: '' - description: IP address/subnet on the storage_nfs network - type: string - TenantIpSubnet: - default: '' - description: IP address/subnet on the tenant network - type: string - ManagementIpSubnet: - default: '' - description: IP address/subnet on the management network - type: string ControlPlaneSubnetCidr: default: '' description: > @@ -48,6 +20,90 @@ parameters: description: The default route of the control plane network. (The parameter is automatically resolved from the ctlplane subnet's gateway_ip attribute.) type: string + ExternalIpSubnet: + default: '' + description: IP address/subnet on the external network + type: string + ExternalInterfaceRoutes: + default: [] + description: > + Routes for the external network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json + InternalApiIpSubnet: + default: '' + description: IP address/subnet on the internal_api network + type: string + InternalApiInterfaceRoutes: + default: [] + description: > + Routes for the internal_api network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json + StorageIpSubnet: + default: '' + description: IP address/subnet on the storage network + type: string + StorageInterfaceRoutes: + default: [] + description: > + Routes for the storage network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json + StorageMgmtIpSubnet: + default: '' + description: IP address/subnet on the storage_mgmt network + type: string + StorageMgmtInterfaceRoutes: + default: [] + description: > + Routes for the storage_mgmt network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json + StorageNFSIpSubnet: + default: '' + description: IP address/subnet on the storage_nfs network + type: string + StorageNFSRoutes: + default: [] + description: > + Routes for the storage_nfs network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json + TenantIpSubnet: + default: '' + description: IP address/subnet on the tenant network + type: string + TenantInterfaceRoutes: + default: [] + description: > + Routes for the tenant network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json + ManagementIpSubnet: + default: '' + description: IP address/subnet on the management network + type: string + ManagementInterfaceRoutes: + default: [] + description: > + Routes for the management network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json OvSBridgeMtu: default: 1300 description: The mtu of the OvS bridge diff --git a/ci/common/net-config-multinode.yaml b/ci/common/net-config-multinode.yaml index 5ade5b1047..97b668a544 100644 --- a/ci/common/net-config-multinode.yaml +++ b/ci/common/net-config-multinode.yaml @@ -9,34 +9,6 @@ parameters: default: '' description: IP address/subnet on the ctlplane network type: string - ExternalIpSubnet: - default: '' - description: IP address/subnet on the external network - type: string - InternalApiIpSubnet: - default: '' - description: IP address/subnet on the internal_api network - type: string - StorageIpSubnet: - default: '' - description: IP address/subnet on the storage network - type: string - StorageMgmtIpSubnet: - default: '' - description: IP address/subnet on the storage_mgmt network - type: string - StorageNFSIpSubnet: - default: '' - description: IP address/subnet on the storage_nfs network - type: string - TenantIpSubnet: - default: '' - description: IP address/subnet on the tenant network - type: string - ManagementIpSubnet: - default: '' - description: IP address/subnet on the management network - type: string ControlPlaneSubnetCidr: default: '' description: > @@ -48,6 +20,82 @@ parameters: description: The default route of the control plane network. (The parameter is automatically resolved from the ctlplane subnet's gateway_ip attribute.) type: string + ExternalIpSubnet: + default: '' + description: IP address/subnet on the external network + type: string + ExternalInterfaceRoutes: + default: [] + description: > + Routes for the external network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json + InternalApiIpSubnet: + default: '' + description: IP address/subnet on the internal_api network + type: string + InternalApiInterfaceRoutes: + default: [] + description: > + Routes for the internal_api network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json + StorageIpSubnet: + default: '' + description: IP address/subnet on the storage network + type: string + StorageInterfaceRoutes: + default: [] + description: > + Routes for the storage network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json + StorageMgmtIpSubnet: + default: '' + description: IP address/subnet on the storage_mgmt network + type: string + StorageMgmtInterfaceRoutes: + default: [] + description: > + Routes for the storage_mgmt network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json + StorageNFSIpSubnet: + default: '' + description: IP address/subnet on the storage_nfs network + type: string + TenantIpSubnet: + default: '' + description: IP address/subnet on the tenant network + type: string + TenantInterfaceRoutes: + default: [] + description: > + Routes for the tenant network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json + ManagementIpSubnet: + default: '' + description: IP address/subnet on the management network + type: string + ManagementInterfaceRoutes: + default: [] + description: > + Routes for the management network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json DnsServers: # Override this via parameter_defaults default: [] description: > diff --git a/ci/common/net-config-simple-bridge.yaml b/ci/common/net-config-simple-bridge.yaml index 62cb973290..762f52f7bc 100644 --- a/ci/common/net-config-simple-bridge.yaml +++ b/ci/common/net-config-simple-bridge.yaml @@ -21,26 +21,78 @@ parameters: default: '' description: IP address/subnet on the external network type: string + ExternalInterfaceRoutes: + default: [] + description: > + Routes for the external network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json InternalApiIpSubnet: default: '' description: IP address/subnet on the internal_api network type: string + InternalApiInterfaceRoutes: + default: [] + description: > + Routes for the internal_api network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageIpSubnet: default: '' description: IP address/subnet on the storage network type: string + StorageInterfaceRoutes: + default: [] + description: > + Routes for the storage network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageMgmtIpSubnet: default: '' description: IP address/subnet on the storage_mgmt network type: string + StorageMgmtInterfaceRoutes: + default: [] + description: > + Routes for the storage_mgmt network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json + StorageNFSIpSubnet: + default: '' + description: IP address/subnet on the storage_nfs network + type: string TenantIpSubnet: default: '' description: IP address/subnet on the tenant network type: string + TenantInterfaceRoutes: + default: [] + description: > + Routes for the tenant network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json ManagementIpSubnet: default: '' description: IP address/subnet on the management network type: string + ManagementInterfaceRoutes: + default: [] + description: > + Routes for the management network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json DnsServers: # Override this via parameter_defaults default: [] description: > diff --git a/ci/environments/network/multiple-nics-ipv6/nic-configs/ceph-storage.yaml b/ci/environments/network/multiple-nics-ipv6/nic-configs/ceph-storage.yaml index ece799aa33..c42b8b9817 100644 --- a/ci/environments/network/multiple-nics-ipv6/nic-configs/ceph-storage.yaml +++ b/ci/environments/network/multiple-nics-ipv6/nic-configs/ceph-storage.yaml @@ -9,26 +9,74 @@ parameters: default: '' description: IP address/subnet on the external network type: string + ExternalInterfaceRoutes: + default: [] + description: > + Routes for the external network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json InternalApiIpSubnet: default: '' description: IP address/subnet on the internal_api network type: string + InternalApiInterfaceRoutes: + default: [] + description: > + Routes for the internal_api network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageIpSubnet: default: '' description: IP address/subnet on the storage network type: string + StorageInterfaceRoutes: + default: [] + description: > + Routes for the storage network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageMgmtIpSubnet: default: '' description: IP address/subnet on the storage_mgmt network type: string + StorageMgmtInterfaceRoutes: + default: [] + description: > + Routes for the storage_mgmt network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json TenantIpSubnet: default: '' description: IP address/subnet on the tenant network type: string + TenantInterfaceRoutes: + default: [] + description: > + Routes for the tenant network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json ManagementIpSubnet: # Only populated when including environments/network-management.yaml default: '' description: IP address/subnet on the management network type: string + ManagementInterfaceRoutes: + default: [] + description: > + Routes for the management network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json BondInterfaceOvsOptions: default: 'bond_mode=active-backup' description: The ovs_options string for the bond interface. Set things like diff --git a/ci/environments/network/multiple-nics-ipv6/nic-configs/cinder-storage.yaml b/ci/environments/network/multiple-nics-ipv6/nic-configs/cinder-storage.yaml index 4e44cf31ec..5bf8dd253b 100644 --- a/ci/environments/network/multiple-nics-ipv6/nic-configs/cinder-storage.yaml +++ b/ci/environments/network/multiple-nics-ipv6/nic-configs/cinder-storage.yaml @@ -9,26 +9,74 @@ parameters: default: '' description: IP address/subnet on the external network type: string + ExternalInterfaceRoutes: + default: [] + description: > + Routes for the external network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json InternalApiIpSubnet: default: '' description: IP address/subnet on the internal_api network type: string + InternalApiInterfaceRoutes: + default: [] + description: > + Routes for the internal_api network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageIpSubnet: default: '' description: IP address/subnet on the storage network type: string + StorageInterfaceRoutes: + default: [] + description: > + Routes for the storage network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageMgmtIpSubnet: default: '' description: IP address/subnet on the storage_mgmt network type: string + StorageMgmtInterfaceRoutes: + default: [] + description: > + Routes for the storage_mgmt network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json TenantIpSubnet: default: '' description: IP address/subnet on the tenant network type: string + TenantInterfaceRoutes: + default: [] + description: > + Routes for the tenant network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json ManagementIpSubnet: # Only populated when including environments/network-management.yaml default: '' description: IP address/subnet on the management network type: string + ManagementInterfaceRoutes: + default: [] + description: > + Routes for the management network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json BondInterfaceOvsOptions: default: 'bond_mode=active-backup' description: The ovs_options string for the bond interface. Set things like diff --git a/ci/environments/network/multiple-nics-ipv6/nic-configs/compute.yaml b/ci/environments/network/multiple-nics-ipv6/nic-configs/compute.yaml index 6893c4e642..4236212ff8 100644 --- a/ci/environments/network/multiple-nics-ipv6/nic-configs/compute.yaml +++ b/ci/environments/network/multiple-nics-ipv6/nic-configs/compute.yaml @@ -9,26 +9,74 @@ parameters: default: '' description: IP address/subnet on the external network type: string + ExternalInterfaceRoutes: + default: [] + description: > + Routes for the external network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json InternalApiIpSubnet: default: '' description: IP address/subnet on the internal_api network type: string + InternalApiInterfaceRoutes: + default: [] + description: > + Routes for the internal_api network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageIpSubnet: default: '' description: IP address/subnet on the storage network type: string + StorageInterfaceRoutes: + default: [] + description: > + Routes for the storage network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageMgmtIpSubnet: default: '' description: IP address/subnet on the storage_mgmt network type: string + StorageMgmtInterfaceRoutes: + default: [] + description: > + Routes for the storage_mgmt network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json TenantIpSubnet: default: '' description: IP address/subnet on the tenant network type: string + TenantInterfaceRoutes: + default: [] + description: > + Routes for the tenant network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json ManagementIpSubnet: # Only populated when including environments/network-management.yaml default: '' description: IP address/subnet on the management network type: string + ManagementInterfaceRoutes: + default: [] + description: > + Routes for the management network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json BondInterfaceOvsOptions: default: 'bond_mode=active-backup' description: The ovs_options string for the bond interface. Set things like diff --git a/ci/environments/network/multiple-nics-ipv6/nic-configs/controller.yaml b/ci/environments/network/multiple-nics-ipv6/nic-configs/controller.yaml index 4a96dddbad..0105cbc3eb 100644 --- a/ci/environments/network/multiple-nics-ipv6/nic-configs/controller.yaml +++ b/ci/environments/network/multiple-nics-ipv6/nic-configs/controller.yaml @@ -9,26 +9,74 @@ parameters: default: '' description: IP address/subnet on the external network type: string + ExternalInterfaceRoutes: + default: [] + description: > + Routes for the external network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json InternalApiIpSubnet: default: '' description: IP address/subnet on the internal_api network type: string + InternalApiInterfaceRoutes: + default: [] + description: > + Routes for the internal_api network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageIpSubnet: default: '' description: IP address/subnet on the storage network type: string + StorageInterfaceRoutes: + default: [] + description: > + Routes for the storage network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageMgmtIpSubnet: default: '' description: IP address/subnet on the storage_mgmt network type: string + StorageMgmtInterfaceRoutes: + default: [] + description: > + Routes for the storage_mgmt network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json TenantIpSubnet: default: '' description: IP address/subnet on the tenant network type: string + TenantInterfaceRoutes: + default: [] + description: > + Routes for the tenant network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json ManagementIpSubnet: # Only populated when including environments/network-management.yaml default: '' description: IP address/subnet on the management network type: string + ManagementInterfaceRoutes: + default: [] + description: > + Routes for the management network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json BondInterfaceOvsOptions: default: 'bond_mode=active-backup' description: The ovs_options string for the bond interface. Set things like diff --git a/ci/environments/network/multiple-nics-ipv6/nic-configs/swift-storage.yaml b/ci/environments/network/multiple-nics-ipv6/nic-configs/swift-storage.yaml index 4e44cf31ec..5bf8dd253b 100644 --- a/ci/environments/network/multiple-nics-ipv6/nic-configs/swift-storage.yaml +++ b/ci/environments/network/multiple-nics-ipv6/nic-configs/swift-storage.yaml @@ -9,26 +9,74 @@ parameters: default: '' description: IP address/subnet on the external network type: string + ExternalInterfaceRoutes: + default: [] + description: > + Routes for the external network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json InternalApiIpSubnet: default: '' description: IP address/subnet on the internal_api network type: string + InternalApiInterfaceRoutes: + default: [] + description: > + Routes for the internal_api network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageIpSubnet: default: '' description: IP address/subnet on the storage network type: string + StorageInterfaceRoutes: + default: [] + description: > + Routes for the storage network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageMgmtIpSubnet: default: '' description: IP address/subnet on the storage_mgmt network type: string + StorageMgmtInterfaceRoutes: + default: [] + description: > + Routes for the storage_mgmt network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json TenantIpSubnet: default: '' description: IP address/subnet on the tenant network type: string + TenantInterfaceRoutes: + default: [] + description: > + Routes for the tenant network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json ManagementIpSubnet: # Only populated when including environments/network-management.yaml default: '' description: IP address/subnet on the management network type: string + ManagementInterfaceRoutes: + default: [] + description: > + Routes for the management network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json BondInterfaceOvsOptions: default: 'bond_mode=active-backup' description: The ovs_options string for the bond interface. Set things like diff --git a/ci/environments/network/multiple-nics/nic-configs/ceph-storage.yaml b/ci/environments/network/multiple-nics/nic-configs/ceph-storage.yaml index 8e5755865f..0da7d3b8bd 100644 --- a/ci/environments/network/multiple-nics/nic-configs/ceph-storage.yaml +++ b/ci/environments/network/multiple-nics/nic-configs/ceph-storage.yaml @@ -9,26 +9,74 @@ parameters: default: '' description: IP address/subnet on the external network type: string + ExternalInterfaceRoutes: + default: [] + description: > + Routes for the external network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json InternalApiIpSubnet: default: '' description: IP address/subnet on the internal_api network type: string + InternalApiInterfaceRoutes: + default: [] + description: > + Routes for the internal_api network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageIpSubnet: default: '' description: IP address/subnet on the storage network type: string + StorageInterfaceRoutes: + default: [] + description: > + Routes for the storage network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageMgmtIpSubnet: default: '' description: IP address/subnet on the storage_mgmt network type: string + StorageMgmtInterfaceRoutes: + default: [] + description: > + Routes for the storage_mgmt network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json TenantIpSubnet: default: '' description: IP address/subnet on the tenant network type: string + TenantInterfaceRoutes: + default: [] + description: > + Routes for the tenant network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json ManagementIpSubnet: # Only populated when including environments/network-management.yaml default: '' description: IP address/subnet on the management network type: string + ManagementInterfaceRoutes: + default: [] + description: > + Routes for the management network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json BondInterfaceOvsOptions: default: 'bond_mode=active-backup' description: The ovs_options string for the bond interface. Set things like diff --git a/ci/environments/network/multiple-nics/nic-configs/cinder-storage.yaml b/ci/environments/network/multiple-nics/nic-configs/cinder-storage.yaml index ad8e651554..ef40277560 100644 --- a/ci/environments/network/multiple-nics/nic-configs/cinder-storage.yaml +++ b/ci/environments/network/multiple-nics/nic-configs/cinder-storage.yaml @@ -9,26 +9,74 @@ parameters: default: '' description: IP address/subnet on the external network type: string + ExternalInterfaceRoutes: + default: [] + description: > + Routes for the external network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json InternalApiIpSubnet: default: '' description: IP address/subnet on the internal_api network type: string + InternalApiInterfaceRoutes: + default: [] + description: > + Routes for the internal_api network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageIpSubnet: default: '' description: IP address/subnet on the storage network type: string + StorageInterfaceRoutes: + default: [] + description: > + Routes for the storage network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageMgmtIpSubnet: default: '' description: IP address/subnet on the storage_mgmt network type: string + StorageMgmtInterfaceRoutes: + default: [] + description: > + Routes for the storage_mgmt network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json TenantIpSubnet: default: '' description: IP address/subnet on the tenant network type: string + TenantInterfaceRoutes: + default: [] + description: > + Routes for the tenant network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json ManagementIpSubnet: # Only populated when including environments/network-management.yaml default: '' description: IP address/subnet on the management network type: string + ManagementInterfaceRoutes: + default: [] + description: > + Routes for the management network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json BondInterfaceOvsOptions: default: 'bond_mode=active-backup' description: The ovs_options string for the bond interface. Set things like diff --git a/ci/environments/network/multiple-nics/nic-configs/compute.yaml b/ci/environments/network/multiple-nics/nic-configs/compute.yaml index 9f4f4c7e18..fcd8f8fe51 100644 --- a/ci/environments/network/multiple-nics/nic-configs/compute.yaml +++ b/ci/environments/network/multiple-nics/nic-configs/compute.yaml @@ -9,26 +9,74 @@ parameters: default: '' description: IP address/subnet on the external network type: string + ExternalInterfaceRoutes: + default: [] + description: > + Routes for the external network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json InternalApiIpSubnet: default: '' description: IP address/subnet on the internal_api network type: string + InternalApiInterfaceRoutes: + default: [] + description: > + Routes for the internal_api network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageIpSubnet: default: '' description: IP address/subnet on the storage network type: string + StorageInterfaceRoutes: + default: [] + description: > + Routes for the storage network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageMgmtIpSubnet: default: '' description: IP address/subnet on the storage_mgmt network type: string + StorageMgmtInterfaceRoutes: + default: [] + description: > + Routes for the storage_mgmt network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json TenantIpSubnet: default: '' description: IP address/subnet on the tenant network type: string + TenantInterfaceRoutes: + default: [] + description: > + Routes for the tenant network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json ManagementIpSubnet: # Only populated when including environments/network-management.yaml default: '' description: IP address/subnet on the management network type: string + ManagementInterfaceRoutes: + default: [] + description: > + Routes for the management network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json BondInterfaceOvsOptions: default: 'bond_mode=active-backup' description: The ovs_options string for the bond interface. Set things like diff --git a/ci/environments/network/multiple-nics/nic-configs/controller.yaml b/ci/environments/network/multiple-nics/nic-configs/controller.yaml index 36d83f314a..18a977102e 100644 --- a/ci/environments/network/multiple-nics/nic-configs/controller.yaml +++ b/ci/environments/network/multiple-nics/nic-configs/controller.yaml @@ -9,26 +9,74 @@ parameters: default: '' description: IP address/subnet on the external network type: string + ExternalInterfaceRoutes: + default: [] + description: > + Routes for the external network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json InternalApiIpSubnet: default: '' description: IP address/subnet on the internal_api network type: string + InternalApiInterfaceRoutes: + default: [] + description: > + Routes for the internal_api network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageIpSubnet: default: '' description: IP address/subnet on the storage network type: string + StorageInterfaceRoutes: + default: [] + description: > + Routes for the storage network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageMgmtIpSubnet: default: '' description: IP address/subnet on the storage_mgmt network type: string + StorageMgmtInterfaceRoutes: + default: [] + description: > + Routes for the storage_mgmt network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json TenantIpSubnet: default: '' description: IP address/subnet on the tenant network type: string + TenantInterfaceRoutes: + default: [] + description: > + Routes for the tenant network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json ManagementIpSubnet: # Only populated when including environments/network-management.yaml default: '' description: IP address/subnet on the management network type: string + ManagementInterfaceRoutes: + default: [] + description: > + Routes for the management network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json BondInterfaceOvsOptions: default: 'bond_mode=active-backup' description: The ovs_options string for the bond interface. Set things like diff --git a/ci/environments/network/multiple-nics/nic-configs/swift-storage.yaml b/ci/environments/network/multiple-nics/nic-configs/swift-storage.yaml index ad8e651554..ef40277560 100644 --- a/ci/environments/network/multiple-nics/nic-configs/swift-storage.yaml +++ b/ci/environments/network/multiple-nics/nic-configs/swift-storage.yaml @@ -9,26 +9,74 @@ parameters: default: '' description: IP address/subnet on the external network type: string + ExternalInterfaceRoutes: + default: [] + description: > + Routes for the external network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json InternalApiIpSubnet: default: '' description: IP address/subnet on the internal_api network type: string + InternalApiInterfaceRoutes: + default: [] + description: > + Routes for the internal_api network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageIpSubnet: default: '' description: IP address/subnet on the storage network type: string + StorageInterfaceRoutes: + default: [] + description: > + Routes for the storage network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageMgmtIpSubnet: default: '' description: IP address/subnet on the storage_mgmt network type: string + StorageMgmtInterfaceRoutes: + default: [] + description: > + Routes for the storage_mgmt network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json TenantIpSubnet: default: '' description: IP address/subnet on the tenant network type: string + TenantInterfaceRoutes: + default: [] + description: > + Routes for the tenant network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json ManagementIpSubnet: # Only populated when including environments/network-management.yaml default: '' description: IP address/subnet on the management network type: string + ManagementInterfaceRoutes: + default: [] + description: > + Routes for the management network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json BondInterfaceOvsOptions: default: 'bond_mode=active-backup' description: The ovs_options string for the bond interface. Set things like diff --git a/ci/environments/network/public-bond/nic-configs/ceph-storage.yaml b/ci/environments/network/public-bond/nic-configs/ceph-storage.yaml index fddc89298e..b31b917c75 100644 --- a/ci/environments/network/public-bond/nic-configs/ceph-storage.yaml +++ b/ci/environments/network/public-bond/nic-configs/ceph-storage.yaml @@ -9,26 +9,74 @@ parameters: default: '' description: IP address/subnet on the external network type: string + ExternalInterfaceRoutes: + default: [] + description: > + Routes for the external network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json InternalApiIpSubnet: default: '' description: IP address/subnet on the internal_api network type: string + InternalApiInterfaceRoutes: + default: [] + description: > + Routes for the internal_api network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageIpSubnet: default: '' description: IP address/subnet on the storage network type: string + StorageInterfaceRoutes: + default: [] + description: > + Routes for the storage network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageMgmtIpSubnet: default: '' description: IP address/subnet on the storage_mgmt network type: string + StorageMgmtInterfaceRoutes: + default: [] + description: > + Routes for the storage_mgmt network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json TenantIpSubnet: default: '' description: IP address/subnet on the tenant network type: string + TenantInterfaceRoutes: + default: [] + description: > + Routes for the tenant network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json ManagementIpSubnet: # Only populated when including environments/network-management.yaml default: '' description: IP address/subnet on the management network type: string + ManagementInterfaceRoutes: + default: [] + description: > + Routes for the management network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json BondInterfaceOvsOptions: default: 'bond_mode=active-backup' description: The ovs_options string for the bond interface. Set things like diff --git a/ci/environments/network/public-bond/nic-configs/cinder-storage.yaml b/ci/environments/network/public-bond/nic-configs/cinder-storage.yaml index d276e67eb7..73a7d4e50f 100644 --- a/ci/environments/network/public-bond/nic-configs/cinder-storage.yaml +++ b/ci/environments/network/public-bond/nic-configs/cinder-storage.yaml @@ -9,26 +9,74 @@ parameters: default: '' description: IP address/subnet on the external network type: string + ExternalInterfaceRoutes: + default: [] + description: > + Routes for the external network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json InternalApiIpSubnet: default: '' description: IP address/subnet on the internal_api network type: string + InternalApiInterfaceRoutes: + default: [] + description: > + Routes for the internal_api network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageIpSubnet: default: '' description: IP address/subnet on the storage network type: string + StorageInterfaceRoutes: + default: [] + description: > + Routes for the storage network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageMgmtIpSubnet: default: '' description: IP address/subnet on the storage_mgmt network type: string + StorageMgmtInterfaceRoutes: + default: [] + description: > + Routes for the storage_mgmt network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json TenantIpSubnet: default: '' description: IP address/subnet on the tenant network type: string + TenantInterfaceRoutes: + default: [] + description: > + Routes for the tenant network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json ManagementIpSubnet: # Only populated when including environments/network-management.yaml default: '' description: IP address/subnet on the management network type: string + ManagementInterfaceRoutes: + default: [] + description: > + Routes for the management network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json BondInterfaceOvsOptions: default: 'bond_mode=active-backup' description: The ovs_options string for the bond interface. Set things like diff --git a/ci/environments/network/public-bond/nic-configs/compute.yaml b/ci/environments/network/public-bond/nic-configs/compute.yaml index a6a54fe435..0e894cbfed 100644 --- a/ci/environments/network/public-bond/nic-configs/compute.yaml +++ b/ci/environments/network/public-bond/nic-configs/compute.yaml @@ -9,26 +9,74 @@ parameters: default: '' description: IP address/subnet on the external network type: string + ExternalInterfaceRoutes: + default: [] + description: > + Routes for the external network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json InternalApiIpSubnet: default: '' description: IP address/subnet on the internal_api network type: string + InternalApiInterfaceRoutes: + default: [] + description: > + Routes for the internal_api network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageIpSubnet: default: '' description: IP address/subnet on the storage network type: string + StorageInterfaceRoutes: + default: [] + description: > + Routes for the storage network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageMgmtIpSubnet: default: '' description: IP address/subnet on the storage_mgmt network type: string + StorageMgmtInterfaceRoutes: + default: [] + description: > + Routes for the storage_mgmt network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json TenantIpSubnet: default: '' description: IP address/subnet on the tenant network type: string + TenantInterfaceRoutes: + default: [] + description: > + Routes for the tenant network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json ManagementIpSubnet: # Only populated when including environments/network-management.yaml default: '' description: IP address/subnet on the management network type: string + ManagementInterfaceRoutes: + default: [] + description: > + Routes for the management network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json BondInterfaceOvsOptions: default: 'bond_mode=active-backup' description: The ovs_options string for the bond interface. Set things like diff --git a/ci/environments/network/public-bond/nic-configs/controller.yaml b/ci/environments/network/public-bond/nic-configs/controller.yaml index 9faf6aa8f5..648b0ac74d 100644 --- a/ci/environments/network/public-bond/nic-configs/controller.yaml +++ b/ci/environments/network/public-bond/nic-configs/controller.yaml @@ -9,26 +9,74 @@ parameters: default: '' description: IP address/subnet on the external network type: string + ExternalInterfaceRoutes: + default: [] + description: > + Routes for the external network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json InternalApiIpSubnet: default: '' description: IP address/subnet on the internal_api network type: string + InternalApiInterfaceRoutes: + default: [] + description: > + Routes for the internal_api network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageIpSubnet: default: '' description: IP address/subnet on the storage network type: string + StorageInterfaceRoutes: + default: [] + description: > + Routes for the storage network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageMgmtIpSubnet: default: '' description: IP address/subnet on the storage_mgmt network type: string + StorageMgmtInterfaceRoutes: + default: [] + description: > + Routes for the storage_mgmt network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json TenantIpSubnet: default: '' description: IP address/subnet on the tenant network type: string + TenantInterfaceRoutes: + default: [] + description: > + Routes for the tenant network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json ManagementIpSubnet: # Only populated when including environments/network-management.yaml default: '' description: IP address/subnet on the management network type: string + ManagementInterfaceRoutes: + default: [] + description: > + Routes for the management network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json BondInterfaceOvsOptions: default: 'bond_mode=active-backup' description: The ovs_options string for the bond interface. Set things like diff --git a/ci/environments/network/public-bond/nic-configs/swift-storage.yaml b/ci/environments/network/public-bond/nic-configs/swift-storage.yaml index d276e67eb7..73a7d4e50f 100644 --- a/ci/environments/network/public-bond/nic-configs/swift-storage.yaml +++ b/ci/environments/network/public-bond/nic-configs/swift-storage.yaml @@ -9,26 +9,74 @@ parameters: default: '' description: IP address/subnet on the external network type: string + ExternalInterfaceRoutes: + default: [] + description: > + Routes for the external network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json InternalApiIpSubnet: default: '' description: IP address/subnet on the internal_api network type: string + InternalApiInterfaceRoutes: + default: [] + description: > + Routes for the internal_api network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageIpSubnet: default: '' description: IP address/subnet on the storage network type: string + StorageInterfaceRoutes: + default: [] + description: > + Routes for the storage network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json StorageMgmtIpSubnet: default: '' description: IP address/subnet on the storage_mgmt network type: string + StorageMgmtInterfaceRoutes: + default: [] + description: > + Routes for the storage_mgmt network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json TenantIpSubnet: default: '' description: IP address/subnet on the tenant network type: string + TenantInterfaceRoutes: + default: [] + description: > + Routes for the tenant network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json ManagementIpSubnet: # Only populated when including environments/network-management.yaml default: '' description: IP address/subnet on the management network type: string + ManagementInterfaceRoutes: + default: [] + description: > + Routes for the management network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json BondInterfaceOvsOptions: default: 'bond_mode=active-backup' description: The ovs_options string for the bond interface. Set things like diff --git a/net-config-bridge.j2.yaml b/net-config-bridge.j2.yaml index 99b5fa9c39..aa5cff66ac 100644 --- a/net-config-bridge.j2.yaml +++ b/net-config-bridge.j2.yaml @@ -34,6 +34,14 @@ parameters: default: '' description: IP address/subnet on the {{network.name_lower}} network type: string + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json {%- endfor %} resources: OsNetConfigImpl: diff --git a/net-config-linux-bridge.j2.yaml b/net-config-linux-bridge.j2.yaml index 7cb435555a..e46fb58fde 100644 --- a/net-config-linux-bridge.j2.yaml +++ b/net-config-linux-bridge.j2.yaml @@ -11,6 +11,14 @@ parameters: default: '' description: IP address/subnet on the {{network.name_lower}} network type: string + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json {%- endfor %} ControlPlaneDefaultRoute: description: The default route of the control plane network. (The parameter diff --git a/net-config-noop.j2.yaml b/net-config-noop.j2.yaml index a14f90969c..2ac51db424 100644 --- a/net-config-noop.j2.yaml +++ b/net-config-noop.j2.yaml @@ -37,6 +37,14 @@ parameters: default: '' description: IP address/subnet on the {{network.name_lower}} network type: string + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json {%- endfor %} resources: diff --git a/net-config-standalone.j2.yaml b/net-config-standalone.j2.yaml index 12b6d51ff6..ecfcfb0eae 100644 --- a/net-config-standalone.j2.yaml +++ b/net-config-standalone.j2.yaml @@ -12,6 +12,14 @@ parameters: default: '' description: IP address/subnet on the {{network.name_lower}} network type: string + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json {%- endfor %} ControlPlaneSubnetCidr: default: '' diff --git a/net-config-static-bridge-with-external-dhcp.j2.yaml b/net-config-static-bridge-with-external-dhcp.j2.yaml index 6e262ba494..f43cc47c64 100644 --- a/net-config-static-bridge-with-external-dhcp.j2.yaml +++ b/net-config-static-bridge-with-external-dhcp.j2.yaml @@ -12,6 +12,14 @@ parameters: default: '' description: IP address/subnet on the {{network.name_lower}} network type: string + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json {%- endfor %} ControlPlaneSubnetCidr: default: '' diff --git a/net-config-static-bridge.j2.yaml b/net-config-static-bridge.j2.yaml index 3d94ca3e8e..5d67c3e091 100644 --- a/net-config-static-bridge.j2.yaml +++ b/net-config-static-bridge.j2.yaml @@ -12,6 +12,14 @@ parameters: default: '' description: IP address/subnet on the {{network.name_lower}} network type: string + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json {%- endfor %} ControlPlaneSubnetCidr: default: '' diff --git a/net-config-static.j2.yaml b/net-config-static.j2.yaml index 734abe9c4b..334ed32e93 100644 --- a/net-config-static.j2.yaml +++ b/net-config-static.j2.yaml @@ -11,6 +11,14 @@ parameters: default: '' description: IP address/subnet on the {{network.name_lower}} network type: string + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json {%- endfor %} ControlPlaneSubnetCidr: default: '' diff --git a/net-config-undercloud.j2.yaml b/net-config-undercloud.j2.yaml index 8b1ca649d0..e4f43edee9 100644 --- a/net-config-undercloud.j2.yaml +++ b/net-config-undercloud.j2.yaml @@ -12,6 +12,14 @@ parameters: default: '' description: IP address/subnet on the {{network.name_lower}} network type: string + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json {%- endfor %} ControlPlaneSubnetCidr: default: '' diff --git a/network/config/bond-with-vlans/controller-no-external.j2.yaml b/network/config/bond-with-vlans/controller-no-external.j2.yaml index 806d65d271..957bfdf493 100644 --- a/network/config/bond-with-vlans/controller-no-external.j2.yaml +++ b/network/config/bond-with-vlans/controller-no-external.j2.yaml @@ -41,7 +41,15 @@ parameters: description: default route for the {{network.name_lower}} network type: string {%- endif %} -{% endfor %} + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json +{%- endfor %} DnsServers: # Override this via parameter_defaults default: [] description: > @@ -108,38 +116,47 @@ resources: addresses: - ip_netmask: get_param: InternalApiIpSubnet + routes: + get_param: InternalApiInterfaceRoutes - type: vlan vlan_id: get_param: StorageNetworkVlanID addresses: - ip_netmask: get_param: StorageIpSubnet + routes: + get_param: StorageInterfaceRoutes - type: vlan vlan_id: get_param: StorageMgmtNetworkVlanID addresses: - ip_netmask: get_param: StorageMgmtIpSubnet + routes: + get_param: StorageMgmtInterfaceRoutes - type: vlan vlan_id: get_param: TenantNetworkVlanID addresses: - ip_netmask: get_param: TenantIpSubnet + routes: + get_param: TenantInterfaceRoutes # Uncomment when including environments/network-management.yaml # If setting default route on the Management interface, comment # out the default route on the Control Plane. - #- - # type: vlan - # device: bond1 - # vlan_id: {get_param: ManagementNetworkVlanID} + #- type: vlan + # vlan_id: + # get_param: ManagementNetworkVlanID # addresses: - # - - # ip_netmask: {get_param: ManagementIpSubnet} + # - ip_netmask: + # get_param: ManagementIpSubnet # routes: - # - - # default: true - # next_hop: {get_param: ManagementInterfaceDefaultRoute} + # list_concat_unique: + # - get_param: ManagementInterfaceRoutes + # - - default: true + # next_hop: + # get_param: ManagementInterfaceDefaultRoute outputs: OS::stack_id: description: The OsNetConfigImpl resource. diff --git a/network/config/bond-with-vlans/controller-v6.j2.yaml b/network/config/bond-with-vlans/controller-v6.j2.yaml index 609b452f64..d6086c08a3 100644 --- a/network/config/bond-with-vlans/controller-v6.j2.yaml +++ b/network/config/bond-with-vlans/controller-v6.j2.yaml @@ -39,7 +39,15 @@ parameters: description: default route for the {{network.name_lower}} network type: string {%- endif %} -{% endfor %} + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json +{%- endfor %} DnsServers: # Override this via parameter_defaults default: [] description: > @@ -83,7 +91,7 @@ resources: - ip_netmask: 169.254.169.254/32 next_hop: get_param: EC2MetadataIp - - default: true + - default: true # NOTE(hjensas): This is the IPv4 default route next_hop: get_param: ControlPlaneDefaultRoute - type: ovs_bridge @@ -108,47 +116,59 @@ resources: - ip_netmask: get_param: ExternalIpSubnet routes: - - default: true - next_hop: - get_param: ExternalInterfaceDefaultRoute + list_concat_unique: + - get_param: ExternalInterfaceRoutes + - - default: true # NOTE(hjensas): This is the IPv6 default route + next_hop: + get_param: ExternalInterfaceDefaultRoute - type: vlan vlan_id: get_param: InternalApiNetworkVlanID addresses: - ip_netmask: get_param: InternalApiIpSubnet + routes: + get_param: InternalApiInterfaceRoutes - type: vlan vlan_id: get_param: StorageNetworkVlanID addresses: - ip_netmask: get_param: StorageIpSubnet + routes: + get_param: StorageInterfaceRoutes - type: vlan vlan_id: get_param: StorageMgmtNetworkVlanID addresses: - ip_netmask: get_param: StorageMgmtIpSubnet + routes: + get_param: StorageMgmtInterfaceRoutes - type: vlan vlan_id: get_param: TenantNetworkVlanID addresses: - ip_netmask: get_param: TenantIpSubnet + routes: + get_param: TenantInterfaceRoutes # Uncomment when including environments/network-management.yaml # If setting default route on the Management interface, comment # out the default route on the External interface. This will # make the External API unreachable from remote subnets. - #- - # type: vlan - # vlan_id: {get_param: ManagementNetworkVlanID} + #- type: vlan + # vlan_id: + # get_param: ManagementNetworkVlanID # addresses: - # - - # ip_netmask: {get_param: ManagementIpSubnet} + # - ip_netmask: + # get_param: ManagementIpSubnet # routes: - # - - # default: true - # next_hop: {get_param: ManagementInterfaceDefaultRoute} + # list_concat_unique: + # - get_param: TenantInterfaceRoutes + # - - default: true + # next_hop: + # get_param: ManagementInterfaceDefaultRoute outputs: OS::stack_id: description: The OsNetConfigImpl resource. diff --git a/network/config/bond-with-vlans/role.role.j2.yaml b/network/config/bond-with-vlans/role.role.j2.yaml index d2a7d81529..2439cc61ff 100644 --- a/network/config/bond-with-vlans/role.role.j2.yaml +++ b/network/config/bond-with-vlans/role.role.j2.yaml @@ -37,7 +37,15 @@ parameters: description: default route for the {{network.name_lower}} network type: string {%- endif %} -{% endfor %} + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json +{%- endfor %} DnsServers: # Override this via parameter_defaults default: [] description: > @@ -84,13 +92,15 @@ resources: - - get_param: ControlPlaneIp - get_param: ControlPlaneSubnetCidr routes: - - ip_netmask: 169.254.169.254/32 - next_hop: - get_param: EC2MetadataIp + list_concat_unique: + - get_param: ControlPlaneRoutes + - - ip_netmask: 169.254.169.254/32 + next_hop: + get_param: EC2MetadataIp {%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %} - - default: true - next_hop: - get_param: ControlPlaneDefaultRoute + - default: true + next_hop: + get_param: ControlPlaneDefaultRoute {%- endif %} {%- if not role.name.startswith('ComputeOvsDpdk') %} - type: ovs_bridge @@ -98,7 +108,7 @@ resources: name: br-bond {%- else %} name: bridge_name -{% endif %} +{%- endif %} dns_servers: get_param: DnsServers members: @@ -119,11 +129,13 @@ resources: addresses: - ip_netmask: get_param: {{network.name}}IpSubnet -{%- if network.name in role.default_route_networks %} routes: - - default: true - next_hop: - get_param: {{network.name}}InterfaceDefaultRoute + list_concat_unique: + - - get_param: {{network.name}}InterfaceRoutes +{%- if network.name in role.default_route_networks %} + - default: true + next_hop: + get_param: {{network.name}}InterfaceDefaultRoute {%- endif %} {%- endfor %} {%- else %} @@ -149,11 +161,13 @@ resources: addresses: - ip_netmask: get_param: {{network.name}}IpSubnet -{%- if network.name in role.default_route_networks %} routes: - - default: true - next_hop: - get_param: {{network.name}}InterfaceDefaultRoute + list_concat_unique: + - get_param: {{network.name}}InterfaceRoutes +{%- if network.name in role.default_route_networks %} + - - default: true + next_hop: + get_param: {{network.name}}InterfaceDefaultRoute {%- endif %} {%- endfor %} # Used as a provider network with external DHCP diff --git a/network/config/multiple-nics/compute-dvr.j2.yaml b/network/config/multiple-nics/compute-dvr.j2.yaml index 8e35b973b6..9b8ad626bd 100644 --- a/network/config/multiple-nics/compute-dvr.j2.yaml +++ b/network/config/multiple-nics/compute-dvr.j2.yaml @@ -39,7 +39,15 @@ parameters: description: default route for the {{network.name_lower}} network type: string {%- endif %} -{% endfor %} + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json +{%- endfor %} DnsServers: # Override this via parameter_defaults default: [] description: > @@ -88,18 +96,24 @@ resources: addresses: - ip_netmask: get_param: StorageIpSubnet + routes: + get_param: StorageInterfaceRoutes - type: interface name: nic4 use_dhcp: false addresses: - ip_netmask: get_param: InternalApiIpSubnet + routes: + get_param: InternalApiInterfaceRoutes - type: ovs_bridge name: br-tenant use_dhcp: false addresses: - ip_netmask: get_param: TenantIpSubnet + routes: + get_param: TenantInterfaceRoutes members: - type: interface name: nic5 @@ -118,17 +132,18 @@ resources: # Uncomment when including environments/network-management.yaml # If setting default route on the Management interface, comment # out the default route on the Control Plane. - #- - # type: interface + #- type: interface # name: nic7 # use_dhcp: false # addresses: - # - - # ip_netmask: {get_param: ManagementIpSubnet} + # - ip_netmask: + # get_param: ManagementIpSubnet # routes: - # - - # default: true - # next_hop: {get_param: ManagementInterfaceDefaultRoute} + # list_concat_unique: + # - get_param: ManagementInterfaceRoutes + # - - default: true + # next_hop: + # get_param: ManagementInterfaceDefaultRoute outputs: OS::stack_id: description: The OsNetConfigImpl resource. diff --git a/network/config/multiple-nics/controller-v6.j2.yaml b/network/config/multiple-nics/controller-v6.j2.yaml index 8c4f43b550..640b7a2ec6 100644 --- a/network/config/multiple-nics/controller-v6.j2.yaml +++ b/network/config/multiple-nics/controller-v6.j2.yaml @@ -38,7 +38,15 @@ parameters: description: default route for the {{network.name_lower}} network type: string {%- endif %} -{% endfor %} + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json +{%- endfor %} DnsServers: # Override this via parameter_defaults default: [] description: > @@ -79,7 +87,7 @@ resources: next_hop: get_param: EC2MetadataIp # IPv4 Default Route - - default: true + - default: true # NOTE(hjensas): This is the IPv4 default route next_hop: get_param: ControlPlaneDefaultRoute - type: interface @@ -88,24 +96,32 @@ resources: addresses: - ip_netmask: get_param: StorageIpSubnet + routes: + get_param: StorageInterfaceRoutes - type: interface name: nic3 use_dhcp: false addresses: - ip_netmask: get_param: StorageMgmtIpSubnet + routes: + get_param: StorageMgmtInterfaceRoutes - type: interface name: nic4 use_dhcp: false addresses: - ip_netmask: get_param: InternalApiIpSubnet + routes: + get_param: InternalApiInterfaceRoutes - type: ovs_bridge name: br-tenant use_dhcp: false addresses: - ip_netmask: get_param: TenantIpSubnet + routes: + get_param: TenantInterfaceRoutes members: - type: interface name: nic5 @@ -120,9 +136,11 @@ resources: - ip_netmask: get_param: ExternalIpSubnet routes: - - default: true - next_hop: - get_param: ExternalInterfaceDefaultRoute + list_concat_unique: + - get_param: ExternalInterfaceRoutes + - - default: true # NOTE(hjensas): This is the IPv6 default route + next_hop: + get_param: ExternalInterfaceDefaultRoute members: - type: interface name: nic6 @@ -131,17 +149,18 @@ resources: # If setting default route on the Management interface, comment # out the default route on the External interface. This will # make the External API unreachable from remote subnets. - #- - # type: interface + #- type: interface # name: nic7 # use_dhcp: false # addresses: - # - - # ip_netmask: {get_param: ManagementIpSubnet} + # - ip_netmask: + # get_param: ManagementIpSubnet # routes: - # - - # default: true - # next_hop: {get_param: ManagementInterfaceDefaultRoute} + # list_concat_unique: + # - get_param: ManagementInterfaceRoutes + # - - default: true + # next_hop: + # get_param: ManagementInterfaceDefaultRoute outputs: OS::stack_id: description: The OsNetConfigImpl resource. diff --git a/network/config/multiple-nics/role.role.j2.yaml b/network/config/multiple-nics/role.role.j2.yaml index 2020263a12..2d3be6c3a6 100644 --- a/network/config/multiple-nics/role.role.j2.yaml +++ b/network/config/multiple-nics/role.role.j2.yaml @@ -37,7 +37,15 @@ parameters: description: default route for the {{network.name_lower}} network type: string {%- endif %} -{% endfor %} + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json +{%- endfor %} DnsServers: # Override this via parameter_defaults default: [] description: > @@ -114,11 +122,13 @@ resources: - ip_netmask: get_param: {{network.name}}IpSubnet {%- endif %} -{%- if network.name in role.default_route_networks %} routes: - - default: true - next_hop: - get_param: {{network.name}}InterfaceDefaultRoute + list_concat_unique: + - get_param: {{network.name}}InterfaceRoutes +{%- if network.name in role.default_route_networks %} + - - default: true + next_hop: + get_param: {{network.name}}InterfaceDefaultRoute {%- endif %} members: - type: interface diff --git a/network/config/single-nic-linux-bridge-vlans/controller-v6.j2.yaml b/network/config/single-nic-linux-bridge-vlans/controller-v6.j2.yaml index 54ca180c77..e51e7eee5b 100644 --- a/network/config/single-nic-linux-bridge-vlans/controller-v6.j2.yaml +++ b/network/config/single-nic-linux-bridge-vlans/controller-v6.j2.yaml @@ -38,7 +38,15 @@ parameters: description: default route for the {{network.name_lower}} network type: string {%- endif %} -{% endfor %} + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json +{%- endfor %} DnsServers: # Override this via parameter_defaults default: [] description: > @@ -78,7 +86,7 @@ resources: - ip_netmask: 169.254.169.254/32 next_hop: get_param: EC2MetadataIp - - default: true + - default: true # NOTE(hjensas): This is the IPv4 default route next_hop: get_param: ControlPlaneDefaultRoute members: @@ -93,9 +101,11 @@ resources: - ip_netmask: get_param: ExternalIpSubnet routes: - - default: true - next_hop: - get_param: ExternalInterfaceDefaultRoute + list_concat_unique: + - get_param: ExternalInterfaceRoutes + - - default: true # NOTE(hjensas): This is the IPv6 default route + next_hop: + get_param: ExternalInterfaceDefaultRoute - type: vlan vlan_id: get_param: InternalApiNetworkVlanID @@ -103,6 +113,8 @@ resources: addresses: - ip_netmask: get_param: InternalApiIpSubnet + routes: + get_param: InternalApiInterfaceRoutes - type: vlan vlan_id: get_param: StorageNetworkVlanID @@ -110,6 +122,8 @@ resources: addresses: - ip_netmask: get_param: StorageIpSubnet + routes: + get_param: StorageInterfaceRoutes - type: vlan vlan_id: get_param: StorageMgmtNetworkVlanID @@ -117,6 +131,8 @@ resources: addresses: - ip_netmask: get_param: StorageMgmtIpSubnet + routes: + get_param: StorageMgmtInterfaceRoutes - type: vlan vlan_id: get_param: TenantNetworkVlanID @@ -124,21 +140,25 @@ resources: addresses: - ip_netmask: get_param: TenantIpSubnet + routes: + get_param: TenantInterfaceRoutes # Uncomment when including environments/network-management.yaml # If setting default route on the Management interface, comment # out the default route on the External interface. This will # make the External API unreachable from remote subnets. - #- - # type: vlan - # vlan_id: {get_param: ManagementNetworkVlanID} + #- type: vlan + # vlan_id: + # get_param: ManagementNetworkVlanID # device: bridge_name # addresses: - # - - # ip_netmask: {get_param: ManagementIpSubnet} + # - ip_netmask: + # get_param: ManagementIpSubnet # routes: - # - - # default: true - # next_hop: {get_param: ManagementInterfaceDefaultRoute} + # list_concat_unique: + # - get_param: ManagementInterfaceRoutes + # - - default: true + # next_hop: + # get_param: ManagementInterfaceDefaultRoute outputs: OS::stack_id: description: The OsNetConfigImpl resource. diff --git a/network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml b/network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml index ab1deab2ba..c1e688ed18 100644 --- a/network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml +++ b/network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml @@ -37,7 +37,15 @@ parameters: description: default route for the {{network.name_lower}} network type: string {%- endif %} -{% endfor %} + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json +{%- endfor %} DnsServers: # Override this via parameter_defaults default: [] description: > @@ -103,11 +111,13 @@ resources: addresses: - ip_netmask: get_param: {{network.name}}IpSubnet -{%- if network.name in role.default_route_networks %} routes: - - default: true - next_hop: - get_param: {{network.name}}InterfaceDefaultRoute + list_concat_unique: + - get_param: {{network.name}}InterfaceRoutes +{%- if network.name in role.default_route_networks %} + - - default: true + next_hop: + get_param: {{network.name}}InterfaceDefaultRoute {%- endif %} {%- endfor %} outputs: diff --git a/network/config/single-nic-vlans/controller-no-external.j2.yaml b/network/config/single-nic-vlans/controller-no-external.j2.yaml index a4b8f4a853..bc559908e2 100644 --- a/network/config/single-nic-vlans/controller-no-external.j2.yaml +++ b/network/config/single-nic-vlans/controller-no-external.j2.yaml @@ -41,7 +41,15 @@ parameters: description: default route for the {{network.name_lower}} network type: string {%- endif %} -{% endfor %} + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json +{%- endfor %} DnsServers: # Override this via parameter_defaults default: [] description: > @@ -96,6 +104,8 @@ resources: addresses: - ip_netmask: get_param: {{network.name}}IpSubnet + routes: + get_param: {{network.name}}InterfaceRoutes {%- endfor %} outputs: OS::stack_id: diff --git a/network/config/single-nic-vlans/controller-v6.j2.yaml b/network/config/single-nic-vlans/controller-v6.j2.yaml index 9a33c22be2..39fc32b292 100644 --- a/network/config/single-nic-vlans/controller-v6.j2.yaml +++ b/network/config/single-nic-vlans/controller-v6.j2.yaml @@ -38,7 +38,15 @@ parameters: description: default route for the {{network.name_lower}} network type: string {%- endif %} -{% endfor %} + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json +{%- endfor %} DnsServers: # Override this via parameter_defaults default: [] description: > @@ -78,7 +86,7 @@ resources: - ip_netmask: 169.254.169.254/32 next_hop: get_param: EC2MetadataIp - - default: true + - default: true # NOTE(hjensas): This is the IPv4 default route next_hop: get_param: ControlPlaneDefaultRoute members: @@ -92,47 +100,59 @@ resources: - ip_netmask: get_param: ExternalIpSubnet routes: - - default: true - next_hop: - get_param: ExternalInterfaceDefaultRoute + list_concat_unique: + - get_param: ExternalInterfaceRoutes + - - default: true # NOTE(hjensas): This is the IPv6 default route + next_hop: + get_param: ExternalInterfaceDefaultRoute - type: vlan vlan_id: get_param: InternalApiNetworkVlanID addresses: - ip_netmask: get_param: InternalApiIpSubnet + routes: + get_param: InternalApiInterfaceRoutes - type: vlan vlan_id: get_param: StorageNetworkVlanID addresses: - ip_netmask: get_param: StorageIpSubnet + routes: + get_param: StorageInterfaceRoutes - type: vlan vlan_id: get_param: StorageMgmtNetworkVlanID addresses: - ip_netmask: get_param: StorageMgmtIpSubnet + routes: + get_param: StorageMgmtInterfaceRoutes - type: vlan vlan_id: get_param: TenantNetworkVlanID addresses: - ip_netmask: get_param: TenantIpSubnet + routes: + get_param: TenantInterfaceRoutes # Uncomment when including environments/network-management.yaml # If setting default route on the Management interface, comment # out the default route on the External interface. This will # make the External API unreachable from remote subnets. - #- - # type: vlan - # vlan_id: {get_param: ManagementNetworkVlanID} + #- type: vlan + # vlan_id: + # get_param: ManagementNetworkVlanID # addresses: - # - - # ip_netmask: {get_param: ManagementIpSubnet} + # - ip_netmask: + # get_param: ManagementIpSubnet # routes: - # - - # default: true - # next_hop: {get_param: ManagementInterfaceDefaultRoute} + # list_concat_unique: + # - get_param: ManagementInterfaceRoutes + # - - default: true + # next_hop: + # get_param: ManagementInterfaceDefaultRoute outputs: OS::stack_id: description: The OsNetConfigImpl resource. diff --git a/network/config/single-nic-vlans/role.role.j2.yaml b/network/config/single-nic-vlans/role.role.j2.yaml index d715df916c..9188e9e9ef 100644 --- a/network/config/single-nic-vlans/role.role.j2.yaml +++ b/network/config/single-nic-vlans/role.role.j2.yaml @@ -37,7 +37,15 @@ parameters: description: default route for the {{network.name_lower}} network type: string {%- endif %} -{% endfor %} + {{network.name}}InterfaceRoutes: + default: [] + description: > + Routes for the {{network.name_lower}} network traffic. + JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}] + Unless the default is changed, the parameter is automatically resolved + from the subnet host_routes attribute. + type: json +{%- endfor %} DnsServers: # Override this via parameter_defaults default: [] description: > @@ -98,11 +106,13 @@ resources: addresses: - ip_netmask: get_param: {{network.name}}IpSubnet -{%- if network.name in role.default_route_networks %} routes: - - default: true - next_hop: - get_param: {{network.name}}InterfaceDefaultRoute + list_concat_unique: + - get_param: {{network.name}}InterfaceRoutes +{%- if network.name in role.default_route_networks %} + - - default: true + next_hop: + get_param: {{network.name}}InterfaceDefaultRoute {%- endif %} {%- endfor %} outputs: diff --git a/releasenotes/notes/add-interface-routes-in-nic-configs-1628993fcaf6095c.yaml b/releasenotes/notes/add-interface-routes-in-nic-configs-1628993fcaf6095c.yaml new file mode 100644 index 0000000000..eebe59a8e1 --- /dev/null +++ b/releasenotes/notes/add-interface-routes-in-nic-configs-1628993fcaf6095c.yaml @@ -0,0 +1,8 @@ +--- +features: + - | + New parameter ``{{network.name}}InterfaceRoutes`` in network config + templates. Routes specified is configured on the overcloud node network + interfaces. The parameter takes a list of routes in JSON. For example:: + + [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]