Should check for empty string as key when setting key-value pair in property
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance Client |
Invalid
|
Wishlist
|
Unassigned |
Bug Description
root@controller
+------
| Property | Value |
+------
| Property '' | None |
| Property 'vmware_
| Property 'vmware_disktype' | streamOptimized |
| checksum | 7b26c526f6f7c8a
| container_format | bare |
| created_at | 2016-07-
| deleted | False |
| deleted_at | None |
| disk_format | vmdk |
| id | 2fb0b8a1-
| is_public | True |
| min_disk | 5 |
| min_ram | 512 |
| name | ubuntu-
| owner | 5b53ee384ebc421
| protected | False |
| size | 971606528 |
| status | active |
| updated_at | 2016-07-
| virtual_size | None |
+------
The null key set success as the result.
But null key is meaningless to the user which also belong to the invalid input in other components, like cinder and nova flavor as below:
root@controller
ERROR (CommandError): Invalid key: "". Keys may only contain letters, numbers, spaces, underscores, periods, colons and hyphens.
So for the consistent openstack UE and error handling, glance cli site better to add the null key check.
Changed in glance: | |
assignee: | nobody → QiangTang (qtang) |
Changed in python-glanceclient: | |
assignee: | nobody → QiangTang (qtang) |
Changed in glance: | |
status: | New → Invalid |
no longer affects: | glance |
Changed in python-glanceclient: | |
assignee: | QiangTang (qtang) → Jaspreet Singh Rawel (jaspreetsinghrawel) |
Changed in python-glanceclient: | |
status: | Invalid → In Progress |
summary: |
- Should check null key when set key-value pair in property + Should check for empty string as key when setting key-value pair in + property |
Changed in python-glanceclient: | |
assignee: | Jaspreet Singh Rawel (jaspreetsinghrawel) → nobody |
root@controller :/home/ ubuntu# glance image-show a3b9e5d2- f747-4432- 9155-241662d676 6a ------- -----+- ------- ------- ------- ------- ------- --+ ------- -----+- ------- ------- ------- ------- ------- --+ 79d8a229cc70a07 c6 | 09T17:58: 03Z | f747-4432- 9155-241662d676 6a | 9917bcee3d80a2f c7 | 09T17:58: 03Z | ------- -----+- ------- ------- ------- ------- ------- --+ :/home/ ubuntu# :/home/ ubuntu# :/home/ ubuntu# glance image-update a3b9e5d2- f747-4432- 9155-241662d676 6a --property = ------- -----+- ------- ------- ------- ------- ------- --+ ------- -----+- ------- ------- ------- ------- ------- --+ 79d8a229cc70a07 c6 | 09T17:58: 03Z | f747-4432- 9155-241662d676 6a | 9917bcee3d80a2f c7 | 09T19:03: 41Z | ------- -----+- ------- ------- ------- ------- ------- --+ :/home/ ubuntu# :/home/ ubuntu# glance --version :/home/ ubuntu#
+------
| Property | Value |
+------
| checksum | ee1eca47dc88f48
| container_format | bare |
| created_at | 2016-11-
| disk_format | qcow2 |
| id | a3b9e5d2-
| min_disk | 0 |
| min_ram | 0 |
| name | cirros\xb2 |
| owner | abe83ae828434fa
| protected | False |
| size | 13287936 |
| status | active |
| tags | [] |
| updated_at | 2016-11-
| virtual_size | None |
| visibility | public |
+------
root@controller
root@controller
root@controller
+------
| Property | Value |
+------
| | |
| checksum | ee1eca47dc88f48
| container_format | bare |
| created_at | 2016-11-
| disk_format | qcow2 |
| id | a3b9e5d2-
| min_disk | 0 |
| min_ram | 0 |
| name | cirros\xb2 |
| owner | abe83ae828434fa
| protected | False |
| size | 13287936 |
| status | active |
| tags | [] |
| updated_at | 2016-11-
| virtual_size | None |
| visibility | public |
+------
root@controller
root@controller
2.0.0
root@controller