Skip to content

Commit

Permalink
[chassis/dvs] Add support for virtual chassis to DVS testbed (sonic-n…
Browse files Browse the repository at this point in the history
…et#1345)

* Add a test_virtual_chassis.py to verify the virtual chassis
* Support virtual chassis topology in conftest.py to run the test_virtual_chassis.py. Notable changes in conftest.py are:
    - Unlike create_vnet, virtual_chassis does not use a sw container.
    - New DockerVirtualChassisTopology class to setup the connections when the virtual chassis containers restart.
* Integrate virtual chassis into conftest.py
  • Loading branch information
saravanansv authored Aug 19, 2020
1 parent 881c3d4 commit 25d071b
Show file tree
Hide file tree
Showing 15 changed files with 1,282 additions and 22 deletions.
403 changes: 381 additions & 22 deletions tests/conftest.py

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions tests/test_virtual_chassis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import pytest

class TestVirtualChassis(object):
def test_connectivity(self, vct):
if vct is None:
return
dvss = vct.dvss
nbrs = vct.get_topo_neigh()
for name in dvss.keys():
dv = dvss[name]
#ping all vs's inband address
for ctn in vct.inbands.keys():
ip = vct.inbands[ctn]["inband_address"]
ip = ip.split("/")[0]
print("%s: ping inband address %s" % (name, ip))
_, out = dv.runcmd(['sh', "-c", "ping -c 5 -W 0 -q %s" % ip])
print(out)
assert '5 received' in out
if name not in nbrs.keys():
continue
for item in nbrs[name]:
ip = str(item[1])
print("%s: ping neighbor address %s" % (name, ip))
_, out = dv.runcmd(['sh', "-c", "ping -c 5 -W 0 -q %s" % ip])
print(out)
assert '5 received' in out
Loading

0 comments on commit 25d071b

Please sign in to comment.