diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-07-13 16:34:51 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-13 16:34:51 -0400 |
commit | a689639a6502bab3f49b853bc2983c1b44363b2f (patch) | |
tree | 75ba256d70545d79aa61d7c57c20df886be1555f /contrib/python/cmd/rm.py | |
parent | 14a6d51a8432fc0c3324fec02e8729d3032f2af2 (diff) | |
parent | 74ccd9ce5f29a1df4ffe70b4d8bd00c29d5d9d15 (diff) | |
download | podman-a689639a6502bab3f49b853bc2983c1b44363b2f.tar.gz podman-a689639a6502bab3f49b853bc2983c1b44363b2f.tar.bz2 podman-a689639a6502bab3f49b853bc2983c1b44363b2f.zip |
Merge pull request #1081 from jwhonce/wip/client
remote python client for podman
Diffstat (limited to 'contrib/python/cmd/rm.py')
-rw-r--r-- | contrib/python/cmd/rm.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/contrib/python/cmd/rm.py b/contrib/python/cmd/rm.py deleted file mode 100644 index c9dfaa688..000000000 --- a/contrib/python/cmd/rm.py +++ /dev/null @@ -1,22 +0,0 @@ -from pman import PodmanRemote -from utils import write_out, convert_size, stringTimeToHuman - -def cli(subparser): - imagesp = subparser.add_parser("rm", - help=("delete one or more containers")) - imagesp.add_argument("--force", "-f", action="store_true", help="force delete", dest="force") - imagesp.add_argument("delete_targets", nargs='*', help="container images to delete") - imagesp.set_defaults(_class=Rm, func='remove_containers') - - -class Rm(PodmanRemote): - - def remove_containers(self): - delete_targets = getattr(self.args, "delete_targets") - if len(delete_targets) < 1: - raise ValueError("you must supply at least one container id or name to delete") - force = getattr(self.args, "force") - for d in delete_targets: - con = self.client.containers.get(d) - con.remove(force) - write_out(con["id"]) |