summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-12-08 10:00:44 +0100
committerChristian Poessinger <christian@poessinger.com>2021-12-08 10:00:51 +0100
commit854cbc87eeee45d6d53320c6d9a0dcf74920ceb9 (patch)
tree3eba138f2a2753035007dcdc76982f7cc04bcfd1
parenta17c70449a766dbc00a7ab8438c13a2a12745614 (diff)
downloadvyos-1x-854cbc87eeee45d6d53320c6d9a0dcf74920ceb9.tar.gz
vyos-1x-854cbc87eeee45d6d53320c6d9a0dcf74920ceb9.zip
smoketest: getFRRconfig() now supports reading specified deamon config
-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 93b2ca150..50f80e7d1 100644
--- a/smoketest/scripts/cli/base_vyostest_shim.py
+++ b/smoketest/scripts/cli/base_vyostest_shim.py
@@ -76,9 +76,9 @@ class VyOSUnitTestSHIM:
while run(f'sudo lsof | grep -q {commit_lock}') == 0:
sleep(0.250)
- def getFRRconfig(self, string, end='$'):
+ def getFRRconfig(self, string, end='$', endsection='^!', daemon=''):
""" Retrieve current "running configuration" from FRR """
- command = f'vtysh -c "show run" | sed -n "/^{string}{end}/,/^!/p"'
+ command = f'vtysh -c "show run {daemon} no-header" | sed -n "/^{string}{end}/,/{endsection}/p"'
out = cmd(command)
if self.debug:
import pprint