diff options
| author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2022-10-12 17:08:02 +0200 |
|---|---|---|
| committer | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2025-02-13 23:30:24 +0100 |
| commit | a03174843512340f2f970fd6c3fe189b7bba92d6 (patch) | |
| tree | 40453c6ce4bf2cd6fcb9571a21c7900a228b68c4 /smoketest/scripts/cli/base_vyostest_shim.py | |
| parent | c2238596f7994e51974e9a517fb7ab7e948e955f (diff) | |
| download | veeos-1x-a03174843512340f2f970fd6c3fe189b7bba92d6.tar.gz veeos-1x-a03174843512340f2f970fd6c3fe189b7bba92d6.zip | |
wlb: T4470: Migrate WAN load balancer to Python/XML
Diffstat (limited to 'smoketest/scripts/cli/base_vyostest_shim.py')
| -rw-r--r-- | smoketest/scripts/cli/base_vyostest_shim.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/base_vyostest_shim.py b/smoketest/scripts/cli/base_vyostest_shim.py index a89b8dce5..edf940efd 100644 --- a/smoketest/scripts/cli/base_vyostest_shim.py +++ b/smoketest/scripts/cli/base_vyostest_shim.py @@ -183,6 +183,15 @@ class VyOSUnitTestSHIM: break self.assertTrue(not matched if inverse else matched, msg=search) + def verify_nftables_chain_exists(self, table, chain, inverse=False): + try: + cmd(f'sudo nft list chain {table} {chain}') + if inverse: + self.fail(f'Chain exists: {table} {chain}') + except OSError: + if not inverse: + self.fail(f'Chain does not exist: {table} {chain}') + # Verify ip rule output def verify_rules(self, rules_search, inverse=False, addr_family='inet'): rule_output = cmd(f'ip -family {addr_family} rule show') |
