masakariclient not supporting filter parameters for multiple times

Bug #1854903 reported by Shilpa Devharakar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
masakari
In Progress
Undecided
Shilpa Devharakar
python-masakariclient
In Progress
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)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-masakariclient (master)

Fix proposed to branch: master
Review: https://review.opendev.org/707417

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.