mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 19:11:44 +00:00
tools: fix frr-reload.py daemon option
the refactored frr-reload.py is adding 'no-header' to the 'show running' command of vtysh, but if a daemon is specified the no-header option should only be added after the daemon name. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
This commit is contained in:
parent
1a5fc72066
commit
7e7fedcb40
@ -146,9 +146,10 @@ class Vtysh(object):
|
|||||||
return stdout.decode('UTF-8')
|
return stdout.decode('UTF-8')
|
||||||
|
|
||||||
def mark_show_run(self, daemon = None):
|
def mark_show_run(self, daemon = None):
|
||||||
cmd = 'show running-config no-header'
|
cmd = 'show running-config'
|
||||||
if daemon:
|
if daemon:
|
||||||
cmd += ' %s' % daemon
|
cmd += ' %s' % daemon
|
||||||
|
cmd += ' no-header'
|
||||||
show_run = self._call_cmd(cmd, stdout=subprocess.PIPE)
|
show_run = self._call_cmd(cmd, stdout=subprocess.PIPE)
|
||||||
mark = self._call(['-m', '-f', '-'], stdin=show_run.stdout, stdout=subprocess.PIPE)
|
mark = self._call(['-m', '-f', '-'], stdin=show_run.stdout, stdout=subprocess.PIPE)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user