Openstack image show should display size in human friendly format

Bug #1640086 reported by Badhmapriya Boopalan on 2016-11-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Low
Badhmapriya Boopalan

Bug Description

Issue : Currently, there is no option to display the image size in a human readable format(such as kb, MB, GB, TB,..)

Scenario : View image details in openstack
stack@openstack-devstack:/home$ openstack image show 4de4936a-b017-4448-b940-90ece734af9e
+------------------+------------------------------------------------------+
| Field | Value |
+------------------+------------------------------------------------------+
| checksum | eb9139e4942121f22bbc2afc0400b2a4 |
| container_format | ami |
| created_at | 2016-11-03T10:15:49Z |
| disk_format | ami |
| file | /v2/images/4de4936a-b017-4448-b940-90ece734af9e/file |
| id | 4de4936a-b017-4448-b940-90ece734af9e |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-0.3.4-x86_64-uec |
| owner | 61448364d58f4f69aadac60850f04004 |
| properties | kernel_id='c81806b8-6791-424e-bc2d-a3bfed0abf96',
| ramdisk_id='e1a3062a-ed68-4814-9cf9-96bd0cf00c67' |
| protected | False |
| schema | /v2/schemas/image |
| size | 25165824 |
| status | active |
| tags | |
| updated_at | 2016-11-03T10:15:49Z |
| virtual_size | None |
| visibility | public |
+------------------+------------------------------------------------------+
Note : size = 25165824

However, in glance client, there is an option to view image details in human-readable format, as illustrated below.
stack@openstack-devstack:/home/badhmapriya_boopalan/devstack$ glance image-show --human-readable 4de4936a-b017-4448-b940-90ece734af9e
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | eb9139e4942121f22bbc2afc0400b2a4 |
| container_format | ami |
| created_at | 2016-11-03T10:15:49Z |
| disk_format | ami |
| id | 4de4936a-b017-4448-b940-90ece734af9e |
| kernel_id | c81806b8-6791-424e-bc2d-a3bfed0abf96 |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-0.3.4-x86_64-uec |
| owner | 61448364d58f4f69aadac60850f04004 |
| protected | False |
| ramdisk_id | e1a3062a-ed68-4814-9cf9-96bd0cf00c67 |
| size | 24MB |
| status | active |
| tags | [] |
| updated_at | 2016-11-03T10:15:49Z |
| virtual_size | None |
| visibility | public |
+------------------+--------------------------------------+
Note : size = 24MB

There is should be an option in openstack, to view size in more human friendly format

Changed in python-openstackclient:
assignee: nobody → Badhmapriya Boopalan (priyaboopalan)
Steve Martinelli (stevemar) wrote :

Sounds reasonable

Changed in python-openstackclient:
status: New → Confirmed
importance: Undecided → Low
Changed in python-openstackclient:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/418553
Committed: https://git.openstack.org/cgit/openstack/osc-lib/commit/?id=54e147cf3efe50a77bdd8f0b3c2887e2ba5f38f8
Submitter: Jenkins
Branch: master

commit 54e147cf3efe50a77bdd8f0b3c2887e2ba5f38f8
Author: OpenStack Proposal Bot <email address hidden>
Date: Wed Nov 16 22:15:02 2016 +0000

    To display image size in human friendly format

    Include option '--human-readable' to 'image show' command.
    This option displays image size in human readable format
    (such as K, M, G, T,..)

    (Re-submitted as the original https://review.openstack.org/#/c/399982/ had
    a parent commit not present in Gerrit, was proposed by "OpenStack
    Proposal Bot")

    Change-Id: I0ef74c2ec978483fe49156c88acf5c369a8fa5c2
    Closes-Bug: #1640086
    Co-Authored-By: Badhmapriya Boopalan <email address hidden>

Changed in python-openstackclient:
status: In Progress → Fix Released

Change abandoned by Steve Martinelli (<email address hidden>) on branch: master
Review: https://review.openstack.org/399982
Reason: abandon in favor of https://review.openstack.org/#/c/418553/

This issue was fixed in the openstack/osc-lib 1.3.0 release.

Rui Chen (kiwik-chenrui) wrote :

Add the OSC side patch:

    https://review.openstack.org/#/c/398126/

Reviewed: https://review.openstack.org/398126
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=6962cc963e6e17e709524ecf6a395e2d0c8b8370
Submitter: Jenkins
Branch: master

commit 6962cc963e6e17e709524ecf6a395e2d0c8b8370
Author: Badhmapriya Boopalan <email address hidden>
Date: Tue Nov 15 19:55:46 2016 +0000

    To display image size in human friendly format

    Include option '--human-readable' to 'image show' command.
    This option displays image size in human readable format
    (such as K, M, G, T,..)

    Related Commit: I0ef74c2ec978483fe49156c88acf5c369a8fa5c2
    Closes-Bug: #1640086
    Change-Id: I28cd5702925d51303d0607ed8dccf12c56434682

This issue was fixed in the openstack/python-openstackclient 3.12.0 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers