-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
json output for exec
command
#465
Conversation
implementation of #463. Do we need a specific field indicating of under stdout we have a string or a json struct? |
I think it is better to keep consistency with the inspect command where we
have a flag `--format | -f` that takes a string value of either `table` or
`json`
…On Mon, Jun 21, 2021 at 7:51 PM Markus Vahlenkamp ***@***.***> wrote:
implementation of #463
<#463>.
If the returned string can not be parsed as json, it is returned as a
string field.
just stdout is tried to parse, stderr is always a string field.
Do we need a specific field indicating of under stdout we have a string or
a json struct?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#465 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLKV5NOGBFWSFBUZYPIH2LTT533JANCNFSM47CBCWTA>
.
|
@hellt changed it to -f / --format [plain, json] |
exec
command
I think it is safe to rebase this request on top of #469 to incorporate the changes Karim made |
I've made a it looks ok to me at this moment, @steiler you can check this and if it is all ok, feel free to merge |
./containerlab exec -t lab-examples/clos02/clos02.clab.yml -j sr_cli "show interface mgmt0 brief | as json"
will provide. This is with no label selector applied, Hence you will get errors with the client containers.
Shall we also add the return code? in view that might also make sense.