glanceclient v2.shell for image-show doesn't have --human-readable option

Bug #1434381 reported by yatin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Wishlist
yatin

Bug Description

If user want to see the image-size in human readble format, he is not able to see because glance image-show --human-readable doesn't exist. It should be added.
Steps to reproduce:

For v1:-
[root@otcstack home(keystone_admin)]# glance image-list
+--------------------------------------+---------+-------------+------------------+----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+---------+-------------+------------------+----------+--------+
| cec43857-5989-429c-9bae-6afa54922936 | cirros | qcow2 | bare | 13200896 | active |
| 054f6329-3ec2-4572-a2e0-89b09009f4d9 | my_img2 | raw | bare | 13200896 | active |
+--------------------------------------+---------+-------------+------------------+----------+--------+
[root@otcstack home(keystone_admin)]# glance image-show cec43857-5989-429c-9bae-6afa54922936
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 133eae9fb1c98f45894a4e60d8736619 |
| container_format | bare |
| created_at | 2015-02-23T07:40:38 |
| deleted | False |
| disk_format | qcow2 |
| id | cec43857-5989-429c-9bae-6afa54922936 |
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros |
| owner | f3cd9e7987b141d0a1e6c958a2a9b361 |
| protected | False |
| size | 13200896 |
| status | active |
| updated_at | 2015-02-23T07:41:35 |
+------------------+--------------------------------------+
[root@otcstack home(keystone_admin)]# glance image-show cec43857-5989-429c-9bae-6afa54922936 --human-readable
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 133eae9fb1c98f45894a4e60d8736619 |
| container_format | bare |
| created_at | 2015-02-23T07:40:38 |
| deleted | False |
| disk_format | qcow2 |
| id | cec43857-5989-429c-9bae-6afa54922936 |
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros |
| owner | f3cd9e7987b141d0a1e6c958a2a9b361 |
| protected | False |
| size | 12.6MB |
| status | active |
| updated_at | 2015-02-23T07:41:35 |
+------------------+--------------------------------------+

For v2:
[root@otcstack home(keystone_admin)]# export OS_IMAGE_API_VERSION=2
[root@otcstack home(keystone_admin)]# glance image-show cec43857-5989-429c-9bae-6afa54922936 --human-readable
usage: glance [--version] [-d] [-v] [--get-schema] [--timeout TIMEOUT]
              [--no-ssl-compression] [-f] [--os-image-url OS_IMAGE_URL]
              [--os-image-api-version OS_IMAGE_API_VERSION]
              [--profile HMAC_KEY] [-k] [--os-cert OS_CERT]
              [--cert-file OS_CERT] [--os-key OS_KEY] [--key-file OS_KEY]
              [--os-cacert <ca-certificate-file>] [--ca-file OS_CACERT]
              [--os-username OS_USERNAME] [--os-user-id OS_USER_ID]
              [--os-user-domain-id OS_USER_DOMAIN_ID]
              [--os-user-domain-name OS_USER_DOMAIN_NAME]
              [--os-project-id OS_PROJECT_ID]
              [--os-project-name OS_PROJECT_NAME]
              [--os-project-domain-id OS_PROJECT_DOMAIN_ID]
              [--os-project-domain-name OS_PROJECT_DOMAIN_NAME]
              [--os-password OS_PASSWORD] [--os-tenant-id OS_TENANT_ID]
              [--os-tenant-name OS_TENANT_NAME] [--os-auth-url OS_AUTH_URL]
              [--os-region-name OS_REGION_NAME]
              [--os-auth-token OS_AUTH_TOKEN]
              [--os-service-type OS_SERVICE_TYPE]
              [--os-endpoint-type OS_ENDPOINT_TYPE]
              <subcommand> ...
glance: error: unrecognized arguments: --human-readable

The options should be added, it will be good for users.

yatin (yatinkarel)
Changed in python-glanceclient:
assignee: nobody → yatin (yatinkarel)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/166595

Changed in python-glanceclient:
status: New → In Progress
Louis Taylor (kragniz)
Changed in python-glanceclient:
importance: Undecided → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

Reviewed: https://review.openstack.org/166595
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=c149a94ee1c8c5a04b984063cadf1dbc934eeb8b
Submitter: Jenkins
Branch: master

commit c149a94ee1c8c5a04b984063cadf1dbc934eeb8b
Author: yatin karel <email address hidden>
Date: Sun Mar 22 16:52:34 2015 +0530

    glance image-show now have --human-readable option

    Added option '--human-readable' to image-show cli which allows users
    to display image size in human-readable format.

    Change-Id: Ic3452ce4560d3cf90fa7f59f98e5ff42e804f8c9
    Closes-Bug: #1434381

Changed in python-glanceclient:
status: In Progress → Fix Committed
Changed in python-glanceclient:
milestone: none → 1.0.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.