Merge pull request #2 from dwallacelf/vpp-api-args

vppcfg: add args to specify location of vpp api files
This commit is contained in:
Pim van Pelt
2022-04-27 10:11:01 +02:00
committed by GitHub
4 changed files with 85 additions and 13 deletions

View File

@ -31,8 +31,13 @@ class Dumper(VPPApi):
Note that not all running VPP configs are "valid" in vppcfg's eyes. It is not
guaranteed that the output of the Dumper() will stand validation."""
def __init__(self, address="/run/vpp/api.sock", clientname="vppcfg"):
VPPApi.__init__(self, address, clientname)
def __init__(
self,
vpp_api_socket="/run/vpp/api.sock",
vpp_json_dir="/usr/share/vpp/api/",
clientname="vppcfg",
):
VPPApi.__init__(self, vpp_api_socket, vpp_json_dir, clientname)
def write(self, outfile):
"""Emit the configuration to either stdout (outfile=='-') or a filename"""