From 44b523c946c88e540b50d7ba59f441b5f8e0bad0 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Wed, 27 Jun 2018 21:37:42 -0700 Subject: remote python client for podman * Use podman library for access * Verbose error checking * Planned windows and macosx ports Signed-off-by: Jhon Honce --- contrib/python/cmd/images.py | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 contrib/python/cmd/images.py (limited to 'contrib/python/cmd/images.py') diff --git a/contrib/python/cmd/images.py b/contrib/python/cmd/images.py deleted file mode 100644 index 3e0dff626..000000000 --- a/contrib/python/cmd/images.py +++ /dev/null @@ -1,21 +0,0 @@ -from pman import PodmanRemote -from utils import write_out, convert_size, stringTimeToHuman - -def cli(subparser): - imagesp = subparser.add_parser("images", - help=("list images")) - imagesp.add_argument("all", action="store_true", help="list all images") - imagesp.set_defaults(_class=Images, func='display_all_image_info') - - -class Images(PodmanRemote): - - def display_all_image_info(self): - col_fmt = "{0:40}{1:12}{2:14}{3:18}{4:14}" - write_out(col_fmt.format("REPOSITORY", "TAG", "IMAGE ID", "CREATED", "SIZE")) - for i in self.client.images.list(): - for r in i["repoTags"]: - rsplit = r.rindex(":") - name = r[0:rsplit-1] - tag = r[rsplit+1:] - write_out(col_fmt.format(name, tag, i["id"][:12], stringTimeToHuman(i["created"]), convert_size(i["size"]))) -- cgit v1.2.3-54-g00ecf