02-28-2023 10:10 PM
Hello,
How do I tell testbed to connect to devices of (let's say) type="router" ? I use couple of devices as proxy and would like to skip them in tests that are ran via pyats.easypy.
So far the best solution I came up with is to filter them in every test case based on self.device.os (or any other property). They do show up in report as Failed. I would prefer to skip them in every test case.
Thank you.
Solved! Go to Solution.
03-02-2023 12:53 PM
I've found one solution to filter out "proxy" jumphosts - to loop through filtered list in common_setup class. Like this:
class common_setup(aetest.CommonSetup):
@aetest.subsection
def TestRouters(self, testbed):
routers = [x for x in testbed.devices.values() if x.type == 'router']
aetest.loop.mark(Testcase_VERSION, device=routers)
03-02-2023 12:53 PM
I've found one solution to filter out "proxy" jumphosts - to loop through filtered list in common_setup class. Like this:
class common_setup(aetest.CommonSetup):
@aetest.subsection
def TestRouters(self, testbed):
routers = [x for x in testbed.devices.values() if x.type == 'router']
aetest.loop.mark(Testcase_VERSION, device=routers)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide