Allow to generate networks for more than 2 nodes

This commit is contained in:
Łukasz Oleś 2015-10-22 15:29:53 +02:00
parent 05571d89b0
commit 0532efab0a

View File

@ -3,7 +3,8 @@ id: simple_multinode_gre
# eth1 - mgmt 10.0.0.0/24, # eth1 - mgmt 10.0.0.0/24,
# eth3 - ext 10.2.0.0/24 # eth3 - ext 10.2.0.0/24
resources: resources:
- id: node1_sdn {% for i in range(count|int) %}
- id: node{{i}}_sdn
from: resources/node_network_puppet from: resources/node_network_puppet
values: values:
use_ovs: true use_ovs: true
@ -45,83 +46,18 @@ resources:
endpoints: endpoints:
br-mesh: br-mesh:
IP: IP:
- 10.1.0.3/24 - 10.1.0.{{3 + i}}/24
br-floating: br-floating:
IP: none IP: none
br-mgmt: br-mgmt:
IP: IP:
- 10.0.0.3/24 - 10.0.0.{{3 + i}}/24
vendor_specific: vendor_specific:
phy_interfaces: phy_interfaces:
- eth1 - eth1
br-ex: br-ex:
IP: IP:
- 10.2.0.3/24 - 10.2.0.{{3 + i}}/24
vendor_specific:
phy_interfaces:
- eth3
#gateway: 10.2.0.1
roles:
management: br-mgmt
neutron/mesh: br-mesh
ex: br-ex
neutron/floating: br-floating
fw-admin: br-fw-admin
- id: node2_sdn
from: resources/node_network_puppet
values:
use_ovs: true
network_scheme:
version: '1.1'
provider: lnx
interfaces:
eth3:
mtu: 1500
eth1:
mtu: 1500
eth2:
mtu: 9000
transformations:
- action: add-br
name: br-mgmt
- action: add-br
name: br-ex
- action: add-br
name: br-floating
provider: ovs
- action: add-patch
bridges:
- br-floating
- br-ex
provider: ovs
mtu: 65000
- action: add-br
name: br-mesh
- action: add-port
bridge: br-ex
name: eth3
- action: add-port
bridge: br-mgmt
name: eth1
- action: add-port
bridge: br-mesh
name: eth2
endpoints:
br-mesh:
IP:
- 10.1.0.4/24
br-floating:
IP: none
br-mgmt:
IP:
- 10.0.0.4/24
vendor_specific:
phy_interfaces:
- eth1
br-ex:
IP:
- 10.2.0.4/24
vendor_specific: vendor_specific:
phy_interfaces: phy_interfaces:
- eth3 - eth3
@ -132,3 +68,4 @@ resources:
ex: br-ex ex: br-ex
neutron/floating: br-floating neutron/floating: br-floating
fw-admin: br-fw-admin fw-admin: br-fw-admin
{% endfor %}