Can't filter/list resources that have no key=value metadata/extra-specs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Shared File Systems Service (Manila) |
Won't Fix
|
Wishlist
|
Unassigned | ||
python-manilaclient |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
This bug was created out of the review on https:/
Looks like there's no way to get access rules with no metadata by using the metadata filter like this:
$ manila --debug access-list test2 --metadata ''
Because this resolves to:
GET /v2/cadd7139bc3
The URL params for metadata decoded are: {'':None}
The problem exists with other commands as well:
$ manila list --metadata ''
GET /v2/cadd7139bc3
$ manila --debug type-list --extra-specs ''
GET /v2/cadd7139bc3
$ manila --debug list --extra-specs ''
GET /v2/cadd7139bc3
The correct URL encoding shouldn't be {"": None}, it should be {} or %7B%7D; but even with that the server seems to misbehave with any of these keys.
-------
For example, I had a few shares, one of them has metadata, rest don't:
$ manila list --column id,metadata
+------
| Id | Metadata |
+------
| 3c2ddf21-
| d89d27de-
| ee8a6aa7-
| ef3bca6d-
| f8075cf5-
+------
I wanted to retrieve only shares with no metadata
$ curl -i -X GET http://
HTTP/1.1 200 OK
Date: Fri, 20 Jul 2018 21:28:35 GMT
Server: Apache/2.4.18 (Ubuntu)
x-compute-
X-OpenStack-
Vary: X-OpenStack-
Content-Length: 1701
Connection: close
Content-Type: application/json
{"shares": [{"id": "3c2ddf21-
So the result wasn't filtered by "{}"
Changed in manila: | |
importance: | Undecided → Wishlist |
Changed in python-manilaclient: | |
importance: | Undecided → Wishlist |
tags: | added: low-hanging-fruit |
Changed in manila: | |
assignee: | nobody → Ashley Rodriguez (ashrodri) |
Changed in manila: | |
assignee: | Ashley Rodriguez (ashrodri) → nobody |
Changed in manila: | |
status: | Triaged → Won't Fix |
Goutham is this your defect are you currently working on this? is it a wishlist item?