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

tests: stop using fifos in bgp...multipath_relax #1

Closed
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
35ee15f
zebra: add temp warning (do not merge)
choppsv1 Jul 19, 2021
de53896
tests: simple fast static test
choppsv1 Jul 23, 2021
22ef8ed
tests: Run tests in a collection of containers
choppsv1 Jul 18, 2021
a287499
tests: summarize XML test results
choppsv1 Jul 18, 2021
73e90a4
tests: Update dir-locals
choppsv1 Jul 14, 2021
65ddecb
doc: minor update based on mininet removal
choppsv1 Jul 18, 2021
195d98c
tests: reasonable defaults for pytest results+logging
choppsv1 Jul 20, 2021
4cec960
tests: improve vxlan test determinism
choppsv1 Jul 18, 2021
57a576b
tests: NEW micronet replacement for mininet
choppsv1 Jul 14, 2021
fced6f1
tests: update infra for micronet
choppsv1 Jul 26, 2021
320e4ec
tests: fix pylint infra errors
choppsv1 Jul 21, 2021
c0dddb3
tests: fix pylint test errors
choppsv1 Jul 29, 2021
42ff766
tests: update tests for micronet
choppsv1 Jul 30, 2021
11a272d
tests: remove legacy Topo class (fixes many pylint errors)
choppsv1 Jul 29, 2021
6ab60b1
tests: remove legacy Topo class from infra
choppsv1 Aug 10, 2021
a93dc9d
tests: remove legacy Topo class from micronet
choppsv1 Aug 10, 2021
432fdf0
tests: add helper object for mcast-tester and iperf tool.
choppsv1 Jul 30, 2021
7d0201e
tests: use new helper object for mcast-tester and iperf
choppsv1 Jul 30, 2021
5ee5768
tests: keep revisions of configs
choppsv1 Aug 1, 2021
f3d6c8d
tests: triage intermittent ospfd failure in CI
choppsv1 Aug 4, 2021
4280118
tests: add triage show commands to ospf test
choppsv1 Aug 4, 2021
c64556f
tools: move frr-reload.py to python3 explicitly
choppsv1 Aug 4, 2021
e0a8cdf
docker: update with micronet changes
choppsv1 Aug 6, 2021
9d13373
tests: add back a 10 second delay to see if this fixes the failures
choppsv1 Aug 6, 2021
096bd1b
ospfd: Summarised External LSA is not flushed in one scenario
mobash-rasool Aug 16, 2021
7f5d7f2
tests: remove unneeded mcast group kernel routes and sysctl
choppsv1 Aug 18, 2021
906eef4
tests: Make bgp_multiview_topo1 predictable
mwinter-osr Aug 18, 2021
ae4f7ed
tests: use std polling for results
choppsv1 Aug 21, 2021
720c420
tests: add generic exa-receive.py script
choppsv1 Aug 22, 2021
679d8df
tests: use common exa-receive.py script
choppsv1 Aug 22, 2021
f73a705
tests: temp increase post fail check time to 10 times the timeout
choppsv1 Aug 22, 2021
26d99e9
tests: stop using fifos in bgp...multipath_relax
eqvinox Aug 22, 2021
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
Prev Previous commit
Next Next commit
tests: remove legacy Topo class from micronet
Signed-off-by: Christian Hopps <chopps@labn.net>
  • Loading branch information
choppsv1 committed Aug 22, 2021
commit a93dc9d96f5a1ea868f121b1f318282daa06622a
119 changes: 2 additions & 117 deletions tests/topotests/lib/micronet_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,102 +64,8 @@ def terminate(self):


class Topo(object): # pylint: disable=R0205
"""
Topology object passed to Micronet to build actual topology.
"""

def __init__(self, *args, **kwargs):
self.params = kwargs
self.name = kwargs["name"] if "name" in kwargs else "unnamed"
self.tgen = kwargs["tgen"] if "tgen" in kwargs else None

self.logger = logging.getLogger(__name__ + ".topo")

self.logger.debug("%s: Creating", self)

self.nodes = {}
self.hosts = {}
self.switches = {}
self.links = {}

# if "no_init_build" in kwargs and kwargs["no_init_build"]:
# return

# This needs to move outside of here. Current tests count on it being called on init;
# however, b/c of this there is lots of twisty logic to support topogen based tests where
# the build routine must get get_topogen() so topogen can then set it's topogen.topo to the
# class it's in the process of instantiating (this one) b/c build will use topogen before
# the instantiation completes.
self.build(*args, **kwargs)

def __str__(self):
return "Topo({})".format(self.name)

def build(self, *args, **kwargs):
"Overriden by real class"
del args
del kwargs
raise NotImplementedError("Needs to be overriden")

def addHost(self, name, **kwargs):
self.logger.debug("%s: addHost %s", self, name)
self.nodes[name] = dict(**kwargs)
self.hosts[name] = self.nodes[name]
return name

addNode = addHost

def addSwitch(self, name, **kwargs):
self.logger.debug("%s: addSwitch %s", self, name)
self.nodes[name] = dict(**kwargs)
if "cls" in self.nodes[name]:
self.logger.warning("Overriding Bridge class with micronet.Bridge")
del self.nodes[name]["cls"]
self.switches[name] = self.nodes[name]
return name

def addLink(self, name1, name2, **kwargs):
"""Link up switch and a router.

possible kwargs:
- intfName1 :: switch-side interface name - sometimes missing
- intfName2 :: router-side interface name
- addr1 :: switch-side MAC used by test_ldp_topo1 only
- addr2 :: router-side MAC used by test_ldp_topo1 only
"""
if1 = (
kwargs["intfName1"]
if "intfName1" in kwargs
else "{}-{}".format(name1, name2)
)
if2 = (
kwargs["intfName2"]
if "intfName2" in kwargs
else "{}-{}".format(name2, name1)
)

self.logger.debug("%s: addLink %s %s if1: %s if2: %s", self, name1, name2, if1, if2)

if name1 in self.switches:
assert name2 in self.hosts
swname, rname = name1, name2
elif name2 in self.switches:
assert name1 in self.hosts
swname, rname = name2, name1
if1, if2 = if2, if1
else:
# p2p link
assert name1 in self.hosts
assert name2 in self.hosts
swname, rname = name1, name2

if swname not in self.links:
self.links[swname] = {}

if rname not in self.links[swname]:
self.links[swname][rname] = set()

self.links[swname][rname].add((if1, if2))
raise Exception("Remove Me")


class Mininet(Micronet):
Expand All @@ -169,7 +75,7 @@ class Mininet(Micronet):

g_mnet_inst = None

def __init__(self, controller=None, topo=None):
def __init__(self, controller=None):
"""
Create a Micronet.
"""
Expand All @@ -193,27 +99,6 @@ def __init__(self, controller=None, topo=None):

self.logger.debug("%s: Creating", self)

if topo and topo.hosts:
self.logger.debug("Adding hosts: %s", topo.hosts.keys())
for name in topo.hosts:
self.add_host(name, **topo.hosts[name])

if topo and topo.switches:
self.logger.debug("Adding switches: %s", topo.switches.keys())
for name in topo.switches:
self.add_switch(name, **topo.switches[name])

if topo and topo.links:
self.logger.debug("Adding links: ")
for swname in sorted(topo.links):
for rname in sorted(topo.links[swname]):
for link in topo.links[swname][rname]:
self.add_link(swname, rname, link[0], link[1])

if topo:
# Now that topology is built, configure hosts
self.configure_hosts()

def __str__(self):
return "Mininet()"

Expand Down