summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/base_vyostest_shim.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-03-31 19:56:39 +0200
committerChristian Poessinger <christian@poessinger.com>2021-03-31 20:02:52 +0200
commitc147d97a26cd554524e7390c52c749cc3f308787 (patch)
tree2529c692398b59f5b8eb70a224b492b14a175190 /smoketest/scripts/cli/base_vyostest_shim.py
parentf22fa8e6454b1cd2539ddb7c354ac9eeeac725c5 (diff)
downloadvyos-1x-c147d97a26cd554524e7390c52c749cc3f308787.tar.gz
vyos-1x-c147d97a26cd554524e7390c52c749cc3f308787.zip
smoketest: bfd: only evaluate individual profile section
When validating FRR profiles, only load the configuration for each individual profile instead of all profiles. This is done by a new argument to getFRRconfig() named endsection='^!' which tells what is the delimiter when a config section of FRR ends, this is usually "^!", but for BFD profiles this is "^ !", as this is a new level under the FRR CLI.
Diffstat (limited to 'smoketest/scripts/cli/base_vyostest_shim.py')
-rw-r--r--smoketest/scripts/cli/base_vyostest_shim.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/base_vyostest_shim.py b/smoketest/scripts/cli/base_vyostest_shim.py
index 18e4e567e..18e49f47f 100644
--- a/smoketest/scripts/cli/base_vyostest_shim.py
+++ b/smoketest/scripts/cli/base_vyostest_shim.py
@@ -71,9 +71,9 @@ class VyOSUnitTestSHIM:
def cli_commit(self):
self._session.commit()
- def getFRRconfig(self, string, end='$'):
+ def getFRRconfig(self, string, end='$', endsection='^!'):
""" Retrieve current "running configuration" from FRR """
- command = f'vtysh -c "show run" | sed -n "/^{string}{end}/,/^!/p"'
+ command = f'vtysh -c "show run" | sed -n "/^{string}{end}/,/{endsection}/p"'
count = 0
tmp = ''