Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@aetest.setup
def verify_prerequisite(self):
raise NotImplementedError
@aetest.setup
def setup_section(self, steps, testbed, section=None, data=None):
return self.dispatcher(steps, testbed, section, data)
@aetest.setup
def prerequisites(self,uut,ospf_id):
''' Verify Ospf configured or nor '''
#To verify if Ospf is configured
output = uut.parse('show ip ospf')
if ospf_id in output:
self.skipped("Ospf id {id} is not showing in the "
"output of the cmd, this is "
"unexpected!".format(id=ospf_id))
@aetest.setup
def prerequisites(self,uut,ospf_id):
output = uut.parse('show ip ospf')
if ospf_id in output:
self.skipped("Ospf id {id} is not showing in the "
"output of the cmd, this is "
"unexpected!".format(id=ospf_id))
@aetest.setup
def verify_prerequisite(self, uut, abstract, steps, timeout):
'''Learn Ops object and verify the requirements.
If the requirements are not satisfied, then skip to the next
testcase.
Args:
uut (`obj`): Device object.
abstract (`obj`): Abstract object.
steps (`step obj`): aetest step object
timeout (`timeout obj`): Timeout Object
Returns:
None
Raises:
@aetest.setup
def verify_prerequisite(self, uut, abstract, steps, timeout):
'''Learn Ops object and verify the requirements.
If the requirements are not satisfied, then skip to the next
testcase.
Args:
uut (`obj`): Device object.
abstract (`obj`): Abstract object.
steps (`step obj`): aetest step object
timeout (`timeout obj`): Timeout Object
Returns:
None
Raises:
@aetest.setup
def verify_prerequisite(self, uut, abstract, steps, timeout):
raise NotImplementedError
@aetest.setup
def get_simulations(self, uut):
''' Get simulations
Args:
uut (`obj`): Device object
Returns:
None
Raises:
pyATS Results
'''
log.info("Getting list of simulations.")
try:
self.sim_list = get_simulations(uut)
@aetest.setup
def verify_prerequisite(self):
raise NotImplementedError
@aetest.setup
def verify_prerequisite(self, uut, abstract, steps, timeout, add_igmp_group=None):
self.timeout = timeout
try:
self.pre_snap = self.mapping.learn_ops(device=uut,
abstract=abstract,
steps=steps,
timeout=timeout)
except Exception as e:
self.errored("Section failed due to: '{e}'".format(e=e))
# nothing in the static groups,
# then learn if any groups to have some vrf interface value
if any(not item for item in self.mapping.keys):
self.mapping.requirements['ops.igmp.igmp.Igmp']['requirements'] = \