supplying multiple list --filters does not work correctly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-cinderclient |
New
|
Undecided
|
Rajat Dhasmana |
Bug Description
Specifying multiple "--filters" arguments for "cinder list" does not produce the expected results. I would expect this to apply all filters with an AND. It seems that some filters are just ignored.
$ cinder list
+------
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+------
| 105f960b-
| 8747b5d5-
| 8fa11f2b-
| bb809d11-
| ea6d46cb-
+------
$ cinder list --filters name=test2
+------
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+------
| 8747b5d5-
| ea6d46cb-
+------
- This looks right
$ cinder list --filters name=test2 --filters name=test1
+------
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+------
| bb809d11-
+------
- This does not look right because name=test2 is ignored.
$ cinder list --filters size=2 --filters name=test1
+------
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+------
| bb809d11-
+------
- This does not look right because size=2 is ignored.
$ cinder --debug list --filters size=2 --filters name=test1
<snip>
DEBUG:keystonea
+------
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+------
| bb809d11-
+------
- This shows that the size filter is not sent to the API.
Changed in python-cinderclient: | |
assignee: | nobody → TommyLike (hu-husheng) |
Changed in python-cinderclient: | |
assignee: | nobody → Rajat Dhasmana (whoami-rajat) |
Changed in python-cinderclient: | |
status: | In Progress → New |
$ cinder --debug list --filters size=2 name=test1
Will send the request w/ both filters specified, but the above versions should also work IMO. (Or give some kind of warning if they don't work.)