← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1551225] [NEW] 'image-show' does not show attributes whose value is 'None'

 

You have been subscribed to a public bug:

When I used cmd "glance image-show <image-uuid>",I can not get attributes whose value is 'None',
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | 6bbe6376930f06d69f40d74e2d081ed6     |
| container_format | bare                                 |
| created_at       | 2016-01-21T07:41:47.000000           |
| deleted          | False                                |
| disk_format      | iso                                  |
| id               | 1c0c80eb-15a2-4104-a5d4-c30a866fc7c9 |
| is_public        | True                                 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | win2007_iso                          |
| owner            | 32bfe3124bb2478aad3e6aa1cee09f14     |
| protected        | False                                |
| size             | 4489216000                           |
| status           | active                               |
| updated_at       | 2016-01-21T07:43:47.000000           |
+------------------+--------------------------------------+
The attribute will be removed whose value is 'None' in function meta of class ImageSerializer,

https://github.com/openstack/glance/blob/master/glance/common/utils.py#L257

user will not know these attributes in this case.

So I suggest to remove the filter for value with 'None'.

I want to get the return values like this:

+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | 6bbe6376930f06d69f40d74e2d081ed6     |
| container_format | bare                                 |
| created_at       | 2016-01-21T07:41:47.000000           |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | iso                                  |
| id               | 1c0c80eb-15a2-4104-a5d4-c30a866fc7c9 |
| is_public        | True                                 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | win2007_iso                          |
| owner            | 32bfe3124bb2478aad3e6aa1cee09f14     |
| protected        | False                                |
| size             | 4489216000                           |
| status           | active                               |
| updated_at       | 2016-01-21T07:43:47.000000           |
| virtual_size     | None                                 |
+------------------+--------------------------------------+

** Affects: glance
     Importance: Undecided
     Assignee: Wenjun Wang (wangwenjun)
         Status: New

-- 
'image-show' does not show attributes whose value is 'None'
https://bugs.launchpad.net/bugs/1551225
You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to Glance.