Use OS::Heat::Value for NetworkConfig
This removes the run-os-net-config.sh script and uses OS::Heat::Value for the NetworkConfig resources. Depends-On: https://review.opendev.org/#/c/751713/ Change-Id: Ic3a0234d36525cdd6f415c77733d05a39bbeb3c2
This commit is contained in:
parent
2d1e769456
commit
a4622f1382
@ -182,27 +182,21 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: ovs_bridge
|
||||||
template:
|
name: br-ex
|
||||||
get_file: ../../network/scripts/run-os-net-config.sh
|
use_dhcp: false
|
||||||
params:
|
addresses:
|
||||||
$network_config:
|
- ip_netmask:
|
||||||
network_config:
|
list_join:
|
||||||
- type: ovs_bridge
|
- /
|
||||||
name: br-ex
|
- - get_param: ControlPlaneIp
|
||||||
use_dhcp: false
|
- get_param: ControlPlaneSubnetCidr
|
||||||
addresses:
|
|
||||||
- ip_netmask:
|
|
||||||
list_join:
|
|
||||||
- /
|
|
||||||
- - get_param: ControlPlaneIp
|
|
||||||
- get_param: ControlPlaneSubnetCidr
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value: {get_resource: OsNetConfigImpl}
|
value: {get_attr: [OsNetConfigImpl, value]}
|
||||||
|
@ -179,30 +179,24 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: ovs_bridge
|
||||||
template:
|
name: br-ctlplane
|
||||||
get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
|
use_dhcp: false
|
||||||
params:
|
ovs_extra:
|
||||||
$network_config:
|
- "br-set-external-id br-ctlplane bridge-id br-ctlplane"
|
||||||
network_config:
|
addresses:
|
||||||
- type: ovs_bridge
|
- ip_netmask:
|
||||||
name: br-ctlplane
|
list_join:
|
||||||
use_dhcp: false
|
- /
|
||||||
ovs_extra:
|
- - get_param: ControlPlaneIp
|
||||||
- "br-set-external-id br-ctlplane bridge-id br-ctlplane"
|
- get_param: ControlPlaneSubnetCidr
|
||||||
addresses:
|
|
||||||
- ip_netmask:
|
|
||||||
list_join:
|
|
||||||
- /
|
|
||||||
- - get_param: ControlPlaneIp
|
|
||||||
- get_param: ControlPlaneSubnetCidr
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
value:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
@ -89,44 +89,38 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
config:
|
value:
|
||||||
str_replace:
|
network_config:
|
||||||
params:
|
- type: interface
|
||||||
$network_config:
|
name: nic1
|
||||||
network_config:
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic1
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask:
|
||||||
use_dhcp: false
|
list_join:
|
||||||
addresses:
|
- /
|
||||||
- ip_netmask:
|
- - {get_param: ControlPlaneIp}
|
||||||
list_join:
|
- {get_param: ControlPlaneSubnetCidr}
|
||||||
- /
|
routes:
|
||||||
- - {get_param: ControlPlaneIp}
|
- default: true
|
||||||
- {get_param: ControlPlaneSubnetCidr}
|
ip_netmask: 0.0.0.0/0
|
||||||
routes:
|
next_hop: {get_param: ControlPlaneDefaultRoute}
|
||||||
- default: true
|
- type: interface
|
||||||
ip_netmask: 0.0.0.0/0
|
name: nic4
|
||||||
next_hop: {get_param: ControlPlaneDefaultRoute}
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic4
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask: {get_param: StorageIpSubnet}
|
||||||
use_dhcp: false
|
- type: interface
|
||||||
addresses:
|
name: nic5
|
||||||
- ip_netmask: {get_param: StorageIpSubnet}
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic5
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask: {get_param: StorageMgmtIpSubnet}
|
||||||
use_dhcp: false
|
|
||||||
addresses:
|
|
||||||
- ip_netmask: {get_param: StorageMgmtIpSubnet}
|
|
||||||
template:
|
|
||||||
get_file: ../../../../../network/scripts/run-os-net-config.sh
|
|
||||||
group: script
|
|
||||||
type: OS::Heat::SoftwareConfig
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value: {get_resource: OsNetConfigImpl}
|
value: {get_attr: [OsNetConfigImpl, value]}
|
||||||
|
@ -111,18 +111,12 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
config:
|
value:
|
||||||
str_replace:
|
network_config: []
|
||||||
params:
|
|
||||||
$network_config:
|
|
||||||
network_config: []
|
|
||||||
template:
|
|
||||||
get_file: ../../../../../network/scripts/run-os-net-config.sh
|
|
||||||
group: script
|
|
||||||
type: OS::Heat::SoftwareConfig
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value: {get_resource: OsNetConfigImpl}
|
value: {get_attr: [OsNetConfigImpl, value]}
|
||||||
|
@ -120,68 +120,62 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
config:
|
value:
|
||||||
str_replace:
|
network_config:
|
||||||
params:
|
- type: interface
|
||||||
$network_config:
|
name: nic1
|
||||||
network_config:
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic1
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask:
|
||||||
use_dhcp: false
|
list_join:
|
||||||
addresses:
|
- /
|
||||||
- ip_netmask:
|
- - {get_param: ControlPlaneIp}
|
||||||
list_join:
|
- {get_param: ControlPlaneSubnetCidr}
|
||||||
- /
|
routes:
|
||||||
- - {get_param: ControlPlaneIp}
|
- default: true
|
||||||
- {get_param: ControlPlaneSubnetCidr}
|
ip_netmask: 0.0.0.0/0
|
||||||
routes:
|
next_hop: {get_param: ControlPlaneDefaultRoute}
|
||||||
- default: true
|
- type: interface
|
||||||
ip_netmask: 0.0.0.0/0
|
name: nic3
|
||||||
next_hop: {get_param: ControlPlaneDefaultRoute}
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic3
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask: {get_param: InternalApiIpSubnet}
|
||||||
use_dhcp: false
|
- type: interface
|
||||||
addresses:
|
name: nic4
|
||||||
- ip_netmask: {get_param: InternalApiIpSubnet}
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic4
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask: {get_param: StorageIpSubnet}
|
||||||
use_dhcp: false
|
- type: ovs_bridge
|
||||||
addresses:
|
name: br-tenant
|
||||||
- ip_netmask: {get_param: StorageIpSubnet}
|
dns_servers: {get_param: DnsServers}
|
||||||
- type: ovs_bridge
|
domain: {get_param: DnsSearchDomains}
|
||||||
name: br-tenant
|
use_dhcp: false
|
||||||
dns_servers: {get_param: DnsServers}
|
addresses:
|
||||||
domain: {get_param: DnsSearchDomains}
|
- ip_netmask: {get_param: TenantIpSubnet}
|
||||||
use_dhcp: false
|
members:
|
||||||
addresses:
|
- type: interface
|
||||||
- ip_netmask: {get_param: TenantIpSubnet}
|
name: nic6
|
||||||
members:
|
mtu: 1350
|
||||||
- type: interface
|
primary: true
|
||||||
name: nic6
|
- type: ovs_bridge
|
||||||
mtu: 1350
|
name: br-ex
|
||||||
primary: true
|
dns_servers: {get_param: DnsServers}
|
||||||
- type: ovs_bridge
|
use_dhcp: false
|
||||||
name: br-ex
|
routes:
|
||||||
dns_servers: {get_param: DnsServers}
|
- ip_netmask: ::/0
|
||||||
use_dhcp: false
|
next_hop: {get_param: ExternalInterfaceDefaultRoute}
|
||||||
routes:
|
members:
|
||||||
- ip_netmask: ::/0
|
- type: interface
|
||||||
next_hop: {get_param: ExternalInterfaceDefaultRoute}
|
name: nic2
|
||||||
members:
|
mtu: 1350
|
||||||
- type: interface
|
primary: true
|
||||||
name: nic2
|
|
||||||
mtu: 1350
|
|
||||||
primary: true
|
|
||||||
template:
|
|
||||||
get_file: ../../../../../network/scripts/run-os-net-config.sh
|
|
||||||
group: script
|
|
||||||
type: OS::Heat::SoftwareConfig
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value: {get_resource: OsNetConfigImpl}
|
value: {get_attr: [OsNetConfigImpl, value]}
|
||||||
|
@ -115,56 +115,50 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
config:
|
value:
|
||||||
str_replace:
|
network_config:
|
||||||
params:
|
- type: interface
|
||||||
$network_config:
|
name: nic1
|
||||||
network_config:
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic1
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask:
|
||||||
use_dhcp: false
|
list_join:
|
||||||
addresses:
|
- /
|
||||||
- ip_netmask:
|
- - {get_param: ControlPlaneIp}
|
||||||
list_join:
|
- {get_param: ControlPlaneSubnetCidr}
|
||||||
- /
|
routes:
|
||||||
- - {get_param: ControlPlaneIp}
|
- default: true
|
||||||
- {get_param: ControlPlaneSubnetCidr}
|
ip_netmask: 0.0.0.0/0
|
||||||
routes:
|
next_hop: {get_param: ControlPlaneDefaultRoute}
|
||||||
- default: true
|
- type: interface
|
||||||
ip_netmask: 0.0.0.0/0
|
name: nic3
|
||||||
next_hop: {get_param: ControlPlaneDefaultRoute}
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic3
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask: {get_param: InternalApiIpSubnet}
|
||||||
use_dhcp: false
|
- type: interface
|
||||||
addresses:
|
name: nic4
|
||||||
- ip_netmask: {get_param: InternalApiIpSubnet}
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic4
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask: {get_param: StorageIpSubnet}
|
||||||
use_dhcp: false
|
- type: ovs_bridge
|
||||||
addresses:
|
name: br-tenant
|
||||||
- ip_netmask: {get_param: StorageIpSubnet}
|
dns_servers: {get_param: DnsServers}
|
||||||
- type: ovs_bridge
|
domain: {get_param: DnsSearchDomains}
|
||||||
name: br-tenant
|
use_dhcp: false
|
||||||
dns_servers: {get_param: DnsServers}
|
addresses:
|
||||||
domain: {get_param: DnsSearchDomains}
|
- ip_netmask: {get_param: TenantIpSubnet}
|
||||||
use_dhcp: false
|
members:
|
||||||
addresses:
|
- type: interface
|
||||||
- ip_netmask: {get_param: TenantIpSubnet}
|
name: nic6
|
||||||
members:
|
mtu: 1350
|
||||||
- type: interface
|
primary: true
|
||||||
name: nic6
|
|
||||||
mtu: 1350
|
|
||||||
primary: true
|
|
||||||
template:
|
|
||||||
get_file: ../../../../../network/scripts/run-os-net-config.sh
|
|
||||||
group: script
|
|
||||||
type: OS::Heat::SoftwareConfig
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value: {get_resource: OsNetConfigImpl}
|
value: {get_attr: [OsNetConfigImpl, value]}
|
||||||
|
@ -163,77 +163,71 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
config:
|
value:
|
||||||
str_replace:
|
network_config:
|
||||||
params:
|
- type: interface
|
||||||
$network_config:
|
name: nic1
|
||||||
network_config:
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic1
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask:
|
||||||
use_dhcp: false
|
list_join:
|
||||||
addresses:
|
- /
|
||||||
- ip_netmask:
|
- - {get_param: ControlPlaneIp}
|
||||||
list_join:
|
- {get_param: ControlPlaneSubnetCidr}
|
||||||
- /
|
routes:
|
||||||
- - {get_param: ControlPlaneIp}
|
- default: true
|
||||||
- {get_param: ControlPlaneSubnetCidr}
|
ip_netmask: 0.0.0.0/0
|
||||||
routes:
|
next_hop: {get_param: ControlPlaneDefaultRoute}
|
||||||
- default: true
|
- type: ovs_bridge
|
||||||
ip_netmask: 0.0.0.0/0
|
name: br-ex
|
||||||
next_hop: {get_param: ControlPlaneDefaultRoute}
|
dns_servers: {get_param: DnsServers}
|
||||||
- type: ovs_bridge
|
domain: {get_param: DnsSearchDomains}
|
||||||
name: br-ex
|
use_dhcp: false
|
||||||
dns_servers: {get_param: DnsServers}
|
addresses:
|
||||||
domain: {get_param: DnsSearchDomains}
|
- ip_netmask: {get_param: ExternalIpSubnet}
|
||||||
use_dhcp: false
|
routes:
|
||||||
addresses:
|
- default: true
|
||||||
- ip_netmask: {get_param: ExternalIpSubnet}
|
ip_netmask: ::/0
|
||||||
routes:
|
next_hop: {get_param: ExternalInterfaceDefaultRoute}
|
||||||
- default: true
|
members:
|
||||||
ip_netmask: ::/0
|
- type: interface
|
||||||
next_hop: {get_param: ExternalInterfaceDefaultRoute}
|
name: nic2
|
||||||
members:
|
mtu: 1350
|
||||||
- type: interface
|
primary: true
|
||||||
name: nic2
|
- type: interface
|
||||||
mtu: 1350
|
name: nic3
|
||||||
primary: true
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic3
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask: {get_param: InternalApiIpSubnet}
|
||||||
use_dhcp: false
|
- type: interface
|
||||||
addresses:
|
name: nic4
|
||||||
- ip_netmask: {get_param: InternalApiIpSubnet}
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic4
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask: {get_param: StorageIpSubnet}
|
||||||
use_dhcp: false
|
- type: interface
|
||||||
addresses:
|
name: nic5
|
||||||
- ip_netmask: {get_param: StorageIpSubnet}
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic5
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask: {get_param: StorageMgmtIpSubnet}
|
||||||
use_dhcp: false
|
- type: ovs_bridge
|
||||||
addresses:
|
name: br-tenant
|
||||||
- ip_netmask: {get_param: StorageMgmtIpSubnet}
|
dns_servers: {get_param: DnsServers}
|
||||||
- type: ovs_bridge
|
use_dhcp: false
|
||||||
name: br-tenant
|
addresses:
|
||||||
dns_servers: {get_param: DnsServers}
|
- ip_netmask: {get_param: TenantIpSubnet}
|
||||||
use_dhcp: false
|
members:
|
||||||
addresses:
|
- type: interface
|
||||||
- ip_netmask: {get_param: TenantIpSubnet}
|
name: nic6
|
||||||
members:
|
mtu: 1350
|
||||||
- type: interface
|
primary: true
|
||||||
name: nic6
|
|
||||||
mtu: 1350
|
|
||||||
primary: true
|
|
||||||
template:
|
|
||||||
get_file: ../../../../../network/scripts/run-os-net-config.sh
|
|
||||||
group: script
|
|
||||||
type: OS::Heat::SoftwareConfig
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value: {get_resource: OsNetConfigImpl}
|
value: {get_attr: [OsNetConfigImpl, value]}
|
||||||
|
@ -111,18 +111,12 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
config:
|
value:
|
||||||
str_replace:
|
network_config: []
|
||||||
params:
|
|
||||||
$network_config:
|
|
||||||
network_config: []
|
|
||||||
template:
|
|
||||||
get_file: ../../../../../network/scripts/run-os-net-config.sh
|
|
||||||
group: script
|
|
||||||
type: OS::Heat::SoftwareConfig
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value: {get_resource: OsNetConfigImpl}
|
value: {get_attr: [OsNetConfigImpl, value]}
|
||||||
|
@ -89,43 +89,37 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: interface
|
||||||
template:
|
name: nic1
|
||||||
get_file: ../../../../../network/scripts/run-os-net-config.sh
|
mtu: 1350
|
||||||
params:
|
use_dhcp: false
|
||||||
$network_config:
|
addresses:
|
||||||
network_config:
|
- ip_netmask:
|
||||||
- type: interface
|
list_join:
|
||||||
name: nic1
|
- /
|
||||||
mtu: 1350
|
- - {get_param: ControlPlaneIp}
|
||||||
use_dhcp: false
|
- {get_param: ControlPlaneSubnetCidr}
|
||||||
addresses:
|
routes:
|
||||||
- ip_netmask:
|
- default: true
|
||||||
list_join:
|
next_hop: {get_param: ControlPlaneDefaultRoute}
|
||||||
- /
|
- type: interface
|
||||||
- - {get_param: ControlPlaneIp}
|
name: nic4
|
||||||
- {get_param: ControlPlaneSubnetCidr}
|
mtu: 1350
|
||||||
routes:
|
use_dhcp: false
|
||||||
- default: true
|
addresses:
|
||||||
next_hop: {get_param: ControlPlaneDefaultRoute}
|
- ip_netmask: {get_param: StorageIpSubnet}
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic4
|
name: nic5
|
||||||
mtu: 1350
|
mtu: 1350
|
||||||
use_dhcp: false
|
use_dhcp: false
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask: {get_param: StorageIpSubnet}
|
- ip_netmask: {get_param: StorageMgmtIpSubnet}
|
||||||
- type: interface
|
|
||||||
name: nic5
|
|
||||||
mtu: 1350
|
|
||||||
use_dhcp: false
|
|
||||||
addresses:
|
|
||||||
- ip_netmask: {get_param: StorageMgmtIpSubnet}
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value: {get_resource: OsNetConfigImpl}
|
value: {get_attr: [OsNetConfigImpl, value]}
|
||||||
|
@ -89,18 +89,12 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config: []
|
||||||
str_replace:
|
|
||||||
template:
|
|
||||||
get_file: ../../../../../network/scripts/run-os-net-config.sh
|
|
||||||
params:
|
|
||||||
$network_config:
|
|
||||||
network_config: []
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value: {get_resource: OsNetConfigImpl}
|
value: {get_attr: [OsNetConfigImpl, value]}
|
||||||
|
@ -117,70 +117,63 @@ parameters:
|
|||||||
description: default route for the external network
|
description: default route for the external network
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: interface
|
||||||
template:
|
name: nic1
|
||||||
get_file: ../../../../../network/scripts/run-os-net-config.sh
|
mtu: 1350
|
||||||
params:
|
use_dhcp: false
|
||||||
$network_config:
|
addresses:
|
||||||
network_config:
|
- ip_netmask:
|
||||||
- type: interface
|
list_join:
|
||||||
name: nic1
|
- /
|
||||||
mtu: 1350
|
- - {get_param: ControlPlaneIp}
|
||||||
use_dhcp: false
|
- {get_param: ControlPlaneSubnetCidr}
|
||||||
addresses:
|
routes:
|
||||||
- ip_netmask:
|
- default: true
|
||||||
list_join:
|
next_hop: {get_param: ControlPlaneDefaultRoute}
|
||||||
- /
|
- type: ovs_bridge
|
||||||
- - {get_param: ControlPlaneIp}
|
name: br-ex
|
||||||
- {get_param: ControlPlaneSubnetCidr}
|
dns_servers: {get_param: DnsServers}
|
||||||
routes:
|
domain: {get_param: DnsSearchDomains}
|
||||||
- default: true
|
use_dhcp: false
|
||||||
next_hop: {get_param: ControlPlaneDefaultRoute}
|
routes:
|
||||||
- type: ovs_bridge
|
- ip_netmask: 0.0.0.0/0
|
||||||
name: br-ex
|
next_hop: {get_param: ExternalInterfaceDefaultRoute}
|
||||||
dns_servers: {get_param: DnsServers}
|
members:
|
||||||
domain: {get_param: DnsSearchDomains}
|
- type: interface
|
||||||
use_dhcp: false
|
name: nic2
|
||||||
routes:
|
mtu: 1350
|
||||||
- ip_netmask: 0.0.0.0/0
|
primary: true
|
||||||
next_hop: {get_param: ExternalInterfaceDefaultRoute}
|
- type: interface
|
||||||
members:
|
name: nic3
|
||||||
- type: interface
|
mtu: 1350
|
||||||
name: nic2
|
use_dhcp: false
|
||||||
mtu: 1350
|
addresses:
|
||||||
primary: true
|
- ip_netmask: {get_param: InternalApiIpSubnet}
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic3
|
name: nic4
|
||||||
mtu: 1350
|
mtu: 1350
|
||||||
use_dhcp: false
|
use_dhcp: false
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask: {get_param: InternalApiIpSubnet}
|
- ip_netmask: {get_param: StorageIpSubnet}
|
||||||
- type: interface
|
- type: ovs_bridge
|
||||||
name: nic4
|
name: br-tenant
|
||||||
mtu: 1350
|
dns_servers: {get_param: DnsServers}
|
||||||
use_dhcp: false
|
use_dhcp: false
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask: {get_param: StorageIpSubnet}
|
- ip_netmask: {get_param: TenantIpSubnet}
|
||||||
- type: ovs_bridge
|
members:
|
||||||
name: br-tenant
|
- type: interface
|
||||||
dns_servers: {get_param: DnsServers}
|
name: nic6
|
||||||
use_dhcp: false
|
mtu: 1350
|
||||||
addresses:
|
primary: true
|
||||||
- ip_netmask: {get_param: TenantIpSubnet}
|
|
||||||
members:
|
|
||||||
- type: interface
|
|
||||||
name: nic6
|
|
||||||
mtu: 1350
|
|
||||||
primary: true
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value: {get_resource: OsNetConfigImpl}
|
value: {get_attr: [OsNetConfigImpl, value]}
|
||||||
|
@ -115,55 +115,49 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: interface
|
||||||
template:
|
name: nic1
|
||||||
get_file: ../../../../../network/scripts/run-os-net-config.sh
|
mtu: 1350
|
||||||
params:
|
use_dhcp: false
|
||||||
$network_config:
|
addresses:
|
||||||
network_config:
|
- ip_netmask:
|
||||||
- type: interface
|
list_join:
|
||||||
name: nic1
|
- /
|
||||||
mtu: 1350
|
- - {get_param: ControlPlaneIp}
|
||||||
use_dhcp: false
|
- {get_param: ControlPlaneSubnetCidr}
|
||||||
addresses:
|
routes:
|
||||||
- ip_netmask:
|
- default: true
|
||||||
list_join:
|
next_hop: {get_param: ControlPlaneDefaultRoute}
|
||||||
- /
|
- type: interface
|
||||||
- - {get_param: ControlPlaneIp}
|
name: nic3
|
||||||
- {get_param: ControlPlaneSubnetCidr}
|
mtu: 1350
|
||||||
routes:
|
use_dhcp: false
|
||||||
- default: true
|
addresses:
|
||||||
next_hop: {get_param: ControlPlaneDefaultRoute}
|
- ip_netmask: {get_param: InternalApiIpSubnet}
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic3
|
name: nic4
|
||||||
mtu: 1350
|
mtu: 1350
|
||||||
use_dhcp: false
|
use_dhcp: false
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask: {get_param: InternalApiIpSubnet}
|
- ip_netmask: {get_param: StorageIpSubnet}
|
||||||
- type: interface
|
- type: ovs_bridge
|
||||||
name: nic4
|
name: br-tenant
|
||||||
mtu: 1350
|
dns_servers: {get_param: DnsServers}
|
||||||
use_dhcp: false
|
domain: {get_param: DnsSearchDomains}
|
||||||
addresses:
|
use_dhcp: false
|
||||||
- ip_netmask: {get_param: StorageIpSubnet}
|
addresses:
|
||||||
- type: ovs_bridge
|
- ip_netmask: {get_param: TenantIpSubnet}
|
||||||
name: br-tenant
|
members:
|
||||||
dns_servers: {get_param: DnsServers}
|
- type: interface
|
||||||
domain: {get_param: DnsSearchDomains}
|
name: nic6
|
||||||
use_dhcp: false
|
mtu: 1350
|
||||||
addresses:
|
primary: true
|
||||||
- ip_netmask: {get_param: TenantIpSubnet}
|
|
||||||
members:
|
|
||||||
- type: interface
|
|
||||||
name: nic6
|
|
||||||
mtu: 1350
|
|
||||||
primary: true
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value: {get_resource: OsNetConfigImpl}
|
value: {get_attr: [OsNetConfigImpl, value]}
|
||||||
|
@ -163,72 +163,66 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: interface
|
||||||
template:
|
name: nic1
|
||||||
get_file: ../../../../../network/scripts/run-os-net-config.sh
|
mtu: 1350
|
||||||
params:
|
use_dhcp: false
|
||||||
$network_config:
|
addresses:
|
||||||
network_config:
|
- ip_netmask:
|
||||||
- type: interface
|
list_join:
|
||||||
name: nic1
|
- /
|
||||||
mtu: 1350
|
- - {get_param: ControlPlaneIp}
|
||||||
use_dhcp: false
|
- {get_param: ControlPlaneSubnetCidr}
|
||||||
addresses:
|
- type: ovs_bridge
|
||||||
- ip_netmask:
|
name: br-ex
|
||||||
list_join:
|
dns_servers: {get_param: DnsServers}
|
||||||
- /
|
domain: {get_param: DnsSearchDomains}
|
||||||
- - {get_param: ControlPlaneIp}
|
use_dhcp: false
|
||||||
- {get_param: ControlPlaneSubnetCidr}
|
addresses:
|
||||||
- type: ovs_bridge
|
- ip_netmask: {get_param: ExternalIpSubnet}
|
||||||
name: br-ex
|
routes:
|
||||||
dns_servers: {get_param: DnsServers}
|
- ip_netmask: 0.0.0.0/0
|
||||||
domain: {get_param: DnsSearchDomains}
|
next_hop: {get_param: ExternalInterfaceDefaultRoute}
|
||||||
use_dhcp: false
|
members:
|
||||||
addresses:
|
- type: interface
|
||||||
- ip_netmask: {get_param: ExternalIpSubnet}
|
name: nic2
|
||||||
routes:
|
mtu: 1350
|
||||||
- ip_netmask: 0.0.0.0/0
|
primary: true
|
||||||
next_hop: {get_param: ExternalInterfaceDefaultRoute}
|
- type: interface
|
||||||
members:
|
name: nic3
|
||||||
- type: interface
|
mtu: 1350
|
||||||
name: nic2
|
use_dhcp: false
|
||||||
mtu: 1350
|
addresses:
|
||||||
primary: true
|
- ip_netmask: {get_param: InternalApiIpSubnet}
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic3
|
name: nic4
|
||||||
mtu: 1350
|
mtu: 1350
|
||||||
use_dhcp: false
|
use_dhcp: false
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask: {get_param: InternalApiIpSubnet}
|
- ip_netmask: {get_param: StorageIpSubnet}
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic4
|
name: nic5
|
||||||
mtu: 1350
|
mtu: 1350
|
||||||
use_dhcp: false
|
use_dhcp: false
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask: {get_param: StorageIpSubnet}
|
- ip_netmask: {get_param: StorageMgmtIpSubnet}
|
||||||
- type: interface
|
- type: ovs_bridge
|
||||||
name: nic5
|
name: br-tenant
|
||||||
mtu: 1350
|
dns_servers: {get_param: DnsServers}
|
||||||
use_dhcp: false
|
use_dhcp: false
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask: {get_param: StorageMgmtIpSubnet}
|
- ip_netmask: {get_param: TenantIpSubnet}
|
||||||
- type: ovs_bridge
|
members:
|
||||||
name: br-tenant
|
- type: interface
|
||||||
dns_servers: {get_param: DnsServers}
|
name: nic6
|
||||||
use_dhcp: false
|
mtu: 1350
|
||||||
addresses:
|
primary: true
|
||||||
- ip_netmask: {get_param: TenantIpSubnet}
|
|
||||||
members:
|
|
||||||
- type: interface
|
|
||||||
name: nic6
|
|
||||||
mtu: 1350
|
|
||||||
primary: true
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value: {get_resource: OsNetConfigImpl}
|
value: {get_attr: [OsNetConfigImpl, value]}
|
||||||
|
@ -111,18 +111,12 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config: []
|
||||||
str_replace:
|
|
||||||
template:
|
|
||||||
get_file: ../../../../../network/scripts/run-os-net-config.sh
|
|
||||||
params:
|
|
||||||
$network_config:
|
|
||||||
network_config: []
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value: {get_resource: OsNetConfigImpl}
|
value: {get_attr: [OsNetConfigImpl, value]}
|
||||||
|
@ -89,43 +89,37 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
config:
|
value:
|
||||||
str_replace:
|
network_config:
|
||||||
params:
|
- type: interface
|
||||||
$network_config:
|
name: nic1
|
||||||
network_config:
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic1
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask:
|
||||||
use_dhcp: false
|
list_join:
|
||||||
addresses:
|
- /
|
||||||
- ip_netmask:
|
- - {get_param: ControlPlaneIp}
|
||||||
list_join:
|
- {get_param: ControlPlaneSubnetCidr}
|
||||||
- /
|
routes:
|
||||||
- - {get_param: ControlPlaneIp}
|
- default: true
|
||||||
- {get_param: ControlPlaneSubnetCidr}
|
next_hop: {get_param: ControlPlaneDefaultRoute}
|
||||||
routes:
|
- type: interface
|
||||||
- default: true
|
name: nic5
|
||||||
next_hop: {get_param: ControlPlaneDefaultRoute}
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic5
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask: {get_param: StorageIpSubnet}
|
||||||
use_dhcp: false
|
- type: interface
|
||||||
addresses:
|
name: nic6
|
||||||
- ip_netmask: {get_param: StorageIpSubnet}
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic6
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask: {get_param: StorageMgmtIpSubnet}
|
||||||
use_dhcp: false
|
|
||||||
addresses:
|
|
||||||
- ip_netmask: {get_param: StorageMgmtIpSubnet}
|
|
||||||
template:
|
|
||||||
get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
|
|
||||||
group: script
|
|
||||||
type: OS::Heat::SoftwareConfig
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value: {get_resource: OsNetConfigImpl}
|
value: {get_attr: [OsNetConfigImpl, value]}
|
||||||
|
@ -111,18 +111,12 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
config:
|
value:
|
||||||
str_replace:
|
network_config: []
|
||||||
params:
|
|
||||||
$network_config:
|
|
||||||
network_config: []
|
|
||||||
template:
|
|
||||||
get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
|
|
||||||
group: script
|
|
||||||
type: OS::Heat::SoftwareConfig
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value: {get_resource: OsNetConfigImpl}
|
value: {get_attr: [OsNetConfigImpl, value]}
|
||||||
|
@ -115,55 +115,49 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
config:
|
value:
|
||||||
str_replace:
|
network_config:
|
||||||
params:
|
- type: interface
|
||||||
$network_config:
|
name: nic1
|
||||||
network_config:
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic1
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask:
|
||||||
use_dhcp: false
|
list_join:
|
||||||
addresses:
|
- /
|
||||||
- ip_netmask:
|
- - {get_param: ControlPlaneIp}
|
||||||
list_join:
|
- {get_param: ControlPlaneSubnetCidr}
|
||||||
- /
|
routes:
|
||||||
- - {get_param: ControlPlaneIp}
|
- default: true
|
||||||
- {get_param: ControlPlaneSubnetCidr}
|
next_hop: {get_param: ControlPlaneDefaultRoute}
|
||||||
routes:
|
- type: interface
|
||||||
- default: true
|
name: nic4
|
||||||
next_hop: {get_param: ControlPlaneDefaultRoute}
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic4
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask: {get_param: InternalApiIpSubnet}
|
||||||
use_dhcp: false
|
- type: interface
|
||||||
addresses:
|
name: nic5
|
||||||
- ip_netmask: {get_param: InternalApiIpSubnet}
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic5
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask: {get_param: StorageIpSubnet}
|
||||||
use_dhcp: false
|
- type: ovs_bridge
|
||||||
addresses:
|
name: br-tenant
|
||||||
- ip_netmask: {get_param: StorageIpSubnet}
|
dns_servers: {get_param: DnsServers}
|
||||||
- type: ovs_bridge
|
domain: {get_param: DnsSearchDomains}
|
||||||
name: br-tenant
|
use_dhcp: false
|
||||||
dns_servers: {get_param: DnsServers}
|
addresses:
|
||||||
domain: {get_param: DnsSearchDomains}
|
- ip_netmask: {get_param: TenantIpSubnet}
|
||||||
use_dhcp: false
|
members:
|
||||||
addresses:
|
- type: interface
|
||||||
- ip_netmask: {get_param: TenantIpSubnet}
|
name: nic7
|
||||||
members:
|
mtu: 1350
|
||||||
- type: interface
|
primary: true
|
||||||
name: nic7
|
|
||||||
mtu: 1350
|
|
||||||
primary: true
|
|
||||||
template:
|
|
||||||
get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
|
|
||||||
group: script
|
|
||||||
type: OS::Heat::SoftwareConfig
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value: {get_resource: OsNetConfigImpl}
|
value: {get_attr: [OsNetConfigImpl, value]}
|
||||||
|
@ -157,80 +157,74 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
config:
|
value:
|
||||||
str_replace:
|
network_config:
|
||||||
params:
|
- type: interface
|
||||||
$network_config:
|
name: nic1
|
||||||
network_config:
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic1
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask:
|
||||||
use_dhcp: false
|
list_join:
|
||||||
addresses:
|
- /
|
||||||
- ip_netmask:
|
- - {get_param: ControlPlaneIp}
|
||||||
list_join:
|
- {get_param: ControlPlaneSubnetCidr}
|
||||||
- /
|
- type: ovs_bridge
|
||||||
- - {get_param: ControlPlaneIp}
|
name: br-ex
|
||||||
- {get_param: ControlPlaneSubnetCidr}
|
dns_servers: {get_param: DnsServers}
|
||||||
- type: ovs_bridge
|
domain: {get_param: DnsSearchDomains}
|
||||||
name: br-ex
|
use_dhcp: false
|
||||||
dns_servers: {get_param: DnsServers}
|
addresses:
|
||||||
domain: {get_param: DnsSearchDomains}
|
- ip_netmask: {get_param: ExternalIpSubnet}
|
||||||
use_dhcp: false
|
routes:
|
||||||
addresses:
|
- ip_netmask: 0.0.0.0/0
|
||||||
- ip_netmask: {get_param: ExternalIpSubnet}
|
next_hop: {get_param: ExternalInterfaceDefaultRoute}
|
||||||
routes:
|
members:
|
||||||
- ip_netmask: 0.0.0.0/0
|
- type: ovs_bond
|
||||||
next_hop: {get_param: ExternalInterfaceDefaultRoute}
|
name: bond1
|
||||||
members:
|
ovs_options: {get_param: BondInterfaceOvsOptions}
|
||||||
- type: ovs_bond
|
members:
|
||||||
name: bond1
|
- type: interface
|
||||||
ovs_options: {get_param: BondInterfaceOvsOptions}
|
name: nic2
|
||||||
members:
|
mtu: 1350
|
||||||
- type: interface
|
primary: true
|
||||||
name: nic2
|
- type: interface
|
||||||
mtu: 1350
|
name: nic3
|
||||||
primary: true
|
mtu: 1350
|
||||||
- type: interface
|
primary: false
|
||||||
name: nic3
|
- type: interface
|
||||||
mtu: 1350
|
name: nic4
|
||||||
primary: false
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic4
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask: {get_param: InternalApiIpSubnet}
|
||||||
use_dhcp: false
|
- type: interface
|
||||||
addresses:
|
name: nic5
|
||||||
- ip_netmask: {get_param: InternalApiIpSubnet}
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic5
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask: {get_param: StorageIpSubnet}
|
||||||
use_dhcp: false
|
- type: interface
|
||||||
addresses:
|
name: nic6
|
||||||
- ip_netmask: {get_param: StorageIpSubnet}
|
mtu: 1350
|
||||||
- type: interface
|
use_dhcp: false
|
||||||
name: nic6
|
addresses:
|
||||||
mtu: 1350
|
- ip_netmask: {get_param: StorageMgmtIpSubnet}
|
||||||
use_dhcp: false
|
- type: ovs_bridge
|
||||||
addresses:
|
name: br-tenant
|
||||||
- ip_netmask: {get_param: StorageMgmtIpSubnet}
|
dns_servers: {get_param: DnsServers}
|
||||||
- type: ovs_bridge
|
use_dhcp: false
|
||||||
name: br-tenant
|
addresses:
|
||||||
dns_servers: {get_param: DnsServers}
|
- ip_netmask: {get_param: TenantIpSubnet}
|
||||||
use_dhcp: false
|
members:
|
||||||
addresses:
|
- type: interface
|
||||||
- ip_netmask: {get_param: TenantIpSubnet}
|
name: nic7
|
||||||
members:
|
mtu: 1350
|
||||||
- type: interface
|
primary: true
|
||||||
name: nic7
|
|
||||||
mtu: 1350
|
|
||||||
primary: true
|
|
||||||
template:
|
|
||||||
get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
|
|
||||||
group: script
|
|
||||||
type: OS::Heat::SoftwareConfig
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value: {get_resource: OsNetConfigImpl}
|
value: {get_attr: [OsNetConfigImpl, value]}
|
||||||
|
@ -111,18 +111,12 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
config:
|
value:
|
||||||
str_replace:
|
network_config: []
|
||||||
params:
|
|
||||||
$network_config:
|
|
||||||
network_config: []
|
|
||||||
template:
|
|
||||||
get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
|
|
||||||
group: script
|
|
||||||
type: OS::Heat::SoftwareConfig
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value: {get_resource: OsNetConfigImpl}
|
value: {get_attr: [OsNetConfigImpl, value]}
|
||||||
|
@ -74,36 +74,30 @@ parameters:
|
|||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: ovs_bridge
|
||||||
template:
|
name: bridge_name
|
||||||
get_file: network/scripts/run-os-net-config.sh
|
use_dhcp: true
|
||||||
params:
|
dns_servers:
|
||||||
$network_config:
|
get_param: DnsServers
|
||||||
network_config:
|
domain:
|
||||||
- type: ovs_bridge
|
get_param: DnsSearchDomains
|
||||||
name: bridge_name
|
members:
|
||||||
use_dhcp: true
|
- type: ovs_bond
|
||||||
dns_servers:
|
name: bond1
|
||||||
get_param: DnsServers
|
use_dhcp: true
|
||||||
domain:
|
ovs_options:
|
||||||
get_param: DnsSearchDomains
|
get_param: BondInterfaceOvsOptions
|
||||||
members:
|
members:
|
||||||
- type: ovs_bond
|
- type: interface
|
||||||
name: bond1
|
name: nic1
|
||||||
use_dhcp: true
|
- type: interface
|
||||||
ovs_options:
|
name: nic2
|
||||||
get_param: BondInterfaceOvsOptions
|
|
||||||
members:
|
|
||||||
- type: interface
|
|
||||||
name: nic1
|
|
||||||
- type: interface
|
|
||||||
name: nic2
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
value:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
@ -72,31 +72,25 @@ parameters:
|
|||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: ovs_bridge
|
||||||
template:
|
name: bridge_name
|
||||||
get_file: network/scripts/run-os-net-config.sh
|
use_dhcp: true
|
||||||
params:
|
dns_servers:
|
||||||
$network_config:
|
get_param: DnsServers
|
||||||
network_config:
|
domain:
|
||||||
- type: ovs_bridge
|
get_param: DnsSearchDomains
|
||||||
name: bridge_name
|
members:
|
||||||
use_dhcp: true
|
- type: interface
|
||||||
dns_servers:
|
name: interface_name
|
||||||
get_param: DnsServers
|
# force the MAC address of the bridge to this interface
|
||||||
domain:
|
primary: true
|
||||||
get_param: DnsSearchDomains
|
|
||||||
members:
|
|
||||||
- type: interface
|
|
||||||
name: interface_name
|
|
||||||
# force the MAC address of the bridge to this interface
|
|
||||||
primary: true
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
value:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
|
||||||
|
@ -74,39 +74,33 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: linux_bridge
|
||||||
template:
|
name: bridge_name
|
||||||
get_file: network/scripts/run-os-net-config.sh
|
addresses:
|
||||||
params:
|
- ip_netmask:
|
||||||
$network_config:
|
get_param: ControlPlaneIp
|
||||||
network_config:
|
dns_servers:
|
||||||
- type: linux_bridge
|
get_param: DnsServers
|
||||||
name: bridge_name
|
domain:
|
||||||
addresses:
|
get_param: DnsSearchDomains
|
||||||
- ip_netmask:
|
members:
|
||||||
get_param: ControlPlaneIp
|
- type: interface
|
||||||
dns_servers:
|
name: interface_name
|
||||||
get_param: DnsServers
|
# force the MAC address of the bridge to this interface
|
||||||
domain:
|
primary: true
|
||||||
get_param: DnsSearchDomains
|
routes:
|
||||||
members:
|
- ip_netmask: 0.0.0.0/0
|
||||||
- type: interface
|
next_hop:
|
||||||
name: interface_name
|
get_param: ControlPlaneDefaultRoute
|
||||||
# force the MAC address of the bridge to this interface
|
default: true
|
||||||
primary: true
|
|
||||||
routes:
|
|
||||||
- ip_netmask: 0.0.0.0/0
|
|
||||||
next_hop:
|
|
||||||
get_param: ControlPlaneDefaultRoute
|
|
||||||
default: true
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
value:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
|
||||||
|
@ -101,66 +101,57 @@ conditions:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
inputs:
|
if:
|
||||||
- name: disable_configure_safe_defaults
|
- standalone_net_config_override
|
||||||
default: true
|
- {get_param: StandaloneNetConfigOverride}
|
||||||
config:
|
- network_config:
|
||||||
str_replace:
|
- type: ovs_bridge
|
||||||
template:
|
name: br-ctlplane
|
||||||
get_file: network/scripts/run-os-net-config.sh
|
mtu: {get_param: InterfaceLocalMtu}
|
||||||
params:
|
use_dhcp: false
|
||||||
$network_config:
|
dns_servers:
|
||||||
|
get_param: DnsServers
|
||||||
|
domain:
|
||||||
|
get_param: DnsSearchDomains
|
||||||
|
ovs_extra:
|
||||||
|
- "br-set-external-id br-ctlplane bridge-id br-ctlplane"
|
||||||
|
addresses:
|
||||||
|
- ip_netmask:
|
||||||
|
list_join:
|
||||||
|
- /
|
||||||
|
- - get_param: ControlPlaneIp
|
||||||
|
- get_param: ControlPlaneSubnetCidr
|
||||||
|
-
|
||||||
if:
|
if:
|
||||||
- standalone_net_config_override
|
- control_virtual_ip_unset
|
||||||
- {get_param: StandaloneNetConfigOverride}
|
- {}
|
||||||
- network_config:
|
- ip_netmask:
|
||||||
- type: ovs_bridge
|
list_join:
|
||||||
name: br-ctlplane
|
- /
|
||||||
mtu: {get_param: InterfaceLocalMtu}
|
- - {get_param: [DeployedServerPortMap, 'control_virtual_ip', fixed_ips, 0, ip_address]}
|
||||||
use_dhcp: false
|
- {if: [control_virtual_ip_is_ipv6, '128', '32']}
|
||||||
dns_servers:
|
-
|
||||||
get_param: DnsServers
|
if:
|
||||||
domain:
|
- public_virtual_ip_unset
|
||||||
get_param: DnsSearchDomains
|
- {}
|
||||||
ovs_extra:
|
- ip_netmask:
|
||||||
- "br-set-external-id br-ctlplane bridge-id br-ctlplane"
|
list_join:
|
||||||
addresses:
|
- /
|
||||||
- ip_netmask:
|
- - {get_param: [DeployedServerPortMap, 'public_virtual_ip', fixed_ips, 0, ip_address]}
|
||||||
list_join:
|
- {if: [public_virtual_ip_is_ipv6, '128', '32']}
|
||||||
- /
|
routes: {get_param: ControlPlaneStaticRoutes}
|
||||||
- - get_param: ControlPlaneIp
|
members:
|
||||||
- get_param: ControlPlaneSubnetCidr
|
- type: interface
|
||||||
-
|
name: {get_param: NeutronPublicInterface}
|
||||||
if:
|
# force the MAC address of the bridge to this interface
|
||||||
- control_virtual_ip_unset
|
primary: true
|
||||||
- {}
|
mtu: {get_param: InterfaceLocalMtu}
|
||||||
- ip_netmask:
|
|
||||||
list_join:
|
|
||||||
- /
|
|
||||||
- - {get_param: [DeployedServerPortMap, 'control_virtual_ip', fixed_ips, 0, ip_address]}
|
|
||||||
- {if: [control_virtual_ip_is_ipv6, '128', '32']}
|
|
||||||
-
|
|
||||||
if:
|
|
||||||
- public_virtual_ip_unset
|
|
||||||
- {}
|
|
||||||
- ip_netmask:
|
|
||||||
list_join:
|
|
||||||
- /
|
|
||||||
- - {get_param: [DeployedServerPortMap, 'public_virtual_ip', fixed_ips, 0, ip_address]}
|
|
||||||
- {if: [public_virtual_ip_is_ipv6, '128', '32']}
|
|
||||||
routes: {get_param: ControlPlaneStaticRoutes}
|
|
||||||
members:
|
|
||||||
- type: interface
|
|
||||||
name: {get_param: NeutronPublicInterface}
|
|
||||||
# force the MAC address of the bridge to this interface
|
|
||||||
primary: true
|
|
||||||
mtu: {get_param: InterfaceLocalMtu}
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
value:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
|
||||||
|
@ -74,42 +74,36 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: ovs_bridge
|
||||||
template:
|
name: bridge_name
|
||||||
get_file: network/scripts/run-os-net-config.sh
|
use_dhcp: true
|
||||||
params:
|
dns_servers:
|
||||||
$network_config:
|
get_param: DnsServers
|
||||||
network_config:
|
domain:
|
||||||
- type: ovs_bridge
|
get_param: DnsSearchDomains
|
||||||
name: bridge_name
|
members:
|
||||||
use_dhcp: true
|
- type: interface
|
||||||
dns_servers:
|
name: interface_name
|
||||||
get_param: DnsServers
|
# force the MAC address of the bridge to this interface
|
||||||
domain:
|
primary: true
|
||||||
get_param: DnsSearchDomains
|
- type: interface
|
||||||
members:
|
name: br-ex:0
|
||||||
- type: interface
|
addresses:
|
||||||
name: interface_name
|
- ip_netmask:
|
||||||
# force the MAC address of the bridge to this interface
|
list_join:
|
||||||
primary: true
|
- /
|
||||||
- type: interface
|
- - get_param: ControlPlaneIp
|
||||||
name: br-ex:0
|
- get_param: ControlPlaneSubnetCidr
|
||||||
addresses:
|
routes:
|
||||||
- ip_netmask:
|
- default: true
|
||||||
list_join:
|
next_hop:
|
||||||
- /
|
get_param: ControlPlaneDefaultRoute
|
||||||
- - get_param: ControlPlaneIp
|
|
||||||
- get_param: ControlPlaneSubnetCidr
|
|
||||||
routes:
|
|
||||||
- default: true
|
|
||||||
next_hop:
|
|
||||||
get_param: ControlPlaneDefaultRoute
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
value:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
@ -74,41 +74,35 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: ovs_bridge
|
||||||
template:
|
name: bridge_name
|
||||||
get_file: network/scripts/run-os-net-config.sh
|
use_dhcp: false
|
||||||
params:
|
dns_servers:
|
||||||
$network_config:
|
get_param: DnsServers
|
||||||
network_config:
|
domain:
|
||||||
- type: ovs_bridge
|
get_param: DnsSearchDomains
|
||||||
name: bridge_name
|
addresses:
|
||||||
use_dhcp: false
|
- ip_netmask:
|
||||||
dns_servers:
|
list_join:
|
||||||
get_param: DnsServers
|
- /
|
||||||
domain:
|
- - get_param: ControlPlaneIp
|
||||||
get_param: DnsSearchDomains
|
- get_param: ControlPlaneSubnetCidr
|
||||||
addresses:
|
routes:
|
||||||
- ip_netmask:
|
- default: true
|
||||||
list_join:
|
next_hop:
|
||||||
- /
|
get_param: ControlPlaneDefaultRoute
|
||||||
- - get_param: ControlPlaneIp
|
members:
|
||||||
- get_param: ControlPlaneSubnetCidr
|
- type: interface
|
||||||
routes:
|
name: interface_name
|
||||||
- default: true
|
# force the MAC address of the bridge to this interface
|
||||||
next_hop:
|
primary: true
|
||||||
get_param: ControlPlaneDefaultRoute
|
|
||||||
members:
|
|
||||||
- type: interface
|
|
||||||
name: interface_name
|
|
||||||
# force the MAC address of the bridge to this interface
|
|
||||||
primary: true
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
value:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
|
||||||
|
@ -73,36 +73,30 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: interface
|
||||||
template:
|
name: interface_name
|
||||||
get_file: network/scripts/run-os-net-config.sh
|
use_dhcp: false
|
||||||
params:
|
dns_servers:
|
||||||
$network_config:
|
get_param: DnsServers
|
||||||
network_config:
|
domain:
|
||||||
- type: interface
|
get_param: DnsSearchDomains
|
||||||
name: interface_name
|
addresses:
|
||||||
use_dhcp: false
|
- ip_netmask:
|
||||||
dns_servers:
|
list_join:
|
||||||
get_param: DnsServers
|
- /
|
||||||
domain:
|
- - get_param: ControlPlaneIp
|
||||||
get_param: DnsSearchDomains
|
- get_param: ControlPlaneSubnetCidr
|
||||||
addresses:
|
routes:
|
||||||
- ip_netmask:
|
- default: true
|
||||||
list_join:
|
next_hop:
|
||||||
- /
|
get_param: ControlPlaneDefaultRoute
|
||||||
- - get_param: ControlPlaneIp
|
|
||||||
- get_param: ControlPlaneSubnetCidr
|
|
||||||
routes:
|
|
||||||
- default: true
|
|
||||||
next_hop:
|
|
||||||
get_param: ControlPlaneDefaultRoute
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
get_attr:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
|
||||||
|
@ -97,65 +97,55 @@ conditions:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
inputs:
|
if:
|
||||||
- name: disable_configure_safe_defaults
|
- undercloud_net_config_override
|
||||||
default: true
|
- {get_param: UndercloudNetConfigOverride}
|
||||||
config:
|
- network_config:
|
||||||
str_replace:
|
- type: ovs_bridge
|
||||||
template:
|
name: br-ctlplane
|
||||||
get_file: network/scripts/run-os-net-config.sh
|
use_dhcp: false
|
||||||
params:
|
dns_servers:
|
||||||
$network_config:
|
get_param: DnsServers
|
||||||
|
domain:
|
||||||
|
get_param: DnsSearchDomains
|
||||||
|
ovs_extra:
|
||||||
|
- "br-set-external-id br-ctlplane bridge-id br-ctlplane"
|
||||||
|
addresses:
|
||||||
|
- ip_netmask:
|
||||||
|
list_join:
|
||||||
|
- /
|
||||||
|
- - get_param: ControlPlaneIp
|
||||||
|
- get_param: ControlPlaneSubnetCidr
|
||||||
|
-
|
||||||
if:
|
if:
|
||||||
- undercloud_net_config_override
|
- control_virtual_ip_unset
|
||||||
- {get_param: UndercloudNetConfigOverride}
|
- {}
|
||||||
- network_config:
|
- ip_netmask:
|
||||||
- type: ovs_bridge
|
list_join:
|
||||||
name: br-ctlplane
|
- /
|
||||||
use_dhcp: false
|
- - {get_param: [DeployedServerPortMap, 'control_virtual_ip', fixed_ips, 0, ip_address]}
|
||||||
dns_servers:
|
- {if: [control_virtual_ip_is_ipv6, '128', '32']}
|
||||||
get_param: DnsServers
|
-
|
||||||
domain:
|
if:
|
||||||
get_param: DnsSearchDomains
|
- public_virtual_ip_unset
|
||||||
ovs_extra:
|
- {}
|
||||||
- "br-set-external-id br-ctlplane bridge-id br-ctlplane"
|
- ip_netmask:
|
||||||
addresses:
|
list_join:
|
||||||
- ip_netmask:
|
- /
|
||||||
list_join:
|
- - {get_param: [DeployedServerPortMap, 'public_virtual_ip', fixed_ips, 0, ip_address]}
|
||||||
- /
|
- {if: [public_virtual_ip_is_ipv6, '128', '32']}
|
||||||
- - get_param: ControlPlaneIp
|
routes: {get_param: ControlPlaneStaticRoutes}
|
||||||
- get_param: ControlPlaneSubnetCidr
|
members:
|
||||||
-
|
- type: interface
|
||||||
if:
|
name: {get_param: NeutronPublicInterface}
|
||||||
- control_virtual_ip_unset
|
# force the MAC address of the bridge to this interface
|
||||||
- {}
|
primary: true
|
||||||
- ip_netmask:
|
mtu: {get_param: UndercloudLocalMtu}
|
||||||
list_join:
|
|
||||||
- /
|
|
||||||
- - {get_param: [DeployedServerPortMap, 'control_virtual_ip', fixed_ips, 0, ip_address]}
|
|
||||||
- {if: [control_virtual_ip_is_ipv6, '128', '32']}
|
|
||||||
-
|
|
||||||
if:
|
|
||||||
- public_virtual_ip_unset
|
|
||||||
- {}
|
|
||||||
- ip_netmask:
|
|
||||||
list_join:
|
|
||||||
- /
|
|
||||||
- - {get_param: [DeployedServerPortMap, 'public_virtual_ip', fixed_ips, 0, ip_address]}
|
|
||||||
- {if: [public_virtual_ip_is_ipv6, '128', '32']}
|
|
||||||
routes: {get_param: ControlPlaneStaticRoutes}
|
|
||||||
members:
|
|
||||||
- type: interface
|
|
||||||
name: {get_param: NeutronPublicInterface}
|
|
||||||
# force the MAC address of the bridge to this interface
|
|
||||||
primary: true
|
|
||||||
mtu: {get_param: UndercloudLocalMtu}
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
value:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
|
||||||
|
@ -137,157 +137,151 @@ resources:
|
|||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: interface
|
||||||
template:
|
name: nic1
|
||||||
get_file: ../../scripts/run-os-net-config.sh
|
mtu:
|
||||||
params:
|
get_param: ControlPlaneMtu
|
||||||
$network_config:
|
use_dhcp: false
|
||||||
network_config:
|
addresses:
|
||||||
- type: interface
|
- ip_netmask:
|
||||||
name: nic1
|
list_join:
|
||||||
mtu:
|
- /
|
||||||
get_param: ControlPlaneMtu
|
- - get_param: ControlPlaneIp
|
||||||
use_dhcp: false
|
- get_param: ControlPlaneSubnetCidr
|
||||||
addresses:
|
routes:
|
||||||
- ip_netmask:
|
list_concat_unique:
|
||||||
list_join:
|
- get_param: ControlPlaneStaticRoutes
|
||||||
- /
|
|
||||||
- - get_param: ControlPlaneIp
|
|
||||||
- get_param: ControlPlaneSubnetCidr
|
|
||||||
routes:
|
|
||||||
list_concat_unique:
|
|
||||||
- get_param: ControlPlaneStaticRoutes
|
|
||||||
{%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %}
|
{%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop:
|
next_hop:
|
||||||
get_param: ControlPlaneDefaultRoute
|
get_param: ControlPlaneDefaultRoute
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
- type: linux_bond
|
- type: linux_bond
|
||||||
name: bond_api
|
name: bond_api
|
||||||
mtu:
|
mtu:
|
||||||
get_attr: [MinViableMtuBondApi, value]
|
get_attr: [MinViableMtuBondApi, value]
|
||||||
use_dhcp: false
|
use_dhcp: false
|
||||||
bonding_options:
|
bonding_options:
|
||||||
get_param: BondInterfaceOvsOptions
|
get_param: BondInterfaceOvsOptions
|
||||||
dns_servers:
|
dns_servers:
|
||||||
get_param: DnsServers
|
get_param: DnsServers
|
||||||
domain:
|
domain:
|
||||||
get_param: DnsSearchDomains
|
get_param: DnsSearchDomains
|
||||||
members:
|
members:
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic2
|
name: nic2
|
||||||
mtu:
|
mtu:
|
||||||
get_attr: [MinViableMtuBondApi, value]
|
get_attr: [MinViableMtuBondApi, value]
|
||||||
primary: true
|
primary: true
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic3
|
name: nic3
|
||||||
mtu:
|
mtu:
|
||||||
get_attr: [MinViableMtuBondApi, value]
|
get_attr: [MinViableMtuBondApi, value]
|
||||||
{%- for network in networks if network.enabled|default(true) and network.name in _role_networks and not network.name.startswith('Tenant') %}
|
{%- for network in networks if network.enabled|default(true) and network.name in _role_networks and not network.name.startswith('Tenant') %}
|
||||||
- type: vlan
|
- type: vlan
|
||||||
device: bond_api
|
device: bond_api
|
||||||
mtu:
|
mtu:
|
||||||
get_param: {{network.name}}Mtu
|
get_param: {{network.name}}Mtu
|
||||||
vlan_id:
|
vlan_id:
|
||||||
get_param: {{network.name}}NetworkVlanID
|
get_param: {{network.name}}NetworkVlanID
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask:
|
- ip_netmask:
|
||||||
get_param: {{network.name}}IpSubnet
|
get_param: {{network.name}}IpSubnet
|
||||||
routes:
|
routes:
|
||||||
list_concat_unique:
|
list_concat_unique:
|
||||||
- get_param: {{network.name}}InterfaceRoutes
|
- get_param: {{network.name}}InterfaceRoutes
|
||||||
{%- if network.name in role.default_route_networks %}
|
{%- if network.name in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop:
|
next_hop:
|
||||||
get_param: {{network.name}}InterfaceDefaultRoute
|
get_param: {{network.name}}InterfaceDefaultRoute
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{%- if not role.name.startswith('ComputeOvsDpdk') %}
|
{%- if not role.name.startswith('ComputeOvsDpdk') %}
|
||||||
- type: ovs_bridge
|
- type: ovs_bridge
|
||||||
name: bridge_name
|
name: bridge_name
|
||||||
dns_servers:
|
dns_servers:
|
||||||
get_param: DnsServers
|
get_param: DnsServers
|
||||||
members:
|
members:
|
||||||
- type: linux_bond
|
- type: linux_bond
|
||||||
name: bond-data
|
name: bond-data
|
||||||
mtu:
|
mtu:
|
||||||
get_attr: [MinViableMtuBondData, value]
|
get_attr: [MinViableMtuBondData, value]
|
||||||
bonding_options:
|
bonding_options:
|
||||||
get_param: BondInterfaceOvsOptions
|
get_param: BondInterfaceOvsOptions
|
||||||
members:
|
members:
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic4
|
name: nic4
|
||||||
mtu:
|
mtu:
|
||||||
get_attr: [MinViableMtuBondData, value]
|
get_attr: [MinViableMtuBondData, value]
|
||||||
primary: true
|
primary: true
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic5
|
name: nic5
|
||||||
mtu:
|
mtu:
|
||||||
get_attr: [MinViableMtuBondData, value]
|
get_attr: [MinViableMtuBondData, value]
|
||||||
{%- for network in networks if network.name.startswith('Tenant') and network.name in _role_networks and network.enabled|default(true) %}
|
{%- for network in networks if network.name.startswith('Tenant') and network.name in _role_networks and network.enabled|default(true) %}
|
||||||
- type: vlan
|
- type: vlan
|
||||||
device: bond-data
|
device: bond-data
|
||||||
mtu:
|
mtu:
|
||||||
get_param: {{network.name}}Mtu
|
get_param: {{network.name}}Mtu
|
||||||
vlan_id:
|
vlan_id:
|
||||||
get_param: {{network.name}}NetworkVlanID
|
get_param: {{network.name}}NetworkVlanID
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask:
|
- ip_netmask:
|
||||||
get_param: {{network.name}}IpSubnet
|
get_param: {{network.name}}IpSubnet
|
||||||
routes:
|
routes:
|
||||||
list_concat_unique:
|
list_concat_unique:
|
||||||
- get_param: {{network.name}}InterfaceRoutes
|
- get_param: {{network.name}}InterfaceRoutes
|
||||||
{%- if network.name in role.default_route_networks %}
|
{%- if network.name in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop:
|
next_hop:
|
||||||
get_param: {{network.name}}InterfaceDefaultRoute
|
get_param: {{network.name}}InterfaceDefaultRoute
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
- type: ovs_user_bridge
|
- type: ovs_user_bridge
|
||||||
name: br-dpdk0
|
name: br-dpdk0
|
||||||
use_dhcp: false
|
use_dhcp: false
|
||||||
{%- for network in networks if network.name.startswith('Tenant') and network.name in _role_networks and network.enabled|default(true) %}
|
{%- for network in networks if network.name.startswith('Tenant') and network.name in _role_networks and network.enabled|default(true) %}
|
||||||
ovs_extra:
|
ovs_extra:
|
||||||
- str_replace:
|
- str_replace:
|
||||||
template: set port br-dpdk0 tag=_VLAN_TAG_
|
template: set port br-dpdk0 tag=_VLAN_TAG_
|
||||||
params:
|
params:
|
||||||
_VLAN_TAG_: {get_param: {{network.name}}NetworkVlanID}
|
_VLAN_TAG_: {get_param: {{network.name}}NetworkVlanID}
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask: {get_param: {{network.name}}IpSubnet}
|
- ip_netmask: {get_param: {{network.name}}IpSubnet}
|
||||||
routes:
|
routes:
|
||||||
list_concat_unique:
|
list_concat_unique:
|
||||||
- get_param: {{network.name}}InterfaceRoutes
|
- get_param: {{network.name}}InterfaceRoutes
|
||||||
{%- if network.name in role.default_route_networks %}
|
{%- if network.name in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop:
|
next_hop:
|
||||||
get_param: {{network.name}}InterfaceDefaultRoute
|
get_param: {{network.name}}InterfaceDefaultRoute
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
members:
|
members:
|
||||||
- type: ovs_dpdk_bond
|
- type: ovs_dpdk_bond
|
||||||
name: dpdkbond0
|
name: dpdkbond0
|
||||||
rx_queue:
|
rx_queue:
|
||||||
get_param: NumDpdkInterfaceRxQueues
|
get_param: NumDpdkInterfaceRxQueues
|
||||||
members:
|
members:
|
||||||
- type: ovs_dpdk_port
|
- type: ovs_dpdk_port
|
||||||
name: dpdk0
|
name: dpdk0
|
||||||
members:
|
members:
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic4
|
name: nic4
|
||||||
- type: ovs_dpdk_port
|
- type: ovs_dpdk_port
|
||||||
name: dpdk1
|
name: dpdk1
|
||||||
members:
|
members:
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic5
|
name: nic5
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
value:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
|
||||||
|
@ -82,99 +82,93 @@ parameters:
|
|||||||
type: string
|
type: string
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: interface
|
||||||
template:
|
name: nic1
|
||||||
get_file: ../../scripts/run-os-net-config.sh
|
use_dhcp: false
|
||||||
params:
|
dns_servers:
|
||||||
$network_config:
|
get_param: DnsServers
|
||||||
network_config:
|
domain:
|
||||||
- type: interface
|
get_param: DnsSearchDomains
|
||||||
name: nic1
|
addresses:
|
||||||
use_dhcp: false
|
- ip_netmask:
|
||||||
dns_servers:
|
list_join:
|
||||||
get_param: DnsServers
|
- /
|
||||||
domain:
|
- - get_param: ControlPlaneIp
|
||||||
get_param: DnsSearchDomains
|
- get_param: ControlPlaneSubnetCidr
|
||||||
addresses:
|
routes:
|
||||||
- ip_netmask:
|
list_concat_unique:
|
||||||
list_join:
|
- get_param: ControlPlaneStaticRoutes
|
||||||
- /
|
- - default: true # NOTE(hjensas): This is the IPv4 default route
|
||||||
- - get_param: ControlPlaneIp
|
next_hop:
|
||||||
- get_param: ControlPlaneSubnetCidr
|
get_param: ControlPlaneDefaultRoute
|
||||||
routes:
|
- type: ovs_bridge
|
||||||
list_concat_unique:
|
name: bridge_name
|
||||||
- get_param: ControlPlaneStaticRoutes
|
use_dhcp: true
|
||||||
- - default: true # NOTE(hjensas): This is the IPv4 default route
|
members:
|
||||||
next_hop:
|
- type: ovs_bond
|
||||||
get_param: ControlPlaneDefaultRoute
|
name: bond1
|
||||||
- type: ovs_bridge
|
ovs_options:
|
||||||
name: bridge_name
|
get_param: BondInterfaceOvsOptions
|
||||||
use_dhcp: true
|
members:
|
||||||
members:
|
- type: interface
|
||||||
- type: ovs_bond
|
name: nic2
|
||||||
name: bond1
|
primary: true
|
||||||
ovs_options:
|
- type: interface
|
||||||
get_param: BondInterfaceOvsOptions
|
name: nic3
|
||||||
members:
|
- type: vlan
|
||||||
- type: interface
|
vlan_id:
|
||||||
name: nic2
|
get_param: InternalApiNetworkVlanID
|
||||||
primary: true
|
addresses:
|
||||||
- type: interface
|
- ip_netmask:
|
||||||
name: nic3
|
get_param: InternalApiIpSubnet
|
||||||
- type: vlan
|
routes:
|
||||||
vlan_id:
|
get_param: InternalApiInterfaceRoutes
|
||||||
get_param: InternalApiNetworkVlanID
|
- type: vlan
|
||||||
addresses:
|
vlan_id:
|
||||||
- ip_netmask:
|
get_param: StorageNetworkVlanID
|
||||||
get_param: InternalApiIpSubnet
|
addresses:
|
||||||
routes:
|
- ip_netmask:
|
||||||
get_param: InternalApiInterfaceRoutes
|
get_param: StorageIpSubnet
|
||||||
- type: vlan
|
routes:
|
||||||
vlan_id:
|
get_param: StorageInterfaceRoutes
|
||||||
get_param: StorageNetworkVlanID
|
- type: vlan
|
||||||
addresses:
|
vlan_id:
|
||||||
- ip_netmask:
|
get_param: StorageMgmtNetworkVlanID
|
||||||
get_param: StorageIpSubnet
|
addresses:
|
||||||
routes:
|
- ip_netmask:
|
||||||
get_param: StorageInterfaceRoutes
|
get_param: StorageMgmtIpSubnet
|
||||||
- type: vlan
|
routes:
|
||||||
vlan_id:
|
get_param: StorageMgmtInterfaceRoutes
|
||||||
get_param: StorageMgmtNetworkVlanID
|
- type: vlan
|
||||||
addresses:
|
vlan_id:
|
||||||
- ip_netmask:
|
get_param: TenantNetworkVlanID
|
||||||
get_param: StorageMgmtIpSubnet
|
addresses:
|
||||||
routes:
|
- ip_netmask:
|
||||||
get_param: StorageMgmtInterfaceRoutes
|
get_param: TenantIpSubnet
|
||||||
- type: vlan
|
routes:
|
||||||
vlan_id:
|
get_param: TenantInterfaceRoutes
|
||||||
get_param: TenantNetworkVlanID
|
# Uncomment when including environments/network-management.yaml
|
||||||
addresses:
|
# If setting default route on the Management interface, comment
|
||||||
- ip_netmask:
|
# out the default route on the Control Plane.
|
||||||
get_param: TenantIpSubnet
|
#- type: vlan
|
||||||
routes:
|
# vlan_id:
|
||||||
get_param: TenantInterfaceRoutes
|
# get_param: ManagementNetworkVlanID
|
||||||
# Uncomment when including environments/network-management.yaml
|
# addresses:
|
||||||
# If setting default route on the Management interface, comment
|
# - ip_netmask:
|
||||||
# out the default route on the Control Plane.
|
# get_param: ManagementIpSubnet
|
||||||
#- type: vlan
|
# routes:
|
||||||
# vlan_id:
|
# list_concat_unique:
|
||||||
# get_param: ManagementNetworkVlanID
|
# - get_param: ManagementInterfaceRoutes
|
||||||
# addresses:
|
# - - default: true
|
||||||
# - ip_netmask:
|
# next_hop:
|
||||||
# get_param: ManagementIpSubnet
|
# get_param: ManagementInterfaceDefaultRoute
|
||||||
# routes:
|
|
||||||
# list_concat_unique:
|
|
||||||
# - get_param: ManagementInterfaceRoutes
|
|
||||||
# - - default: true
|
|
||||||
# next_hop:
|
|
||||||
# get_param: ManagementInterfaceDefaultRoute
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
value:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
|
||||||
|
@ -115,144 +115,138 @@ resources:
|
|||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: interface
|
||||||
template:
|
name: nic1
|
||||||
get_file: ../../scripts/run-os-net-config.sh
|
mtu:
|
||||||
params:
|
get_param: ControlPlaneMtu
|
||||||
$network_config:
|
use_dhcp: false
|
||||||
network_config:
|
addresses:
|
||||||
- type: interface
|
- ip_netmask:
|
||||||
name: nic1
|
list_join:
|
||||||
mtu:
|
- /
|
||||||
get_param: ControlPlaneMtu
|
- - get_param: ControlPlaneIp
|
||||||
use_dhcp: false
|
- get_param: ControlPlaneSubnetCidr
|
||||||
addresses:
|
routes:
|
||||||
- ip_netmask:
|
list_concat_unique:
|
||||||
list_join:
|
- get_param: ControlPlaneStaticRoutes
|
||||||
- /
|
|
||||||
- - get_param: ControlPlaneIp
|
|
||||||
- get_param: ControlPlaneSubnetCidr
|
|
||||||
routes:
|
|
||||||
list_concat_unique:
|
|
||||||
- get_param: ControlPlaneStaticRoutes
|
|
||||||
{%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %}
|
{%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop:
|
next_hop:
|
||||||
get_param: ControlPlaneDefaultRoute
|
get_param: ControlPlaneDefaultRoute
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if not role.name.startswith('ComputeOvsDpdk') %}
|
{%- if not role.name.startswith('ComputeOvsDpdk') %}
|
||||||
- type: ovs_bridge
|
- type: ovs_bridge
|
||||||
{%- if role.name.startswith('CephStorage') or role.name.startswith('ObjectStorage') or role.name.startswith('BlockStorage') %}
|
{%- if role.name.startswith('CephStorage') or role.name.startswith('ObjectStorage') or role.name.startswith('BlockStorage') %}
|
||||||
name: br-bond
|
name: br-bond
|
||||||
{%- else %}
|
{%- else %}
|
||||||
name: bridge_name
|
name: bridge_name
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
dns_servers:
|
dns_servers:
|
||||||
get_param: DnsServers
|
get_param: DnsServers
|
||||||
domain:
|
domain:
|
||||||
get_param: DnsSearchDomains
|
get_param: DnsSearchDomains
|
||||||
members:
|
members:
|
||||||
- type: ovs_bond
|
- type: ovs_bond
|
||||||
name: bond1
|
name: bond1
|
||||||
mtu:
|
mtu:
|
||||||
get_attr: [MinViableMtu, value]
|
get_attr: [MinViableMtu, value]
|
||||||
ovs_options:
|
ovs_options:
|
||||||
get_param: BondInterfaceOvsOptions
|
get_param: BondInterfaceOvsOptions
|
||||||
members:
|
members:
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic2
|
name: nic2
|
||||||
mtu:
|
mtu:
|
||||||
get_attr: [MinViableMtu, value]
|
get_attr: [MinViableMtu, value]
|
||||||
primary: true
|
primary: true
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic3
|
name: nic3
|
||||||
mtu:
|
mtu:
|
||||||
get_attr: [MinViableMtu, value]
|
get_attr: [MinViableMtu, value]
|
||||||
{%- for network in networks if network.enabled|default(true) and network.name in _role_networks %}
|
{%- for network in networks if network.enabled|default(true) and network.name in _role_networks %}
|
||||||
- type: vlan
|
- type: vlan
|
||||||
mtu:
|
mtu:
|
||||||
get_param: {{network.name}}Mtu
|
get_param: {{network.name}}Mtu
|
||||||
vlan_id:
|
vlan_id:
|
||||||
get_param: {{network.name}}NetworkVlanID
|
get_param: {{network.name}}NetworkVlanID
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask:
|
- ip_netmask:
|
||||||
get_param: {{network.name}}IpSubnet
|
get_param: {{network.name}}IpSubnet
|
||||||
routes:
|
routes:
|
||||||
list_concat_unique:
|
list_concat_unique:
|
||||||
- get_param: {{network.name}}InterfaceRoutes
|
- get_param: {{network.name}}InterfaceRoutes
|
||||||
{%- if network.name in role.default_route_networks %}
|
{%- if network.name in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop:
|
next_hop:
|
||||||
get_param: {{network.name}}InterfaceDefaultRoute
|
get_param: {{network.name}}InterfaceDefaultRoute
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
# Linux bond for non-DPDK traffic required when using DPDK
|
# Linux bond for non-DPDK traffic required when using DPDK
|
||||||
- type: linux_bond
|
- type: linux_bond
|
||||||
name: bond_api
|
name: bond_api
|
||||||
mtu:
|
mtu:
|
||||||
get_attr: [MinViableMtu, value]
|
get_attr: [MinViableMtu, value]
|
||||||
bonding_options:
|
bonding_options:
|
||||||
get_param: BondInterfaceOvsOptions
|
get_param: BondInterfaceOvsOptions
|
||||||
use_dhcp: false
|
use_dhcp: false
|
||||||
dns_servers:
|
dns_servers:
|
||||||
get_param: DnsServers
|
get_param: DnsServers
|
||||||
members:
|
members:
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic2
|
name: nic2
|
||||||
mtu:
|
mtu:
|
||||||
get_attr: [MinViableMtu, value]
|
get_attr: [MinViableMtu, value]
|
||||||
primary: true
|
primary: true
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic3
|
name: nic3
|
||||||
mtu:
|
mtu:
|
||||||
get_attr: [MinViableMtu, value]
|
get_attr: [MinViableMtu, value]
|
||||||
{%- for network in networks if network.enabled|default(true) and network.name in _role_networks %}
|
{%- for network in networks if network.enabled|default(true) and network.name in _role_networks %}
|
||||||
- type: vlan
|
- type: vlan
|
||||||
device: bond_api
|
device: bond_api
|
||||||
mtu:
|
mtu:
|
||||||
get_param: {{network.name}}Mtu
|
get_param: {{network.name}}Mtu
|
||||||
vlan_id:
|
vlan_id:
|
||||||
get_param: {{network.name}}NetworkVlanID
|
get_param: {{network.name}}NetworkVlanID
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask:
|
- ip_netmask:
|
||||||
get_param: {{network.name}}IpSubnet
|
get_param: {{network.name}}IpSubnet
|
||||||
routes:
|
routes:
|
||||||
list_concat_unique:
|
list_concat_unique:
|
||||||
- get_param: {{network.name}}InterfaceRoutes
|
- get_param: {{network.name}}InterfaceRoutes
|
||||||
{%- if network.name in role.default_route_networks %}
|
{%- if network.name in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop:
|
next_hop:
|
||||||
get_param: {{network.name}}InterfaceDefaultRoute
|
get_param: {{network.name}}InterfaceDefaultRoute
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
# Used as a provider network with external DHCP
|
# Used as a provider network with external DHCP
|
||||||
- type: ovs_user_bridge
|
- type: ovs_user_bridge
|
||||||
name: br-dpdk0
|
name: br-dpdk0
|
||||||
members:
|
members:
|
||||||
- type: ovs_dpdk_bond
|
- type: ovs_dpdk_bond
|
||||||
name: dpdkbond0
|
name: dpdkbond0
|
||||||
rx_queue:
|
rx_queue:
|
||||||
get_param: NumDpdkInterfaceRxQueues
|
get_param: NumDpdkInterfaceRxQueues
|
||||||
members:
|
members:
|
||||||
- type: ovs_dpdk_port
|
- type: ovs_dpdk_port
|
||||||
name: dpdk0
|
name: dpdk0
|
||||||
members:
|
members:
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic4
|
name: nic4
|
||||||
- type: ovs_dpdk_port
|
- type: ovs_dpdk_port
|
||||||
name: dpdk1
|
name: dpdk1
|
||||||
members:
|
members:
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic5
|
name: nic5
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
value:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
|
||||||
|
@ -79,120 +79,114 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: interface
|
||||||
template:
|
name: nic1
|
||||||
get_file: ../../scripts/run-os-net-config.sh
|
mtu:
|
||||||
params:
|
get_param: ControlPlaneMtu
|
||||||
$network_config:
|
use_dhcp: false
|
||||||
network_config:
|
dns_servers:
|
||||||
- type: interface
|
get_param: DnsServers
|
||||||
name: nic1
|
domain:
|
||||||
mtu:
|
get_param: DnsSearchDomains
|
||||||
get_param: ControlPlaneMtu
|
addresses:
|
||||||
use_dhcp: false
|
- ip_netmask:
|
||||||
dns_servers:
|
list_join:
|
||||||
get_param: DnsServers
|
- /
|
||||||
domain:
|
- - get_param: ControlPlaneIp
|
||||||
get_param: DnsSearchDomains
|
- get_param: ControlPlaneSubnetCidr
|
||||||
addresses:
|
routes:
|
||||||
- ip_netmask:
|
list_concat_unique:
|
||||||
list_join:
|
- get_param: ControlPlaneStaticRoutes
|
||||||
- /
|
- - default: true
|
||||||
- - get_param: ControlPlaneIp
|
next_hop:
|
||||||
- get_param: ControlPlaneSubnetCidr
|
get_param: ControlPlaneDefaultRoute
|
||||||
routes:
|
- type: interface
|
||||||
list_concat_unique:
|
name: nic2
|
||||||
- get_param: ControlPlaneStaticRoutes
|
mtu:
|
||||||
- - default: true
|
get_param: StorageMtu
|
||||||
next_hop:
|
use_dhcp: false
|
||||||
get_param: ControlPlaneDefaultRoute
|
- type: vlan
|
||||||
- type: interface
|
device: nic2
|
||||||
name: nic2
|
mtu:
|
||||||
mtu:
|
get_param: StorageMtu
|
||||||
get_param: StorageMtu
|
vlan_id:
|
||||||
use_dhcp: false
|
get_param: StorageNetworkVlanID
|
||||||
- type: vlan
|
addresses:
|
||||||
device: nic2
|
- ip_netmask:
|
||||||
mtu:
|
get_param: StorageIpSubnet
|
||||||
get_param: StorageMtu
|
routes:
|
||||||
vlan_id:
|
get_param: StorageInterfaceRoutes
|
||||||
get_param: StorageNetworkVlanID
|
- type: interface
|
||||||
addresses:
|
name: nic4
|
||||||
- ip_netmask:
|
mtu:
|
||||||
get_param: StorageIpSubnet
|
get_param: InternalApiMtu
|
||||||
routes:
|
use_dhcp: false
|
||||||
get_param: StorageInterfaceRoutes
|
- type: vlan
|
||||||
- type: interface
|
device: nic4
|
||||||
name: nic4
|
mtu:
|
||||||
mtu:
|
get_param: InternalApiMtu
|
||||||
get_param: InternalApiMtu
|
vlan_id:
|
||||||
use_dhcp: false
|
get_param: InternalApiNetworkVlanID
|
||||||
- type: vlan
|
addresses:
|
||||||
device: nic4
|
- ip_netmask:
|
||||||
mtu:
|
get_param: InternalApiIpSubnet
|
||||||
get_param: InternalApiMtu
|
routes:
|
||||||
vlan_id:
|
get_param: InternalApiInterfaceRoutes
|
||||||
get_param: InternalApiNetworkVlanID
|
- type: ovs_bridge
|
||||||
addresses:
|
name: br-tenant
|
||||||
- ip_netmask:
|
mtu:
|
||||||
get_param: InternalApiIpSubnet
|
get_param: TenantMtu
|
||||||
routes:
|
use_dhcp: false
|
||||||
get_param: InternalApiInterfaceRoutes
|
addresses:
|
||||||
- type: ovs_bridge
|
- ip_netmask:
|
||||||
name: br-tenant
|
get_param: TenantIpSubnet
|
||||||
mtu:
|
routes:
|
||||||
get_param: TenantMtu
|
get_param: TenantInterfaceRoutes
|
||||||
use_dhcp: false
|
members:
|
||||||
addresses:
|
- type: interface
|
||||||
- ip_netmask:
|
name: nic5
|
||||||
get_param: TenantIpSubnet
|
mtu:
|
||||||
routes:
|
get_param: TenantMtu
|
||||||
get_param: TenantInterfaceRoutes
|
use_dhcp: false
|
||||||
members:
|
primary: true
|
||||||
- type: interface
|
# External bridge for DVR (no IP address required)
|
||||||
name: nic5
|
- type: ovs_bridge
|
||||||
mtu:
|
name: bridge_name
|
||||||
get_param: TenantMtu
|
mtu:
|
||||||
use_dhcp: false
|
get_param: ExternalMtu
|
||||||
primary: true
|
dns_servers:
|
||||||
# External bridge for DVR (no IP address required)
|
get_param: DnsServers
|
||||||
- type: ovs_bridge
|
use_dhcp: false
|
||||||
name: bridge_name
|
members:
|
||||||
mtu:
|
- type: interface
|
||||||
get_param: ExternalMtu
|
name: nic6
|
||||||
dns_servers:
|
mtu:
|
||||||
get_param: DnsServers
|
get_param: ExternalMtu
|
||||||
use_dhcp: false
|
primary: true
|
||||||
members:
|
# Uncomment when including environments/network-management.yaml
|
||||||
- type: interface
|
# If setting default route on the Management interface, comment
|
||||||
name: nic6
|
# out the default route on the Control Plane.
|
||||||
mtu:
|
#- type: interface
|
||||||
get_param: ExternalMtu
|
# name: nic7
|
||||||
primary: true
|
# mtu:
|
||||||
# Uncomment when including environments/network-management.yaml
|
# get_param: ManagementMtu
|
||||||
# If setting default route on the Management interface, comment
|
# use_dhcp: false
|
||||||
# out the default route on the Control Plane.
|
# addresses:
|
||||||
#- type: interface
|
# - ip_netmask:
|
||||||
# name: nic7
|
# get_param: ManagementIpSubnet
|
||||||
# mtu:
|
# routes:
|
||||||
# get_param: ManagementMtu
|
# list_concat_unique:
|
||||||
# use_dhcp: false
|
# - get_param: ManagementInterfaceRoutes
|
||||||
# addresses:
|
# - - default: true
|
||||||
# - ip_netmask:
|
# next_hop:
|
||||||
# get_param: ManagementIpSubnet
|
# get_param: ManagementInterfaceDefaultRoute
|
||||||
# routes:
|
|
||||||
# list_concat_unique:
|
|
||||||
# - get_param: ManagementInterfaceRoutes
|
|
||||||
# - - default: true
|
|
||||||
# next_hop:
|
|
||||||
# get_param: ManagementInterfaceDefaultRoute
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
value:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
|
||||||
|
@ -101,102 +101,96 @@ parameters:
|
|||||||
{%- endif %}
|
{%- endif %}
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: interface
|
||||||
template:
|
name: nic1
|
||||||
get_file: ../../scripts/run-os-net-config.sh
|
mtu:
|
||||||
params:
|
get_param: ControlPlaneMtu
|
||||||
$network_config:
|
use_dhcp: false
|
||||||
network_config:
|
dns_servers:
|
||||||
- type: interface
|
get_param: DnsServers
|
||||||
name: nic1
|
domain:
|
||||||
mtu:
|
get_param: DnsSearchDomains
|
||||||
get_param: ControlPlaneMtu
|
addresses:
|
||||||
use_dhcp: false
|
- ip_netmask:
|
||||||
dns_servers:
|
list_join:
|
||||||
get_param: DnsServers
|
- /
|
||||||
domain:
|
- - get_param: ControlPlaneIp
|
||||||
get_param: DnsSearchDomains
|
- get_param: ControlPlaneSubnetCidr
|
||||||
addresses:
|
routes:
|
||||||
- ip_netmask:
|
list_concat_unique:
|
||||||
list_join:
|
- get_param: ControlPlaneStaticRoutes
|
||||||
- /
|
|
||||||
- - get_param: ControlPlaneIp
|
|
||||||
- get_param: ControlPlaneSubnetCidr
|
|
||||||
routes:
|
|
||||||
list_concat_unique:
|
|
||||||
- get_param: ControlPlaneStaticRoutes
|
|
||||||
{%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %}
|
{%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop:
|
next_hop:
|
||||||
get_param: ControlPlaneDefaultRoute
|
get_param: ControlPlaneDefaultRoute
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- set nics_used = [1] %}
|
{%- set nics_used = [1] %}
|
||||||
{%- for network in networks if network.enabled|default(true) and network.name not in role.networks_skip_config|default([]) %}
|
{%- for network in networks if network.enabled|default(true) and network.name not in role.networks_skip_config|default([]) %}
|
||||||
{%- if network.name not in ["External", "Tenant"] %}
|
{%- if network.name not in ["External", "Tenant"] %}
|
||||||
{%- if network.name in _role_networks %}
|
{%- if network.name in _role_networks %}
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic{{loop.index + 1}}
|
name: nic{{loop.index + 1}}
|
||||||
mtu:
|
mtu:
|
||||||
get_param: {{network.name}}Mtu
|
get_param: {{network.name}}Mtu
|
||||||
use_dhcp: false
|
use_dhcp: false
|
||||||
- type: vlan
|
- type: vlan
|
||||||
device: nic{{loop.index + 1}}
|
device: nic{{loop.index + 1}}
|
||||||
mtu:
|
mtu:
|
||||||
get_param: {{network.name}}Mtu
|
get_param: {{network.name}}Mtu
|
||||||
vlan_id:
|
vlan_id:
|
||||||
get_param: {{network.name}}NetworkVlanID
|
get_param: {{network.name}}NetworkVlanID
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask:
|
- ip_netmask:
|
||||||
get_param: {{network.name}}IpSubnet
|
get_param: {{network.name}}IpSubnet
|
||||||
routes:
|
routes:
|
||||||
list_concat_unique:
|
list_concat_unique:
|
||||||
- get_param: {{network.name}}InterfaceRoutes
|
- get_param: {{network.name}}InterfaceRoutes
|
||||||
{%- if network.name in role.default_route_networks %}
|
{%- if network.name in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop:
|
next_hop:
|
||||||
get_param: {{network.name}}InterfaceDefaultRoute
|
get_param: {{network.name}}InterfaceDefaultRoute
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{#- We need bridge also for ComputeDVR and Computes with OVN #}
|
{#- We need bridge also for ComputeDVR and Computes with OVN #}
|
||||||
{%- elif network.name in role.networks or 'external_bridge' in role.tags %}
|
{%- elif network.name in role.networks or 'external_bridge' in role.tags %}
|
||||||
- type: ovs_bridge
|
- type: ovs_bridge
|
||||||
{%- if network.name == "External" %}
|
{%- if network.name == "External" %}
|
||||||
name: bridge_name
|
name: bridge_name
|
||||||
{%- else %}
|
{%- else %}
|
||||||
name: br-{{network.name_lower}}
|
name: br-{{network.name_lower}}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
mtu:
|
mtu:
|
||||||
get_param: {{network.name}}Mtu
|
get_param: {{network.name}}Mtu
|
||||||
dns_servers:
|
dns_servers:
|
||||||
get_param: DnsServers
|
get_param: DnsServers
|
||||||
use_dhcp: false
|
use_dhcp: false
|
||||||
members:
|
members:
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic{{loop.index + 1}}
|
name: nic{{loop.index + 1}}
|
||||||
mtu:
|
mtu:
|
||||||
get_param: {{network.name}}Mtu
|
get_param: {{network.name}}Mtu
|
||||||
use_dhcp: false
|
use_dhcp: false
|
||||||
primary: true
|
primary: true
|
||||||
{%- if network.name in _role_networks %}
|
{%- if network.name in _role_networks %}
|
||||||
- type: vlan
|
- type: vlan
|
||||||
mtu:
|
mtu:
|
||||||
get_param: {{network.name}}Mtu
|
get_param: {{network.name}}Mtu
|
||||||
vlan_id:
|
vlan_id:
|
||||||
get_param: {{network.name}}NetworkVlanID
|
get_param: {{network.name}}NetworkVlanID
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask:
|
- ip_netmask:
|
||||||
get_param: {{network.name}}IpSubnet
|
get_param: {{network.name}}IpSubnet
|
||||||
routes:
|
routes:
|
||||||
list_concat_unique:
|
list_concat_unique:
|
||||||
- get_param: {{network.name}}InterfaceRoutes
|
- get_param: {{network.name}}InterfaceRoutes
|
||||||
{%- if network.name in role.default_route_networks %}
|
{%- if network.name in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop:
|
next_hop:
|
||||||
get_param: {{network.name}}InterfaceDefaultRoute
|
get_param: {{network.name}}InterfaceDefaultRoute
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
@ -204,28 +198,28 @@ resources:
|
|||||||
{%- set _ = nics_used.append(loop.index) %}
|
{%- set _ = nics_used.append(loop.index) %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{%- if role.name == 'ComputeOvsDpdk' %}
|
{%- if role.name == 'ComputeOvsDpdk' %}
|
||||||
# Used as a provider network with external DHCP
|
# Used as a provider network with external DHCP
|
||||||
- type: ovs_user_bridge
|
- type: ovs_user_bridge
|
||||||
name: br-dpdk0
|
name: br-dpdk0
|
||||||
members:
|
members:
|
||||||
- type: ovs_dpdk_bond
|
- type: ovs_dpdk_bond
|
||||||
name: dpdkbond0
|
name: dpdkbond0
|
||||||
rx_queue:
|
rx_queue:
|
||||||
get_param: NumDpdkInterfaceRxQueues
|
get_param: NumDpdkInterfaceRxQueues
|
||||||
members:
|
members:
|
||||||
- type: ovs_dpdk_port
|
- type: ovs_dpdk_port
|
||||||
name: dpdk0
|
name: dpdk0
|
||||||
members:
|
members:
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic{{nics_used[-1] + 1}}
|
name: nic{{nics_used[-1] + 1}}
|
||||||
- type: ovs_dpdk_port
|
- type: ovs_dpdk_port
|
||||||
name: dpdk1
|
name: dpdk1
|
||||||
members:
|
members:
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic{{nics_used[-1] + 2}}
|
name: nic{{nics_used[-1] + 2}}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
value:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
@ -79,108 +79,102 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: interface
|
||||||
template:
|
name: nic1
|
||||||
get_file: ../../scripts/run-os-net-config.sh
|
mtu:
|
||||||
params:
|
get_param: ControlPlaneMtu
|
||||||
$network_config:
|
use_dhcp: false
|
||||||
network_config:
|
dns_servers:
|
||||||
- type: interface
|
get_param: DnsServers
|
||||||
name: nic1
|
domain:
|
||||||
mtu:
|
get_param: DnsSearchDomains
|
||||||
get_param: ControlPlaneMtu
|
addresses:
|
||||||
use_dhcp: false
|
- ip_netmask:
|
||||||
dns_servers:
|
list_join:
|
||||||
get_param: DnsServers
|
- /
|
||||||
domain:
|
- - get_param: ControlPlaneIp
|
||||||
get_param: DnsSearchDomains
|
- get_param: ControlPlaneSubnetCidr
|
||||||
addresses:
|
routes:
|
||||||
- ip_netmask:
|
list_concat_unique:
|
||||||
list_join:
|
- get_param: ControlPlaneStaticRoutes
|
||||||
- /
|
- - default: true
|
||||||
- - get_param: ControlPlaneIp
|
next_hop:
|
||||||
- get_param: ControlPlaneSubnetCidr
|
get_param: ControlPlaneDefaultRoute
|
||||||
routes:
|
- type: interface
|
||||||
list_concat_unique:
|
name: nic2
|
||||||
- get_param: ControlPlaneStaticRoutes
|
mtu:
|
||||||
- - default: true
|
get_param: StorageMtu
|
||||||
next_hop:
|
use_dhcp: false
|
||||||
get_param: ControlPlaneDefaultRoute
|
addresses:
|
||||||
- type: interface
|
- ip_netmask:
|
||||||
name: nic2
|
get_param: StorageIpSubnet
|
||||||
mtu:
|
routes:
|
||||||
get_param: StorageMtu
|
get_param: StorageInterfaceRoutes
|
||||||
use_dhcp: false
|
- type: interface
|
||||||
addresses:
|
name: nic4
|
||||||
- ip_netmask:
|
mtu:
|
||||||
get_param: StorageIpSubnet
|
get_param: InternalApiMtu
|
||||||
routes:
|
use_dhcp: false
|
||||||
get_param: StorageInterfaceRoutes
|
addresses:
|
||||||
- type: interface
|
- ip_netmask:
|
||||||
name: nic4
|
get_param: InternalApiIpSubnet
|
||||||
mtu:
|
routes:
|
||||||
get_param: InternalApiMtu
|
get_param: InternalApiInterfaceRoutes
|
||||||
use_dhcp: false
|
- type: ovs_bridge
|
||||||
addresses:
|
name: br-tenant
|
||||||
- ip_netmask:
|
mtu:
|
||||||
get_param: InternalApiIpSubnet
|
get_param: TenantMtu
|
||||||
routes:
|
use_dhcp: false
|
||||||
get_param: InternalApiInterfaceRoutes
|
addresses:
|
||||||
- type: ovs_bridge
|
- ip_netmask:
|
||||||
name: br-tenant
|
get_param: TenantIpSubnet
|
||||||
mtu:
|
routes:
|
||||||
get_param: TenantMtu
|
get_param: TenantInterfaceRoutes
|
||||||
use_dhcp: false
|
members:
|
||||||
addresses:
|
- type: interface
|
||||||
- ip_netmask:
|
name: nic5
|
||||||
get_param: TenantIpSubnet
|
mtu:
|
||||||
routes:
|
get_param: TenantMtu
|
||||||
get_param: TenantInterfaceRoutes
|
use_dhcp: false
|
||||||
members:
|
primary: true
|
||||||
- type: interface
|
# External bridge for DVR (no IP address required)
|
||||||
name: nic5
|
- type: ovs_bridge
|
||||||
mtu:
|
name: bridge_name
|
||||||
get_param: TenantMtu
|
mtu:
|
||||||
use_dhcp: false
|
get_param: ExternalMtu
|
||||||
primary: true
|
dns_servers:
|
||||||
# External bridge for DVR (no IP address required)
|
get_param: DnsServers
|
||||||
- type: ovs_bridge
|
use_dhcp: false
|
||||||
name: bridge_name
|
members:
|
||||||
mtu:
|
- type: interface
|
||||||
get_param: ExternalMtu
|
name: nic6
|
||||||
dns_servers:
|
mtu:
|
||||||
get_param: DnsServers
|
get_param: ExternalMtu
|
||||||
use_dhcp: false
|
primary: true
|
||||||
members:
|
# Uncomment when including environments/network-management.yaml
|
||||||
- type: interface
|
# If setting default route on the Management interface, comment
|
||||||
name: nic6
|
# out the default route on the Control Plane.
|
||||||
mtu:
|
#- type: interface
|
||||||
get_param: ExternalMtu
|
# name: nic7
|
||||||
primary: true
|
# mtu:
|
||||||
# Uncomment when including environments/network-management.yaml
|
# get_param: ManagementMtu
|
||||||
# If setting default route on the Management interface, comment
|
# use_dhcp: false
|
||||||
# out the default route on the Control Plane.
|
# addresses:
|
||||||
#- type: interface
|
# - ip_netmask:
|
||||||
# name: nic7
|
# get_param: ManagementIpSubnet
|
||||||
# mtu:
|
# routes:
|
||||||
# get_param: ManagementMtu
|
# list_concat_unique:
|
||||||
# use_dhcp: false
|
# - get_param: ManagementInterfaceRoutes
|
||||||
# addresses:
|
# - - default: true
|
||||||
# - ip_netmask:
|
# next_hop:
|
||||||
# get_param: ManagementIpSubnet
|
# get_param: ManagementInterfaceDefaultRoute
|
||||||
# routes:
|
|
||||||
# list_concat_unique:
|
|
||||||
# - get_param: ManagementInterfaceRoutes
|
|
||||||
# - - default: true
|
|
||||||
# next_hop:
|
|
||||||
# get_param: ManagementInterfaceDefaultRoute
|
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
value:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
|
||||||
|
@ -101,120 +101,114 @@ parameters:
|
|||||||
{%- endif %}
|
{%- endif %}
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: interface
|
||||||
template:
|
name: nic1
|
||||||
get_file: ../../scripts/run-os-net-config.sh
|
mtu:
|
||||||
params:
|
get_param: ControlPlaneMtu
|
||||||
$network_config:
|
use_dhcp: false
|
||||||
network_config:
|
dns_servers:
|
||||||
- type: interface
|
get_param: DnsServers
|
||||||
name: nic1
|
domain:
|
||||||
mtu:
|
get_param: DnsSearchDomains
|
||||||
get_param: ControlPlaneMtu
|
addresses:
|
||||||
use_dhcp: false
|
- ip_netmask:
|
||||||
dns_servers:
|
list_join:
|
||||||
get_param: DnsServers
|
- /
|
||||||
domain:
|
- - get_param: ControlPlaneIp
|
||||||
get_param: DnsSearchDomains
|
- get_param: ControlPlaneSubnetCidr
|
||||||
addresses:
|
routes:
|
||||||
- ip_netmask:
|
list_concat_unique:
|
||||||
list_join:
|
- get_param: ControlPlaneStaticRoutes
|
||||||
- /
|
|
||||||
- - get_param: ControlPlaneIp
|
|
||||||
- get_param: ControlPlaneSubnetCidr
|
|
||||||
routes:
|
|
||||||
list_concat_unique:
|
|
||||||
- get_param: ControlPlaneStaticRoutes
|
|
||||||
{%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %}
|
{%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop:
|
next_hop:
|
||||||
get_param: ControlPlaneDefaultRoute
|
get_param: ControlPlaneDefaultRoute
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- set nics_used = [1] %}
|
{%- set nics_used = [1] %}
|
||||||
{%- for network in networks if network.enabled|default(true) and network.name not in role.networks_skip_config|default([]) %}
|
{%- for network in networks if network.enabled|default(true) and network.name not in role.networks_skip_config|default([]) %}
|
||||||
{%- if network.name not in ["External", "Tenant"] %}
|
{%- if network.name not in ["External", "Tenant"] %}
|
||||||
{%- if network.name in _role_networks %}
|
{%- if network.name in _role_networks %}
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic{{loop.index + 1}}
|
name: nic{{loop.index + 1}}
|
||||||
mtu:
|
mtu:
|
||||||
get_param: {{network.name}}Mtu
|
get_param: {{network.name}}Mtu
|
||||||
use_dhcp: false
|
use_dhcp: false
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask:
|
- ip_netmask:
|
||||||
get_param: {{network.name}}IpSubnet
|
get_param: {{network.name}}IpSubnet
|
||||||
routes:
|
routes:
|
||||||
list_concat_unique:
|
list_concat_unique:
|
||||||
- get_param: {{network.name}}InterfaceRoutes
|
- get_param: {{network.name}}InterfaceRoutes
|
||||||
{%- if network.name in role.default_route_networks %}
|
{%- if network.name in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop:
|
next_hop:
|
||||||
get_param: {{network.name}}InterfaceDefaultRoute
|
get_param: {{network.name}}InterfaceDefaultRoute
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{#- We need bridge also for ComputeDVR and Computes with OVN #}
|
{#- We need bridge also for ComputeDVR and Computes with OVN #}
|
||||||
{%- elif network.name in _role_networks or 'external_bridge' in role.tags %}
|
{%- elif network.name in _role_networks or 'external_bridge' in role.tags %}
|
||||||
- type: ovs_bridge
|
- type: ovs_bridge
|
||||||
{%- if network.name == "External" %}
|
{%- if network.name == "External" %}
|
||||||
name: bridge_name
|
name: bridge_name
|
||||||
{%- else %}
|
{%- else %}
|
||||||
name: br-{{network.name_lower}}
|
name: br-{{network.name_lower}}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
mtu:
|
mtu:
|
||||||
get_param: {{network.name}}Mtu
|
get_param: {{network.name}}Mtu
|
||||||
dns_servers:
|
dns_servers:
|
||||||
get_param: DnsServers
|
get_param: DnsServers
|
||||||
use_dhcp: false
|
use_dhcp: false
|
||||||
{%- if network.name in _role_networks %}
|
{%- if network.name in _role_networks %}
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask:
|
- ip_netmask:
|
||||||
get_param: {{network.name}}IpSubnet
|
get_param: {{network.name}}IpSubnet
|
||||||
routes:
|
routes:
|
||||||
list_concat_unique:
|
list_concat_unique:
|
||||||
- get_param: {{network.name}}InterfaceRoutes
|
- get_param: {{network.name}}InterfaceRoutes
|
||||||
{%- if network.name in role.default_route_networks %}
|
{%- if network.name in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop:
|
next_hop:
|
||||||
get_param: {{network.name}}InterfaceDefaultRoute
|
get_param: {{network.name}}InterfaceDefaultRoute
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
members:
|
members:
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic{{loop.index + 1}}
|
name: nic{{loop.index + 1}}
|
||||||
mtu:
|
mtu:
|
||||||
get_param: {{network.name}}Mtu
|
get_param: {{network.name}}Mtu
|
||||||
use_dhcp: false
|
use_dhcp: false
|
||||||
primary: true
|
primary: true
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{#- This hack gets around Jinja scope limitations to update nics_used within loop. #}
|
{#- This hack gets around Jinja scope limitations to update nics_used within loop. #}
|
||||||
{%- set _ = nics_used.append(loop.index) %}
|
{%- set _ = nics_used.append(loop.index) %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{%- if role.name == 'ComputeOvsDpdk' %}
|
{%- if role.name == 'ComputeOvsDpdk' %}
|
||||||
# Used as a provider network with external DHCP
|
# Used as a provider network with external DHCP
|
||||||
- type: ovs_user_bridge
|
- type: ovs_user_bridge
|
||||||
name: br-dpdk0
|
name: br-dpdk0
|
||||||
members:
|
members:
|
||||||
- type: ovs_dpdk_bond
|
- type: ovs_dpdk_bond
|
||||||
name: dpdkbond0
|
name: dpdkbond0
|
||||||
rx_queue:
|
rx_queue:
|
||||||
get_param: NumDpdkInterfaceRxQueues
|
get_param: NumDpdkInterfaceRxQueues
|
||||||
members:
|
members:
|
||||||
- type: ovs_dpdk_port
|
- type: ovs_dpdk_port
|
||||||
name: dpdk0
|
name: dpdk0
|
||||||
members:
|
members:
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic{{nics_used[-1] + 1}}
|
name: nic{{nics_used[-1] + 1}}
|
||||||
- type: ovs_dpdk_port
|
- type: ovs_dpdk_port
|
||||||
name: dpdk1
|
name: dpdk1
|
||||||
members:
|
members:
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic{{nics_used[-1] + 2}}
|
name: nic{{nics_used[-1] + 2}}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
value:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
@ -104,75 +104,69 @@ resources:
|
|||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: linux_bridge
|
||||||
template:
|
|
||||||
get_file: ../../scripts/run-os-net-config.sh
|
|
||||||
params:
|
|
||||||
$network_config:
|
|
||||||
network_config:
|
|
||||||
- type: linux_bridge
|
|
||||||
{%- if role.name.startswith('CephStorage') or role.name.startswith('ObjectStorage') or role.name.startswith('BlockStorage') %}
|
{%- if role.name.startswith('CephStorage') or role.name.startswith('ObjectStorage') or role.name.startswith('BlockStorage') %}
|
||||||
name: br-storage
|
name: br-storage
|
||||||
{%- else %}
|
{%- else %}
|
||||||
name: bridge_name
|
name: bridge_name
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
mtu:
|
mtu:
|
||||||
get_attr: [MinViableMtu, value]
|
get_attr: [MinViableMtu, value]
|
||||||
use_dhcp: false
|
use_dhcp: false
|
||||||
dns_servers:
|
dns_servers:
|
||||||
get_param: DnsServers
|
get_param: DnsServers
|
||||||
domain:
|
domain:
|
||||||
get_param: DnsSearchDomains
|
get_param: DnsSearchDomains
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask:
|
- ip_netmask:
|
||||||
list_join:
|
list_join:
|
||||||
- /
|
- /
|
||||||
- - get_param: ControlPlaneIp
|
- - get_param: ControlPlaneIp
|
||||||
- get_param: ControlPlaneSubnetCidr
|
- get_param: ControlPlaneSubnetCidr
|
||||||
routes:
|
routes:
|
||||||
list_concat_unique:
|
list_concat_unique:
|
||||||
- get_param: ControlPlaneStaticRoutes
|
- get_param: ControlPlaneStaticRoutes
|
||||||
{%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %}
|
{%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop:
|
next_hop:
|
||||||
get_param: ControlPlaneDefaultRoute
|
get_param: ControlPlaneDefaultRoute
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
members:
|
members:
|
||||||
- type: interface
|
- type: interface
|
||||||
name: interface_name
|
name: interface_name
|
||||||
mtu:
|
mtu:
|
||||||
get_attr: [MinViableMtu, value]
|
get_attr: [MinViableMtu, value]
|
||||||
primary: true
|
primary: true
|
||||||
{%- for network in networks if network.enabled|default(true) and network.name in _role_networks
|
{%- for network in networks if network.enabled|default(true) and network.name in _role_networks
|
||||||
and network.name not in role.networks_skip_config|default([]) %}
|
and network.name not in role.networks_skip_config|default([]) %}
|
||||||
- type: vlan
|
- type: vlan
|
||||||
mtu:
|
mtu:
|
||||||
get_param: {{network.name}}Mtu
|
get_param: {{network.name}}Mtu
|
||||||
vlan_id:
|
vlan_id:
|
||||||
get_param: {{network.name}}NetworkVlanID
|
get_param: {{network.name}}NetworkVlanID
|
||||||
{%- if role.name.startswith('CephStorage') or role.name.startswith('ObjectStorage') or role.name.startswith('BlockStorage') %}
|
{%- if role.name.startswith('CephStorage') or role.name.startswith('ObjectStorage') or role.name.startswith('BlockStorage') %}
|
||||||
device: br-storage
|
device: br-storage
|
||||||
{%- else %}
|
{%- else %}
|
||||||
device: bridge_name
|
device: bridge_name
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask:
|
- ip_netmask:
|
||||||
get_param: {{network.name}}IpSubnet
|
get_param: {{network.name}}IpSubnet
|
||||||
routes:
|
routes:
|
||||||
list_concat_unique:
|
list_concat_unique:
|
||||||
- get_param: {{network.name}}InterfaceRoutes
|
- get_param: {{network.name}}InterfaceRoutes
|
||||||
{%- if network.name in role.default_route_networks %}
|
{%- if network.name in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop:
|
next_hop:
|
||||||
get_param: {{network.name}}InterfaceDefaultRoute
|
get_param: {{network.name}}InterfaceDefaultRoute
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
value:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
@ -77,53 +77,47 @@ parameters:
|
|||||||
|
|
||||||
resources:
|
resources:
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: ovs_bridge
|
||||||
template:
|
name: bridge_name
|
||||||
get_file: ../../scripts/run-os-net-config.sh
|
use_dhcp: false
|
||||||
params:
|
dns_servers:
|
||||||
$network_config:
|
get_param: DnsServers
|
||||||
network_config:
|
domain:
|
||||||
- type: ovs_bridge
|
get_param: DnsSearchDomains
|
||||||
name: bridge_name
|
addresses:
|
||||||
use_dhcp: false
|
- ip_netmask:
|
||||||
dns_servers:
|
list_join:
|
||||||
get_param: DnsServers
|
- /
|
||||||
domain:
|
- - get_param: ControlPlaneIp
|
||||||
get_param: DnsSearchDomains
|
- get_param: ControlPlaneSubnetCidr
|
||||||
addresses:
|
routes:
|
||||||
- ip_netmask:
|
list_concat_unique:
|
||||||
list_join:
|
- get_param: ControlPlaneStaticRoutes
|
||||||
- /
|
- - default: true
|
||||||
- - get_param: ControlPlaneIp
|
next_hop:
|
||||||
- get_param: ControlPlaneSubnetCidr
|
get_param: ControlPlaneDefaultRoute
|
||||||
routes:
|
members:
|
||||||
list_concat_unique:
|
- type: interface
|
||||||
- get_param: ControlPlaneStaticRoutes
|
name: nic1
|
||||||
- - default: true
|
# force the MAC address of the bridge to this interface
|
||||||
next_hop:
|
primary: true
|
||||||
get_param: ControlPlaneDefaultRoute
|
|
||||||
members:
|
|
||||||
- type: interface
|
|
||||||
name: nic1
|
|
||||||
# force the MAC address of the bridge to this interface
|
|
||||||
primary: true
|
|
||||||
{%- for network in networks if network.enabled|default(true) and network.name != 'External' %}
|
{%- for network in networks if network.enabled|default(true) and network.name != 'External' %}
|
||||||
- type: vlan
|
- type: vlan
|
||||||
vlan_id:
|
vlan_id:
|
||||||
get_param: {{network.name}}NetworkVlanID
|
get_param: {{network.name}}NetworkVlanID
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask:
|
- ip_netmask:
|
||||||
get_param: {{network.name}}IpSubnet
|
get_param: {{network.name}}IpSubnet
|
||||||
routes:
|
routes:
|
||||||
get_param: {{network.name}}InterfaceRoutes
|
get_param: {{network.name}}InterfaceRoutes
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
value:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
|
||||||
|
@ -104,70 +104,64 @@ resources:
|
|||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
OsNetConfigImpl:
|
OsNetConfigImpl:
|
||||||
type: OS::Heat::SoftwareConfig
|
type: OS::Heat::Value
|
||||||
properties:
|
properties:
|
||||||
group: script
|
value:
|
||||||
config:
|
network_config:
|
||||||
str_replace:
|
- type: ovs_bridge
|
||||||
template:
|
|
||||||
get_file: ../../scripts/run-os-net-config.sh
|
|
||||||
params:
|
|
||||||
$network_config:
|
|
||||||
network_config:
|
|
||||||
- type: ovs_bridge
|
|
||||||
{%- if role.name.startswith('CephStorage') or role.name.startswith('ObjectStorage') or role.name.startswith('BlockStorage') %}
|
{%- if role.name.startswith('CephStorage') or role.name.startswith('ObjectStorage') or role.name.startswith('BlockStorage') %}
|
||||||
name: br-storage
|
name: br-storage
|
||||||
{%- else %}
|
{%- else %}
|
||||||
name: bridge_name
|
name: bridge_name
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
mtu:
|
mtu:
|
||||||
get_attr: [MinViableMtu, value]
|
get_attr: [MinViableMtu, value]
|
||||||
use_dhcp: false
|
use_dhcp: false
|
||||||
dns_servers:
|
dns_servers:
|
||||||
get_param: DnsServers
|
get_param: DnsServers
|
||||||
domain:
|
domain:
|
||||||
get_param: DnsSearchDomains
|
get_param: DnsSearchDomains
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask:
|
- ip_netmask:
|
||||||
list_join:
|
list_join:
|
||||||
- /
|
- /
|
||||||
- - get_param: ControlPlaneIp
|
- - get_param: ControlPlaneIp
|
||||||
- get_param: ControlPlaneSubnetCidr
|
- get_param: ControlPlaneSubnetCidr
|
||||||
routes:
|
routes:
|
||||||
list_concat_unique:
|
list_concat_unique:
|
||||||
- get_param: ControlPlaneStaticRoutes
|
- get_param: ControlPlaneStaticRoutes
|
||||||
{%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %}
|
{%- if role.default_route_networks is not defined or 'ControlPlane' in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop:
|
next_hop:
|
||||||
get_param: ControlPlaneDefaultRoute
|
get_param: ControlPlaneDefaultRoute
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
members:
|
members:
|
||||||
- type: interface
|
- type: interface
|
||||||
name: nic1
|
name: nic1
|
||||||
mtu:
|
mtu:
|
||||||
get_attr: [MinViableMtu, value]
|
get_attr: [MinViableMtu, value]
|
||||||
# force the MAC address of the bridge to this interface
|
# force the MAC address of the bridge to this interface
|
||||||
primary: true
|
primary: true
|
||||||
{%- for network in networks if network.enabled|default(true) and network.name in _role_networks %}
|
{%- for network in networks if network.enabled|default(true) and network.name in _role_networks %}
|
||||||
- type: vlan
|
- type: vlan
|
||||||
mtu:
|
mtu:
|
||||||
get_param: {{network.name}}Mtu
|
get_param: {{network.name}}Mtu
|
||||||
vlan_id:
|
vlan_id:
|
||||||
get_param: {{network.name}}NetworkVlanID
|
get_param: {{network.name}}NetworkVlanID
|
||||||
addresses:
|
addresses:
|
||||||
- ip_netmask:
|
- ip_netmask:
|
||||||
get_param: {{network.name}}IpSubnet
|
get_param: {{network.name}}IpSubnet
|
||||||
routes:
|
routes:
|
||||||
list_concat_unique:
|
list_concat_unique:
|
||||||
- get_param: {{network.name}}InterfaceRoutes
|
- get_param: {{network.name}}InterfaceRoutes
|
||||||
{%- if network.name in role.default_route_networks %}
|
{%- if network.name in role.default_route_networks %}
|
||||||
- - default: true
|
- - default: true
|
||||||
next_hop:
|
next_hop:
|
||||||
get_param: {{network.name}}InterfaceDefaultRoute
|
get_param: {{network.name}}InterfaceDefaultRoute
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
outputs:
|
outputs:
|
||||||
OS::stack_id:
|
config:
|
||||||
description: The OsNetConfigImpl resource.
|
description: The OsNetConfigImpl resource.
|
||||||
value:
|
value:
|
||||||
get_resource: OsNetConfigImpl
|
get_attr: [OsNetConfigImpl, value]
|
||||||
|
@ -1 +0,0 @@
|
|||||||
$network_config
|
|
@ -676,7 +676,7 @@ outputs:
|
|||||||
description: Mapping of hostname to NetworkConfig resource
|
description: Mapping of hostname to NetworkConfig resource
|
||||||
value:
|
value:
|
||||||
map_replace:
|
map_replace:
|
||||||
- HOSTNAME: {get_resource: NetworkConfig}
|
- HOSTNAME: {get_attr: [NetworkConfig, config]}
|
||||||
- keys:
|
- keys:
|
||||||
HOSTNAME: {get_attr:[{{server_resource_name}}, name]}
|
HOSTNAME: {get_attr:[{{server_resource_name}}, name]}
|
||||||
hosts_entry:
|
hosts_entry:
|
||||||
|
@ -60,8 +60,6 @@ def parse_opts(argv):
|
|||||||
return opts
|
return opts
|
||||||
|
|
||||||
|
|
||||||
# FIXME: This duplicates code from tools/yaml-nic-config-2-script.py, we should
|
|
||||||
# refactor to share the common code
|
|
||||||
def to_commented_yaml(filename):
|
def to_commented_yaml(filename):
|
||||||
"""Convert comments into 'comments<num>: ...' YAML"""
|
"""Convert comments into 'comments<num>: ...' YAML"""
|
||||||
|
|
||||||
@ -106,8 +104,6 @@ def to_commented_yaml(filename):
|
|||||||
return out_str
|
return out_str
|
||||||
|
|
||||||
|
|
||||||
# FIXME: This duplicates code from tools/yaml-nic-config-2-script.py, we should
|
|
||||||
# refactor to share the common code
|
|
||||||
def to_normal_yaml(filename):
|
def to_normal_yaml(filename):
|
||||||
"""Convert back to normal #commented YAML"""
|
"""Convert back to normal #commented YAML"""
|
||||||
|
|
||||||
|
@ -1,294 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import collections
|
|
||||||
import datetime
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
import shutil
|
|
||||||
import six
|
|
||||||
import sys
|
|
||||||
import traceback
|
|
||||||
import yaml
|
|
||||||
|
|
||||||
|
|
||||||
def parse_opts(argv):
|
|
||||||
parser = argparse.ArgumentParser(
|
|
||||||
description='Convert an old style NIC config file into the new format '
|
|
||||||
'using run-os-net-config.sh')
|
|
||||||
parser.add_argument('--script-dir', metavar='<script directory>',
|
|
||||||
help="Relative path to run-os-net-config.sh",
|
|
||||||
default="network/scripts/run-os-net-config.sh")
|
|
||||||
parser.add_argument('files', nargs="+", metavar='<file>',
|
|
||||||
help='List of one or more NIC config files to convert')
|
|
||||||
parser.add_argument('--yes',
|
|
||||||
action='store_true',
|
|
||||||
help=("Use --yes to skip the confirmation "
|
|
||||||
"to overwrite the original config file "),
|
|
||||||
)
|
|
||||||
opts = parser.parse_args(argv[1:])
|
|
||||||
|
|
||||||
return opts
|
|
||||||
|
|
||||||
|
|
||||||
def to_commented_yaml(filename):
|
|
||||||
"""Convert comments into 'comments<num>: ...' YAML"""
|
|
||||||
|
|
||||||
out_str = ''
|
|
||||||
last_non_comment_spaces = ''
|
|
||||||
with open(filename, 'r') as f:
|
|
||||||
comment_count = 0
|
|
||||||
for line in f:
|
|
||||||
# skip blank line
|
|
||||||
if line.isspace():
|
|
||||||
continue
|
|
||||||
char_count = 0
|
|
||||||
spaces = ''
|
|
||||||
for char in line:
|
|
||||||
char_count += 1
|
|
||||||
if char == ' ':
|
|
||||||
spaces += ' '
|
|
||||||
next
|
|
||||||
elif char == '#':
|
|
||||||
last_non_comment_spaces = spaces
|
|
||||||
comment_count += 1
|
|
||||||
comment = line[char_count:-1]
|
|
||||||
out_str += "%scomment%i_%i: '%s'\n" % \
|
|
||||||
(last_non_comment_spaces, comment_count, len(spaces),
|
|
||||||
comment)
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
last_non_comment_spaces = spaces
|
|
||||||
out_str += line
|
|
||||||
|
|
||||||
# inline comments check
|
|
||||||
m = re.match(".*:.*#(.*)", line)
|
|
||||||
if m:
|
|
||||||
comment_count += 1
|
|
||||||
out_str += "%s inline_comment%i: '%s'\n" % \
|
|
||||||
(last_non_comment_spaces, comment_count,
|
|
||||||
m.group(1))
|
|
||||||
break
|
|
||||||
|
|
||||||
with open(filename, 'w') as f:
|
|
||||||
f.write(out_str)
|
|
||||||
|
|
||||||
return out_str
|
|
||||||
|
|
||||||
|
|
||||||
def to_normal_yaml(filename):
|
|
||||||
"""Convert back to normal #commented YAML"""
|
|
||||||
|
|
||||||
with open(filename, 'r') as f:
|
|
||||||
data = f.read()
|
|
||||||
|
|
||||||
out_str = ''
|
|
||||||
next_line_break = False
|
|
||||||
for line in data.split('\n'):
|
|
||||||
# get_input not supported by run-os-net-config.sh script
|
|
||||||
line = line.replace('get_input: ', '')
|
|
||||||
|
|
||||||
# normal comments
|
|
||||||
m = re.match(" +comment[0-9]+_([0-9]+): '(.*)'.*", line)
|
|
||||||
# inline comments
|
|
||||||
i = re.match(" +inline_comment[0-9]+: '(.*)'.*", line)
|
|
||||||
|
|
||||||
if m:
|
|
||||||
if next_line_break:
|
|
||||||
out_str += '\n'
|
|
||||||
next_line_break = False
|
|
||||||
for x in range(0, int(m.group(1))):
|
|
||||||
out_str += " "
|
|
||||||
out_str += "#%s\n" % m.group(2)
|
|
||||||
elif i:
|
|
||||||
out_str += " #%s\n" % i.group(1)
|
|
||||||
next_line_break = False
|
|
||||||
else:
|
|
||||||
if next_line_break:
|
|
||||||
out_str += '\n'
|
|
||||||
out_str += line
|
|
||||||
next_line_break = True
|
|
||||||
|
|
||||||
if next_line_break:
|
|
||||||
out_str += '\n'
|
|
||||||
|
|
||||||
with open(filename, 'w') as f:
|
|
||||||
f.write(out_str)
|
|
||||||
|
|
||||||
return out_str
|
|
||||||
|
|
||||||
|
|
||||||
class description(six.text_type):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
# FIXME: Some of this duplicates code from build_endpoint_map.py, we should
|
|
||||||
# refactor to share the common code
|
|
||||||
class TemplateDumper(yaml.SafeDumper):
|
|
||||||
|
|
||||||
def represent_ordered_dict(self, data):
|
|
||||||
return self.represent_dict(data.items())
|
|
||||||
|
|
||||||
def description_presenter(self, data):
|
|
||||||
if '\n' in data:
|
|
||||||
style = '>'
|
|
||||||
else:
|
|
||||||
style = ''
|
|
||||||
return self.represent_scalar(
|
|
||||||
yaml.resolver.BaseResolver.DEFAULT_SCALAR_TAG, data, style=style)
|
|
||||||
|
|
||||||
|
|
||||||
# We load mappings into OrderedDict to preserve their order
|
|
||||||
class TemplateLoader(yaml.SafeLoader):
|
|
||||||
def construct_mapping(self, node):
|
|
||||||
self.flatten_mapping(node)
|
|
||||||
return collections.OrderedDict(self.construct_pairs(node))
|
|
||||||
|
|
||||||
|
|
||||||
TemplateDumper.add_representer(description,
|
|
||||||
TemplateDumper.description_presenter)
|
|
||||||
|
|
||||||
TemplateDumper.add_representer(collections.OrderedDict,
|
|
||||||
TemplateDumper.represent_ordered_dict)
|
|
||||||
|
|
||||||
|
|
||||||
TemplateLoader.add_constructor(yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG,
|
|
||||||
TemplateLoader.construct_mapping)
|
|
||||||
|
|
||||||
|
|
||||||
def write_template(template, filename=None):
|
|
||||||
with open(filename, 'w') as f:
|
|
||||||
yaml.dump(template, f, TemplateDumper, width=120,
|
|
||||||
default_flow_style=False)
|
|
||||||
|
|
||||||
|
|
||||||
def convert(filename, script_path):
|
|
||||||
print('Converting %s' % filename)
|
|
||||||
try:
|
|
||||||
with open(filename, 'r') as f:
|
|
||||||
tpl = yaml.load(f.read(), Loader=TemplateLoader)
|
|
||||||
except Exception:
|
|
||||||
print(traceback.format_exc())
|
|
||||||
return 0
|
|
||||||
|
|
||||||
for r in (tpl.get('resources', {})).items():
|
|
||||||
if (r[1].get('type') == 'OS::Heat::StructuredConfig' and
|
|
||||||
r[1].get('properties', {}).get('group') == 'os-apply-config' and
|
|
||||||
r[1].get('properties', {}).get('config', {}).get('os_net_config')):
|
|
||||||
new_r = collections.OrderedDict()
|
|
||||||
new_r['type'] = 'OS::Heat::SoftwareConfig'
|
|
||||||
new_r['properties'] = collections.OrderedDict()
|
|
||||||
new_r['properties']['group'] = 'script'
|
|
||||||
old_net_config = r[1].get(
|
|
||||||
'properties', {}).get('config', {}).get('os_net_config')
|
|
||||||
new_config = {'str_replace': collections.OrderedDict()}
|
|
||||||
new_config['str_replace']['template'] = {'get_file': script_path}
|
|
||||||
new_config['str_replace']['params'] = \
|
|
||||||
{'$network_config': old_net_config}
|
|
||||||
new_r['properties']['config'] = new_config
|
|
||||||
tpl['resources'][r[0]] = new_r
|
|
||||||
else:
|
|
||||||
print("No match %s" % r[0])
|
|
||||||
return 0
|
|
||||||
|
|
||||||
# Preserve typical HOT template key ordering
|
|
||||||
od_result = collections.OrderedDict()
|
|
||||||
# Need to bump the HOT version so str_replace supports serializing to json
|
|
||||||
od_result['heat_template_version'] = "rocky"
|
|
||||||
if tpl.get('description'):
|
|
||||||
od_result['description'] = description(tpl['description'])
|
|
||||||
od_result['parameters'] = tpl['parameters']
|
|
||||||
od_result['resources'] = tpl['resources']
|
|
||||||
od_result['outputs'] = tpl['outputs']
|
|
||||||
|
|
||||||
write_template(od_result, filename)
|
|
||||||
|
|
||||||
return 1
|
|
||||||
|
|
||||||
|
|
||||||
def check_old_style(filename):
|
|
||||||
|
|
||||||
with open(filename, 'r') as f:
|
|
||||||
tpl = yaml.load(f.read(), Loader=yaml.SafeLoader)
|
|
||||||
|
|
||||||
if isinstance(tpl.get('resources', {}), dict):
|
|
||||||
for r in (tpl.get('resources', {})).items():
|
|
||||||
if (r[1].get('type') == 'OS::Heat::StructuredConfig' and
|
|
||||||
r[1].get('properties', {}).get('group') == 'os-apply-config' and
|
|
||||||
r[1].get('properties', {}).get('config', {}).get('os_net_config')):
|
|
||||||
return True
|
|
||||||
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
opts = parse_opts(sys.argv)
|
|
||||||
exit_val = 0
|
|
||||||
num_converted = 0
|
|
||||||
|
|
||||||
for base_path in opts.files:
|
|
||||||
if os.path.isfile(base_path) and base_path.endswith('.yaml'):
|
|
||||||
|
|
||||||
if check_old_style(base_path):
|
|
||||||
|
|
||||||
# Check for script in the user entered (or default) location or in
|
|
||||||
# path relative to NIC config files
|
|
||||||
script_paths = [opts.script_dir]
|
|
||||||
script_paths.append('../../scripts/run-os-net-config.sh')
|
|
||||||
script_paths.append('../network/scripts/run-os-net-config.sh')
|
|
||||||
script_paths.append('/usr/share/openstack-tripleo-heat-templates/'
|
|
||||||
'network/scripts/run-os-net-config.sh')
|
|
||||||
|
|
||||||
script_path = None
|
|
||||||
for p in script_paths:
|
|
||||||
if os.path.isfile(os.path.join(os.path.dirname(base_path), p)):
|
|
||||||
script_path = p
|
|
||||||
break
|
|
||||||
if script_path is None:
|
|
||||||
print("Error couldn't find run-os-net-config.sh relative "
|
|
||||||
"to filename")
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
print("Using script at %s" % script_path)
|
|
||||||
|
|
||||||
extension = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
|
|
||||||
backup_filename = os.path.realpath(base_path) + '.' + extension
|
|
||||||
|
|
||||||
print('The yaml file will be overwritten and the original saved '
|
|
||||||
'as %s' % backup_filename)
|
|
||||||
if not (opts.yes or
|
|
||||||
input("Overwrite %s? [y/n] " % base_path).lower() == 'y'):
|
|
||||||
print("Skipping file %s" % base_path)
|
|
||||||
continue
|
|
||||||
|
|
||||||
if os.path.exists(backup_filename):
|
|
||||||
print("Backup file already exists, skipping file %s" %
|
|
||||||
base_path)
|
|
||||||
continue
|
|
||||||
|
|
||||||
shutil.copyfile(base_path, backup_filename)
|
|
||||||
|
|
||||||
to_commented_yaml(base_path)
|
|
||||||
num_converted += convert(base_path, script_path)
|
|
||||||
to_normal_yaml(base_path)
|
|
||||||
else:
|
|
||||||
print('File %s is not using old style NIC configuration' %
|
|
||||||
base_path)
|
|
||||||
|
|
||||||
else:
|
|
||||||
print('Unexpected argument %s' % base_path)
|
|
||||||
|
|
||||||
|
|
||||||
if num_converted == 0:
|
|
||||||
exit_val = 1
|
|
||||||
sys.exit(exit_val)
|
|
Loading…
x
Reference in New Issue
Block a user