summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli/base_vyostest_shim.py
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-11-16 15:46:23 +0100
committerGitHub <noreply@github.com>2023-11-16 15:46:23 +0100
commit71823db0fceee36f631484d3ff6767569e1ca825 (patch)
tree3528e9ba826be0ba71556f2393685402f44a22ec /smoketest/scripts/cli/base_vyostest_shim.py
parentcab0d62af86ced1ded6edefb53c2e902249b160d (diff)
parentb9493ce110fb1ae2090299a5bcb5d3c7fc3dfd60 (diff)
downloadvyos-1x-71823db0fceee36f631484d3ff6767569e1ca825.tar.gz
vyos-1x-71823db0fceee36f631484d3ff6767569e1ca825.zip
Merge pull request #2489 from vyos/mergify/bp/sagitta/pr-2476
pim(6): T5733: add missing FRR related features (backport #2476)
Diffstat (limited to 'smoketest/scripts/cli/base_vyostest_shim.py')
-rw-r--r--smoketest/scripts/cli/base_vyostest_shim.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/smoketest/scripts/cli/base_vyostest_shim.py b/smoketest/scripts/cli/base_vyostest_shim.py
index f694f539d..140642806 100644
--- a/smoketest/scripts/cli/base_vyostest_shim.py
+++ b/smoketest/scripts/cli/base_vyostest_shim.py
@@ -78,9 +78,10 @@ class VyOSUnitTestSHIM:
while run(f'sudo lsof -nP {commit_lock}') == 0:
sleep(0.250)
- def getFRRconfig(self, string, end='$', endsection='^!', daemon=''):
+ def getFRRconfig(self, string=None, end='$', endsection='^!', daemon=''):
""" Retrieve current "running configuration" from FRR """
- command = f'vtysh -c "show run {daemon} no-header" | sed -n "/^{string}{end}/,/{endsection}/p"'
+ command = f'vtysh -c "show run {daemon} no-header"'
+ if string: command += f' | sed -n "/^{string}{end}/,/{endsection}/p"'
out = cmd(command)
if self.debug:
import pprint