Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[topo_m0] Add new topo for mgmt tor router #6208

Merged
merged 4 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ansible/library/announce_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ def wait_for_http(host_ip, http_port, timeout=10):


def get_topo_type(topo_name):
pattern = re.compile(r'^(t0-mclag|t0|t1|ptf|fullmesh|dualtor|t2|mgmttor)')
pattern = re.compile(r'^(t0-mclag|t0|t1|ptf|fullmesh|dualtor|t2|mgmttor|m0)')
match = pattern.match(topo_name)
if not match:
return "unsupported"
topo_type = match.group()
if topo_type in ['dualtor', 'mgmttor']:
if topo_type in ['dualtor', 'mgmttor', 'm0']:
yaqiangz marked this conversation as resolved.
Show resolved Hide resolved
# set dualtor/mgmttor topology type to 't0' to avoid adding it in each test script.
topo_type = 't0'
return topo_type
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/eos/templates/m0-leaf.j2
4 changes: 4 additions & 0 deletions ansible/templates/minigraph_png.j2
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@
{% set dev_type = 'CoreRouter' %}
{% elif 'T0' in dev %}
{% set dev_type = 'ToRRouter' %}
{% elif 'M1' in dev %}
{% set dev_type = 'MgmtLeafRouter' %}
{% elif 'MX' in dev %}
{% set dev_type = 'BmcMgmtToRRouter' %}
{% else %}
{% set dev_ytpe = 'Unknown' %}
{% endif %}
Expand Down
271 changes: 271 additions & 0 deletions ansible/vars/topo_m0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,271 @@
topology:
host_interfaces:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
VMs:
ARISTA01M1:
vlans:
- 46
vm_offset: 0
ARISTA02M1:
vlans:
- 47
vm_offset: 1
ARISTA03M1:
vlans:
- 48
vm_offset: 2
ARISTA04M1:
vlans:
- 49
vm_offset: 3
ARISTA05MX:
vlans:
- 50
vm_offset: 4
ARISTA06MX:
vlans:
- 51
vm_offset: 5
DUT:
vlan_configs:
default_vlan_config: one_vlan_a
one_vlan_a:
yaqiangz marked this conversation as resolved.
Show resolved Hide resolved
Vlan1000:
id: 1000
intfs: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45]
prefix: 192.168.0.1/21
prefix_v6: fc02:1000::1/64
tag: 1000
two_vlan_a:
Vlan100:
id: 100
intfs: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
prefix: 192.168.0.1/22
prefix_v6: fc02:100::1/64
tag: 100
Vlan200:
id: 200
intfs: [24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45]
prefix: 192.168.4.1/22
prefix_v6: fc02:200::1/64
tag: 200
four_vlan_a:
Vlan1000:
id: 1000
intfs: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
prefix: 192.168.0.1/23
prefix_v6: fc02:400::1/64
tag: 1000
Vlan2000:
id: 2000
intfs: [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
prefix: 192.168.2.1/23
prefix_v6: fc02:401::1/64
tag: 2000
Vlan3000:
id: 3000
intfs: [24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]
prefix: 192.168.4.1/23
prefix_v6: fc02:402::1/64
tag: 3000
Vlan4000:
id: 4000
intfs: [36, 37, 38, 39, 40, 41, 42, 43, 44, 45]
prefix: 192.168.6.1/23
prefix_v6: fc02:403::1/64
tag: 4000

configuration_properties:
common:
dut_asn: 65100
dut_type: MgmtToRRouter
podset_number: 30
tor_number: 16
tor_subnet_number: 2
max_tor_subnet_number: 16
tor_subnet_size: 128
spine_asn: 65534
yaqiangz marked this conversation as resolved.
Show resolved Hide resolved
leaf_asn_start: 64600
tor_asn_start: 65100
failure_rate: 0
nhipv4: 10.10.246.254
nhipv6: FC0A::FF
swrole: leaf

configuration:
ARISTA01M1:
properties:
- common
bgp:
asn: 64600
peers:
65100:
- 10.0.0.56
- FC00::71
interfaces:
Loopback0:
ipv4: 100.1.0.29/32
ipv6: 2064:100::1d/128
Ethernet1:
lacp: 1
Port-Channel1:
ipv4: 10.0.0.57/31
ipv6: fc00::72/126
bp_interface:
ipv4: 10.10.246.29/24
ipv6: fc0a::3a/64

ARISTA02M1:
properties:
- common
bgp:
asn: 64600
peers:
65100:
- 10.0.0.58
- FC00::75
interfaces:
Loopback0:
ipv4: 100.1.0.30/32
ipv6: 2064:100::1e/128
Ethernet1:
lacp: 1
Port-Channel1:
ipv4: 10.0.0.59/31
ipv6: fc00::76/126
bp_interface:
ipv4: 10.10.246.30/24
ipv6: fc0a::3d/64

ARISTA03M1:
properties:
- common
bgp:
asn: 64600
peers:
65100:
- 10.0.0.60
- FC00::79
interfaces:
Loopback0:
ipv4: 100.1.0.31/32
ipv6: 2064:100::1f/128
Ethernet1:
lacp: 1
Port-Channel1:
ipv4: 10.0.0.61/31
ipv6: fc00::7a/126
bp_interface:
ipv4: 10.10.246.31/24
ipv6: fc0a::3e/64

ARISTA04M1:
properties:
- common
bgp:
asn: 64600
peers:
65100:
- 10.0.0.62
- FC00::7D
interfaces:
Loopback0:
ipv4: 100.1.0.32/32
ipv6: 2064:100::20/128
Ethernet1:
lacp: 1
Port-Channel1:
ipv4: 10.0.0.63/31
ipv6: fc00::7e/126
bp_interface:
ipv4: 10.10.246.32/24
ipv6: fc0a::41/64

ARISTA05MX:
properties:
- common
bgp:
asn: 64600
yaqiangz marked this conversation as resolved.
Show resolved Hide resolved
peers:
65100:
- 10.0.0.64
- FC00::81
interfaces:
Loopback0:
ipv4: 100.1.0.33/32
ipv6: 2064:100::21/128
Ethernet1:
lacp: 1
Port-Channel1:
ipv4: 10.0.0.65/31
ipv6: fc00::82/126
bp_interface:
ipv4: 10.10.246.33/24
ipv6: fc0a::44/64

ARISTA06MX:
properties:
- common
bgp:
asn: 64600
peers:
65100:
- 10.0.0.66
- FC00::85
interfaces:
Loopback0:
ipv4: 100.1.0.34/32
ipv6: 2064:100::22/128
Ethernet1:
lacp: 1
Port-Channel1:
ipv4: 10.0.0.67/31
ipv6: fc00::86/126
bp_interface:
ipv4: 10.10.246.34/24
ipv6: fc0a::47/64
1 change: 1 addition & 0 deletions ansible/veos
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ all:
- dualtor-mixed
- dualtor-mixed-56
- dualtor-mixed-120
- m0
children:
server_1:
server_2:
Expand Down
4 changes: 2 additions & 2 deletions tests/common/testbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,13 @@ def _generate_sai_ptf_topo(self, tb_dict):


def get_testbed_type(self, topo_name):
pattern = re.compile(r'^(wan|t0|t1|ptf|fullmesh|dualtor|t2|tgen|mgmttor)')
pattern = re.compile(r'^(wan|t0|t1|ptf|fullmesh|dualtor|t2|tgen|mgmttor|m0)')
match = pattern.match(topo_name)
if match == None:
logger.warning("Unsupported testbed type - {}".format(topo_name))
return "unsupported"
tb_type = match.group()
if tb_type in ['mgmttor', 'dualtor']:
if tb_type in ['mgmttor', 'dualtor', 'm0']:
yaqiangz marked this conversation as resolved.
Show resolved Hide resolved
# certain testbed types are in 't0' category with different names.
tb_type = 't0'
return tb_type
Expand Down