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/images.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/images.py')
-rw-r--r-- | contrib/python/cmd/images.py | 21 |
1 files changed, 0 insertions, 21 deletions
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"]))) |