Age | Commit message (Collapse) | Author |
|
Add action 'reset' (op-mode) for HTTP-API
http://localhost/reset
curl --unix-socket /run/api.sock -X POST -Fkey=mykey \
-Fdata='{"op": "reset", "path": ["ip", "bgp", "192.0.2.14"]}' \
http://localhost/reset
|
|
If the subprocess is producing enough data (in this case showConfig on a
large config file), then the construction:
p = subprocess.Popen(.., stdout=subprocess.PIPE, ..)
p.wait()
will deadlock with the subprocess waiting for data to be consumed, while
the Python process waits for its termination. So consume data, then wait
for termination.
(cherry picked from commit 83bcd13775323bec35d018223029e9a8b13179c8)
|
|
|
|
ConfigSession needs to have required env vars manully injected; add the
shim definition env var to the list, if config daemon is active.
|
|
commit 3f8884587 added an endpoint for image management; T2753 updated the
command line options. Make script call consistent.
|
|
|
|
|
|
- in preparation for a wireguard cli test case, generate
is used to create the keys later used in the config
|
|
Without closing the communication channel to the subprocess, Python will
complain e.g. when executing vyos-smoketest binary.
/usr/lib/python3/dist-packages/vyos/configsession.py:110: ResourceWarning:
unclosed file <_io.BufferedReader name=3>
self.__run_command([CLI_SHELL_API, 'setupSession'])
ResourceWarning: Enable tracemalloc to get the object allocation traceback
|
|
|
|
Set gid and permissions so that vyatta-cfg group has access to the
active config; fix typo in arg len check; reorganize; add log output.
|
|
|
|
|
|
__run_command.
|
|
They are widely referenced by command templates, but a process started as a service
doesn't automatically get them.
|
|
|
|
|
|
functions under it.
This is required for programs running outside a CLI session, like the future API daemon.
|
|
|
|
|