diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-12-08 10:00:44 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-12-08 10:00:51 +0100 |
commit | 854cbc87eeee45d6d53320c6d9a0dcf74920ceb9 (patch) | |
tree | 3eba138f2a2753035007dcdc76982f7cc04bcfd1 /smoketest | |
parent | a17c70449a766dbc00a7ab8438c13a2a12745614 (diff) | |
download | vyos-1x-854cbc87eeee45d6d53320c6d9a0dcf74920ceb9.tar.gz vyos-1x-854cbc87eeee45d6d53320c6d9a0dcf74920ceb9.zip |
smoketest: getFRRconfig() now supports reading specified deamon config
Diffstat (limited to 'smoketest')
-rw-r--r-- | smoketest/scripts/cli/base_vyostest_shim.py | 4 |
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 |