Skip to content

Commit

Permalink
smoketest: T6746: add 2 second guard timer for getFRRconfig()
Browse files Browse the repository at this point in the history
Sometimes FRR needs some time after reloading the configuration to appear in
vtysh. This is a workaround addiung a 2 second guard timer.
  • Loading branch information
c-po committed Dec 12, 2024
1 parent cddd68b commit 276a016
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions smoketest/scripts/cli/base_vyostest_shim.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ def op_mode(self, path : list) -> None:

def getFRRconfig(self, string=None, end='$', endsection='^!', daemon=''):
""" Retrieve current "running configuration" from FRR """
# Sometimes FRR needs some time after reloading the configuration to
# appear in vtysh. This is a workaround addiung a 2 seconds guard timer
sleep(2)
command = f'vtysh -c "show run {daemon} no-header"'
if string: command += f' | sed -n "/^{string}{end}/,/{endsection}/p"'
out = cmd(command)
Expand Down

0 comments on commit 276a016

Please sign in to comment.