Let's implement the --json / -j switch for the exec command.
Right now I't all just thrown into a logger, which is not very handy if containerlab is integrated into a broader automated ecosystem.
All output is thereby taken as is and thrown into a dict indexed by the container name.
We try to load the received output as json and insert it as json or insert it as a plain string, such that you can still determin the output per container.
Loading the json would for instance make sense for e.g. ip -j address show.
Let's implement the --json / -j switch for the exec command. Right now I't all just thrown into a logger, which is not very handy if containerlab is integrated into a broader automated ecosystem.
All output is thereby taken as is and thrown into a dict indexed by the container name.
We try to load the received output as json and insert it as json or insert it as a plain string, such that you can still determin the output per container.
Loading the json would for instance make sense for e.g.
ip -j address show
.