Skip to content
This repository has been archived by the owner on Oct 10, 2020. It is now read-only.

atomic: add missing bytes unit #105

Merged
merged 1 commit into from Jul 30, 2015

Conversation

chuanchang
Copy link

The size_name tuple missed "B" bytes unit option in convert_size(),
and the output of images are not good if the REPOSITORY name is
a little long such as registry.access.redhat.com/rhel7, it looks
like this:

 REPOSITORY                TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
 docker-dev                master              bffd816efbfe        2015-06-09 18:15    1.58 TB
*<none>                    <none>              3439600f6aa8        2015-06-09 17:39    188.31 GB
*<none>                    <none>              8df315cf193a        2015-06-09 17:24    188.31 GB
 docker.io/ubuntu          14.04               fa81ed084842        2015-06-01 08:00    188.28 GB
 docker.io/busybox         latest              8c2e06607696        2015-04-18 06:01    2.43 GB
 registry.access.redhat.com/rhel7 latest              10acc31def5d        2015-02-05 23:04    154.11 GB

With the patch, the output of atomic images looks like this:

 REPOSITORY                          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
 docker-dev                          master              bffd816efbfe        2015-06-09 18:15    1.58 GB
*<none>                              <none>              3439600f6aa8        2015-06-09 17:39    188.31 MB
*<none>                              <none>              8df315cf193a        2015-06-09 17:24    188.31 MB
 docker.io/ubuntu                    latest              fa81ed084842        2015-06-01 08:00    188.28 MB
 docker.io/busybox                   latest              8c2e06607696        2015-04-18 06:01    2.43 MB
 registry.access.redhat.com/rhel7    latest              10acc31def5d        2015-02-05 23:04    154.11 MB

Signed-off-by: Alex Jia ajia@redhat.com

The size_name tuple missed "B" bytes unit option in convert_size(),
and the output of images are not good if the REPOSITORY name is
a little long such as registry.access.redhat.com/rhel7, it looks
like this:

 REPOSITORY                TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
 docker-dev                master              bffd816efbfe        2015-06-09 18:15    1.58 TB
*<none>                    <none>              3439600f6aa8        2015-06-09 17:39    188.31 GB
*<none>                    <none>              8df315cf193a        2015-06-09 17:24    188.31 GB
 docker.io/ubuntu          14.04               fa81ed084842        2015-06-01 08:00    188.28 GB
 docker.io/busybox         latest              8c2e06607696        2015-04-18 06:01    2.43 GB
 registry.access.redhat.com/rhel7 latest              10acc31def5d        2015-02-05 23:04    154.11 GB

With the patch, the output of atomic images looks like this:

 REPOSITORY                          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
 docker-dev                          master              bffd816efbfe        2015-06-09 18:15    1.58 GB
*<none>                              <none>              3439600f6aa8        2015-06-09 17:39    188.31 MB
*<none>                              <none>              8df315cf193a        2015-06-09 17:24    188.31 MB
 docker.io/ubuntu                    latest              fa81ed084842        2015-06-01 08:00    188.28 MB
 docker.io/busybox                   latest              8c2e06607696        2015-04-18 06:01    2.43 MB
 registry.access.redhat.com/rhel7    latest              10acc31def5d        2015-02-05 23:04    154.11 MB

Signed-off-by: Alex Jia <ajia@redhat.com>
@rhatdan
Copy link
Member

rhatdan commented Jul 30, 2015

LGTM

rhatdan added a commit that referenced this pull request Jul 30, 2015
@rhatdan rhatdan merged commit 9186097 into projectatomic:master Jul 30, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants