Glance image-show <snapshotID> image fields followed by properies

Bug #1321715 reported by Tzach Shefi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
In Progress
Wishlist
Unassigned

Bug Description

Description of problem: When using glance image-show <snapshotID> output should be reorganized image fields should show before before priorities.

[root@puma31 ~(keystone_admin)]# glance image-show 0c037955-2979-4242-91ac-9349c19aa997
+---------------------------------------+--------------------------------------+
| Property | Value |
+---------------------------------------+--------------------------------------+
| Property 'base_image_ref' | df99e198-3f0c-4979-a288-f8d4395d3284 |
| Property 'image_location' | snapshot |
| Property 'image_state' | available |
| Property 'image_type' | snapshot |
| Property 'instance_type_ephemeral_gb' | 0 |
| Property 'instance_type_flavorid' | 1 |
| Property 'instance_type_id' | 2 |
| Property 'instance_type_memory_mb' | 512 |
| Property 'instance_type_name' | m1.tiny |
| Property 'instance_type_root_gb' | 1 |
| Property 'instance_type_rxtx_factor' | 1.0 |
| Property 'instance_type_swap' | 0 |
| Property 'instance_type_vcpus' | 1 |
| Property 'instance_uuid' | 9b255b99-0789-432f-8a0b-5a2cf955b813 |
| Property 'network_allocated' | True |
| Property 'owner_id' | f9ccbcb872c443468a119baa640d6632 |
| Property 'user_id' | 4453c720544f433eae6557e443895967 |
| checksum | 7f9c72e497b879713360d3d199d4303f |
| container_format | bare |
| created_at | 2014-05-21T10:29:13 |
| deleted | False |
| disk_format | qcow2 |
| id | 0c037955-2979-4242-91ac-9349c19aa997 |
| is_public | False |
| min_disk | 1 |
| min_ram | 0 |
| name | snap1 |

For example show-info <imageID>

[root@puma31 ~(keystone_admin)]# glance image-show a452f08e-23b7-45e3-aff1-9161f863a29a
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | d972013792949d0d3ba628fbe8685bce |
| container_format | bare |
| created_at | 2014-05-14T09:02:41 |
| deleted | False |
| disk_format | qcow2 |
| id | a452f08e-23b7-45e3-aff1-9161f863a29a |
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros |
| owner | 1b2b581e12b846d89b36f69a7e2d9417 |
| protected | False |
| size | 13147648 |

Version-Release number of selected component (if applicable):
RHEL7
python-glance-2014.1-2.el7ost.noarch
python-glanceclient-0.12.0-1.el7ost.noarch
openstack-glance-2014.1-2.el7ost.noarch

How reproducible:
every time

Steps to Reproduce:
1. upload image
2. boot isnatnce
3. take snapshot
4. show-info <snapshotid>

Revision history for this message
Erno Kuvaja (jokke) wrote :

Is there a reason why you think this is a bug? Looking at the documentation (http://docs.openstack.org/user-guide/content/glance-image-list.html) this seems to behave as intended. See point 2.

Changed in glance:
status: New → Incomplete
Revision history for this message
Tzach Shefi (tshefi) wrote :

Sure my reason for this bug is logic, a snapshot is basically treated as an image right.
Than why is image-show output of these two (image and snapshot) not organized the same way?
show-image<snapshotID> image fields should be shown before properties, this is what I opened this bug for.

Who said documentation is correct, maybe it too should be updated?

Revision history for this message
Dafna Ron (dron-3) wrote :

I don't think this should be a problem or a complicated thing to do.
I think we should have consistency in presenting the same fields the same way and when adding additional ones for a snapshot type image we should add them below the current ones and not above them (it just looks off and image information is more needed so it would be nice for the user).
I also looked at the documentation and point two has nothing to do with the order of the fields or this bug, it simply shows an out put of a current show command and the image used was a snapshot type image.

Changed in glance:
importance: Undecided → Low
importance: Low → Wishlist
status: Incomplete → New
Sayaji Patil (sayaji15)
Changed in glance:
assignee: nobody → Sayaji Patil (sayaji15)
Sayaji Patil (sayaji15)
Changed in glance:
status: New → In Progress
Sayaji Patil (sayaji15)
summary: - Glance image-show <snapshotID> image feilds followed by properies
+ Glance image-show <snapshotID> image fields followed by properies
Revision history for this message
Sayaji Patil (sayaji15) wrote :

The image info is passed as a dictionary to the print func(), which then sorts the keys and prints
the key-values in a table format. In this case the key for image properties(Property) starts with upper case 'P'.
So after sorting the key "Property" is printed before other keys like "checksum", "container_format" etc.
Possible solution is to change the key name from "Property" to "property", so it will be listed along with other
properties starting with "p" like "protected".

Is this an acceptable solution ?

Revision history for this message
Sayaji Patil (sayaji15) wrote :

Table will look something like this

+---------------------------------------+--------------------------------------+
| Property | Value |
+---------------------------------------+--------------------------------------+
| checksum | 7f9c72e497b879713360d3d199d4303f |
| container_format | bare |
| created_at | 2014-05-21T10:29:13 |
| deleted | False |
| disk_format | qcow2 |
| id | 0c037955-2979-4242-91ac-9349c19aa997 |
| is_public | False |
| min_disk | 1 |
| min_ram | 0 |
| name | snap1 |
| property 'base_image_ref' | df99e198-3f0c-4979-a288-f8d4395d3284 |
| property 'image_location' | snapshot |
| property 'image_state' | available |

Sayaji Patil (sayaji15)
Changed in glance:
assignee: Sayaji Patil (sayaji15) → nobody
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.