diff options
author | Kim <kim.sidney@gmail.com> | 2021-10-07 16:52:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-07 16:52:56 +0200 |
commit | 2274dbf9047493a00a6f30346b38dacd8cfcf965 (patch) | |
tree | f431f5f6f1b2770c98ed9047e1cec9209e536366 /op-mode-definitions/containers.xml.in | |
parent | 2acfffab8b98238e7d869673a858a4ae21651f0b (diff) | |
parent | adc7ef387d40e92bd7163ee6b401e99e554394a3 (diff) | |
download | vyos-1x-2274dbf9047493a00a6f30346b38dacd8cfcf965.tar.gz vyos-1x-2274dbf9047493a00a6f30346b38dacd8cfcf965.zip |
Merge branch 'current' into 2fa
Diffstat (limited to 'op-mode-definitions/containers.xml.in')
-rw-r--r-- | op-mode-definitions/containers.xml.in | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/op-mode-definitions/containers.xml.in b/op-mode-definitions/containers.xml.in index a22549dd9..b2b318786 100644 --- a/op-mode-definitions/containers.xml.in +++ b/op-mode-definitions/containers.xml.in @@ -17,6 +17,19 @@ </node> </children> </node> + <node name="connect"> + <children> + <tagNode name="container"> + <properties> + <help>Attach to a running container</help> + <completionHelp> + <path>container name</path> + </completionHelp> + </properties> + <command>sudo podman exec --interactive --tty "$3" /bin/sh</command> + </tagNode> + </children> + </node> <node name="delete"> <children> <node name="container"> @@ -27,6 +40,9 @@ <tagNode name="image"> <properties> <help>Delete container image</help> + <completionHelp> + <script>sudo podman image ls -q</script> + </completionHelp> </properties> <command>sudo ${vyos_op_scripts_dir}/containers_op.py --remove "${4}"</command> </tagNode> @@ -48,6 +64,15 @@ </properties> <command>sudo ${vyos_op_scripts_dir}/containers_op.py --image</command> </leafNode> + <tagNode name="log"> + <properties> + <help>Show logs from a given container</help> + <completionHelp> + <path>container name</path> + </completionHelp> + </properties> + <command>sudo podman logs --names "$4"</command> + </tagNode> <leafNode name="network"> <properties> <help>Show available container networks</help> @@ -56,6 +81,52 @@ </leafNode> </children> </node> + <node name="log"> + <children> + <tagNode name="container"> + <properties> + <help>Show logs from a given container</help> + <completionHelp> + <path>container name</path> + </completionHelp> + </properties> + <command>sudo podman logs --names "$4"</command> + </tagNode> + </children> + </node> + </children> + </node> + <node name="restart"> + <children> + <tagNode name="container"> + <properties> + <help>Restart a given container</help> + <completionHelp> + <path>container name</path> + </completionHelp> + </properties> + <command>sudo podman restart "$3"</command> + </tagNode> + </children> + </node> + <node name="update"> + <children> + <node name="container"> + <properties> + <help>Update a container image</help> + </properties> + <children> + <tagNode name="image"> + <properties> + <help>Delete container image</help> + <completionHelp> + <path>container name</path> + </completionHelp> + </properties> + <command>sudo ${vyos_op_scripts_dir}/containers_op.py --update "${4}"</command> + </tagNode> + </children> + </node> </children> </node> </interfaceDefinition> |