masakariclient not supporting filter parameters for multiple times

Bug #1854903 reported by Shilpa Devharakar on 2019-12-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-masakariclient
Undecided
Shilpa Devharakar

Bug Description

Description
============
User can pass filter parameter (recovery_method|service_type) multiple times.
Expecting python client should send multiple input in form of list in request
to be further processed by masakari.

DB entries
==========
mysql> select * from failover_segments;
+---------------------+------------+------------+---------+----+--------------------------------------+-------------+--------------+-------------+-----------------+
| created_at | updated_at | deleted_at | deleted | id | uuid | name | service_type | description | recovery_method |
+---------------------+------------+------------+---------+----+--------------------------------------+-------------+--------------+-------------+-----------------+
| 2019-11-25 13:02:31 | NULL | NULL | 0 | 1 | b80223bc-dda0-404a-9960-cfb67ebacf3e | new_segment | COMPUTE | NULL | auto |
| 2019-11-25 13:02:37 | NULL | NULL | 0 | 2 | 3e0998ea-7690-4e36-831f-7d6be59fd39f | new_segmen2 | COMPUTE | NULL | rh_priority |
+---------------------+------------+------------+---------+----+--------------------------------------+-------------+--------------+-------------+-----------------+
2 rows in set (0.00 sec)

Actual result
==============
$ openstack segment list --filter recovery_method=auto --filter recovery_method=rh_priority
+--------------------------------------+-------------+-------------+--------------+-----------------+
| uuid | name | description | service_type | recovery_method |
+--------------------------------------+-------------+-------------+--------------+-----------------+
| 3e0998ea-7690-4e36-831f-7d6be59fd39f | new_segmen2 | None | COMPUTE | rh_priority |
+--------------------------------------+-------------+-------------+--------------+-----------------+

Expected result
==============
$ openstack segment list --filter recovery_method=auto --filter recovery_method=rh_priority
+--------------------------------------+-------------+-------------+--------------+-----------------+
| uuid | name | description | service_type | recovery_method |
+--------------------------------------+-------------+-------------+--------------+-----------------+
| 3e0998ea-7690-4e36-831f-7d6be59fd39f | new_segmen2 | None | COMPUTE | rh_priority |
| b80223bc-dda0-404a-9960-cfb67ebacf3e | new_segment | None | COMPUTE | auto |
+--------------------------------------+-------------+-------------+--------------+-----------------+

Changed in python-masakariclient:
assignee: nobody → Shilpa Devharakar (shilpasd)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers