Skip to content

Commit

Permalink
Merge pull request #3171 from p3lim/T6161
Browse files Browse the repository at this point in the history
op-mode: T6161: Show container details in JSON format
  • Loading branch information
dmbaturin authored Mar 23, 2024
2 parents 51ca65b + b5d10d1 commit 91cd3ea
Showing 1 changed file with 31 additions and 4 deletions.
35 changes: 31 additions & 4 deletions op-mode-definitions/container.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -103,27 +103,54 @@
</properties>
<command>sudo ${vyos_op_scripts_dir}/container.py show_container</command>
<children>
<leafNode name="image">
<node name="json">
<properties>
<help>Show containers in JSON format</help>
</properties>
<!-- no admin check -->
<command>sudo ${vyos_op_scripts_dir}/container.py show_container --raw</command>
</node>
<node name="image">
<properties>
<help>Show container image</help>
</properties>
<command>sudo ${vyos_op_scripts_dir}/container.py show_image</command>
</leafNode>
<children>
<node name="json">
<properties>
<help>Show container image in JSON format</help>
</properties>
<!-- no admin check -->
<command>sudo ${vyos_op_scripts_dir}/container.py show_image --raw</command>
</node>
</children>
</node>
<tagNode name="log">
<properties>
<help>Show logs from a given container</help>
<completionHelp>
<path>container name</path>
</completionHelp>
</properties>
<!-- no admin check -->
<command>sudo podman logs --names "$4"</command>
</tagNode>
<leafNode name="network">
<node name="network">
<properties>
<help>Show available container networks</help>
</properties>
<!-- no admin check -->
<command>sudo ${vyos_op_scripts_dir}/container.py show_network</command>
</leafNode>
<children>
<node name="json">
<properties>
<help>Show available container networks in JSON format</help>
</properties>
<!-- no admin check -->
<command>sudo ${vyos_op_scripts_dir}/container.py show_network --raw</command>
</node>
</children>
</node>
</children>
</node>
<node name="log">
Expand Down

0 comments on commit 91cd3ea

Please sign in to comment.