summaryrefslogtreecommitdiff
path: root/src/op_mode/containers_op.sh
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-04-21 20:48:55 +0200
committerGitHub <noreply@github.com>2021-04-21 20:48:55 +0200
commit821d9e4d36d7520973d6f2cd146feebb9918227a (patch)
tree2aa19621ea0f2d812151c23acc5bf924c0a25464 /src/op_mode/containers_op.sh
parentee6bf7e9af5c6a25177a652f6a455ebb7438186d (diff)
parentd657e65d66c14c007c235779ecb73ef5b8cfa327 (diff)
downloadvyos-1x-821d9e4d36d7520973d6f2cd146feebb9918227a.tar.gz
vyos-1x-821d9e4d36d7520973d6f2cd146feebb9918227a.zip
Merge pull request #816 from sever-sever/T2216-op-mode
container: T2216: Rewrite op-mode to python
Diffstat (limited to 'src/op_mode/containers_op.sh')
-rwxr-xr-xsrc/op_mode/containers_op.sh60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/op_mode/containers_op.sh b/src/op_mode/containers_op.sh
deleted file mode 100755
index 9c410bd7f..000000000
--- a/src/op_mode/containers_op.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env bash
-
-# Expect 2 args or "show-containers" or "show-images"
-if [[ $# -ne 2 ]] && [[ $1 != "--show-containers" ]] && [[ $1 != "--show-images" ]] && [[ $1 != "--show-networks" ]] ; then
- echo "Image not set or not found"
- exit 1
-fi
-
-OPTION=$1
-IMAGE=$2
-
-# Download image
-pull_image() {
- sudo podman pull ${IMAGE}
-}
-
-# Remove image
-remove_image() {
- sudo podman image rm ${IMAGE}
-}
-
-# Show containers
-show_containers() {
- sudo podman ps -a
-}
-
-# Show image
-show_images() {
- sudo podman image ls
-}
-
-# Show networks
-show_networks() {
- sudo podman network ls
-}
-
-if [ "$OPTION" = "--pull" ]; then
- pull_image
- exit 0
-fi
-
-if [ "$OPTION" = "--remove" ]; then
- remove_image
- exit 0
-fi
-
-if [ "$OPTION" = "--show-containers" ]; then
- show_containers
- exit 0
-fi
-
-if [ "$OPTION" = "--show-networks" ]; then
- show_networks
- exit 0
-fi
-
-if [ "$OPTION" = "--show-images" ]; then
- show_images
- exit 0
-fi