From d1181459e4397c9289b82eb39ff09769213d5a00 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Sat, 23 Mar 2024 02:39:20 +0100 Subject: op-mode: T6161: Show container details in JSON format I made some assumptions about node types, and I expanded the initial request to also work for networks and containers. I found that the "raw" versions of these commands already existed in the python scripts, so I just used the existing flags. (cherry picked from commit b5d10d11fc8535a95df1fce2ddb0a2a08567fa77) --- op-mode-definitions/container.xml.in | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'op-mode-definitions/container.xml.in') diff --git a/op-mode-definitions/container.xml.in b/op-mode-definitions/container.xml.in index 4aa13e913..bb6f97b02 100644 --- a/op-mode-definitions/container.xml.in +++ b/op-mode-definitions/container.xml.in @@ -103,12 +103,28 @@ sudo ${vyos_op_scripts_dir}/container.py show_container - + + + Show containers in JSON format + + + sudo ${vyos_op_scripts_dir}/container.py show_container --raw + + Show container image sudo ${vyos_op_scripts_dir}/container.py show_image - + + + + Show container image in JSON format + + + sudo ${vyos_op_scripts_dir}/container.py show_image --raw + + + Show logs from a given container @@ -116,14 +132,25 @@ container name + sudo podman logs --names "$4" - + Show available container networks + sudo ${vyos_op_scripts_dir}/container.py show_network - + + + + Show available container networks in JSON format + + + sudo ${vyos_op_scripts_dir}/container.py show_network --raw + + + -- cgit v1.2.3