metadata def namespace update CLI is not working as expected for parameter "protected"
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| Glance Client |
Fix Released
|
Wishlist
|
Unassigned | ||
Bug Description
In v2 glance metadata def namespace update API, it is observed that when we are updating protected parameter with different invalid values, it updates this parameter inappropriately.
Following CLI update output shows this behavior -
#######
stack@ubuntu-
+------
| Property | Value |
+------
| created_at | 2016-07-
| namespace | test-ns |
| owner | 93efcc2b00164c6
| protected | False |
| schema | /v2/schemas/
| updated_at | 2016-07-
| visibility | private |
+------
stack@ubuntu-
#######
stack@ubuntu-
+------
| Property | Value |
+------
| created_at | 2016-07-
| namespace | test-ns |
| owner | 93efcc2b00164c6
| protected | True |
| schema | /v2/schemas/
| updated_at | 2016-07-
| visibility | private |
+------
stack@ubuntu-
+------
| Property | Value |
+------
| created_at | 2016-07-
| namespace | test-ns |
| owner | 93efcc2b00164c6
| protected | True |
| schema | /v2/schemas/
| updated_at | 2016-07-
| visibility | private |
+------
stack@ubuntu-
+------
| Property | Value |
+------
| created_at | 2016-07-
| namespace | test-ns |
| owner | 93efcc2b00164c6
| protected | True |
| schema | /v2/schemas/
| updated_at | 2016-07-
| visibility | private |
+------
stack@ubuntu-
+------
| Property | Value |
+------
| created_at | 2016-07-
| namespace | test-ns |
| owner | 93efcc2b00164c6
| protected | False |
| schema | /v2/schemas/
| updated_at | 2016-07-
| visibility | private |
+------
stack@ubuntu-
+------
| Property | Value |
+------
| created_at | 2016-07-
| namespace | test-ns |
| owner | 93efcc2b00164c6
| protected | True |
| schema | /v2/schemas/
| updated_at | 2016-07-
| visibility | private |
+------
stack@ubuntu-
+------
| Property | Value |
+------
| created_at | 2016-07-
| namespace | test-ns |
| owner | 93efcc2b00164c6
| protected | False |
| schema | /v2/schemas/
| updated_at | 2016-07-
| visibility | private |
+------
stack@ubuntu-
stack@ubuntu-
+------
| Property | Value |
+------
| created_at | 2016-07-
| namespace | test-ns |
| owner | 93efcc2b00164c6
| protected | True |
| schema | /v2/schemas/
| updated_at | 2016-07-
| visibility | private |
+------
stack@ubuntu-
stack@ubuntu-
+------
| Property | Value |
+------
| created_at | 2016-07-
| namespace | test-ns |
| owner | 93efcc2b00164c6
| protected | False |
| schema | /v2/schemas/
| updated_at | 2016-07-
| visibility | private |
+------
stack@ubuntu-
+------
| Property | Value |
+------
| created_at | 2016-07-
| namespace | test-ns |
| owner | 93efcc2b00164c6
| protected | False |
| schema | /v2/schemas/
| updated_at | 2016-07-
| visibility | private |
+------
stack@ubuntu-
+------
| Property | Value |
+------
| created_at | 2016-07-
| namespace | test-ns |
| owner | 93efcc2b00164c6
| protected | True |
| schema | /v2/schemas/
| updated_at | 2016-07-
| visibility | private |
+------
stack@ubuntu-
+------
| Property | Value |
+------
| created_at | 2016-07-
| namespace | test-ns |
| owner | 93efcc2b00164c6
| protected | False |
| schema | /v2/schemas/
| updated_at | 2016-07-
| visibility | private |
+------
stack@ubuntu-
stack@ubuntu-
+------
| Property | Value |
+------
| created_at | 2016-07-
| namespace | test-ns |
| owner | 93efcc2b00164c6
| protected | True |
| schema | /v2/schemas/
| updated_at | 2016-07-
| visibility | private |
+------
stack@ubuntu-
+------
| Property | Value |
+------
| created_at | 2016-07-
| namespace | test-ns |
| owner | 93efcc2b00164c6
| protected | False |
| schema | /v2/schemas/
| updated_at | 2016-07-
| visibility | private |
+------
stack@ubuntu-
stack@ubuntu-
+------
| Property | Value |
+------
| created_at | 2016-07-
| namespace | test-ns |
| owner | 93efcc2b00164c6
| protected | True |
| schema | /v2/schemas/
| updated_at | 2016-07-
| visibility | private |
+------
stack@ubuntu-
+------
| Property | Value |
+------
| created_at | 2016-07-
| namespace | test-ns |
| owner | 93efcc2b00164c6
| protected | False |
| schema | /v2/schemas/
| updated_at | 2016-07-
| visibility | private |
+------
stack@ubuntu-
From above, we can see that for --protected in ["?". "#", "T", "F", "True_1", 0, 1, 11 etc..] namespace is updated inappropriately.
for example - if we put "?" --> it is changed to "False" (which was "True" before update )automatically without any error.
and many i
| Changed in python-glanceclient: | |
| status: | New → Triaged |
| importance: | Undecided → Wishlist |

not only this command but also others has this problem, you can take a try with "glance image-update --protectd".
The reason is that glance client analyze this kind of parameter to "False" when it's not boolean.