Spaces:
Sleeping
Sleeping
File size: 1,267 Bytes
8e74f68 c393169 8e74f68 | 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 | """
Regression test for incident test-0
Test incident 0
Generated: 2025-11-25T02:01:43.323762
"""
from pyats import aetest
from pyats.topology import loader
class Testtest_0(aetest.Testcase):
"""Test that prevents recurrence of Test incident 0"""
@aetest.setup
def setup(self, testbed):
self.devices = {}
for device_name in []:
device = testbed.devices[device_name]
device.connect()
self.devices[device_name] = device
@aetest.test
def verify_configuration(self):
"""Verify configuration doesn't have the same error"""
for device_name, device in self.devices.items():
# Get running config
output = device.execute('show running-config')
# Check for known bad pattern
# TODO: Customize based on root cause
assert "invalid_config_pattern" not in output, \
f"Found invalid config on {device_name}"
@aetest.cleanup
def cleanup(self):
for device in self.devices.values():
device.disconnect()
if __name__ == '__main__':
import sys
from pyats.topology import loader
testbed = loader.load('testbed.yaml')
aetest.main(testbed=testbed)
|