fixe filter name error

Bug #1704971 reported by zhongjun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Undecided
zhongjun

Bug Description

For example if I make two shares named 'Test100' and 'Test200', then 'manila list --name Test' should not list anything but it is listing both, as if I had typed 'manila list --name~ Test':
[centos@centos0 python-manilaclient]$ manila create nfs 1 --name Test100 --description 'Description 100'
+---------------------------------------+--------------------------------------+
| Property | Value |
+---------------------------------------+--------------------------------------+
| status | creating |
| share_type_name | default |
| description | Description 100 |
| availability_zone | None |
| share_network_id | None |
| share_server_id | None |
| share_group_id | None |
| host | |
| revert_to_snapshot_support | True |
| access_rules_status | active |
| snapshot_id | None |
| create_share_from_snapshot_support | True |
| is_public | False |
| task_state | None |
| snapshot_support | True |
| id | 31394d82-6e09-4ead-852d-02430cbdeb2d |
| size | 1 |
| source_share_group_snapshot_member_id | None |
| user_id | 49439aab8eb24029b2235211a1680c47 |
| name | Test100 |
| share_type | 22d0307b-da41-4dc7-ae6a-f4d558768411 |
| has_replicas | False |
| replication_type | None |
| created_at | 2017-07-17T13:47:29.000000 |
| share_proto | NFS |
| mount_snapshot_support | True |
| project_id | 8c58e9a049a4410a9cfc0ccd85295e47 |
| metadata | {} |
+---------------------------------------+--------------------------------------+
[centos@centos0 python-manilaclient]$ manila create nfs 1 --name Test200 --description 'Description 200'
+---------------------------------------+--------------------------------------+
| Property | Value |
+---------------------------------------+--------------------------------------+
| status | creating |
| share_type_name | default |
| description | Description 200 |
| availability_zone | None |
| share_network_id | None |
| share_server_id | None |
| share_group_id | None |
| host | |
| revert_to_snapshot_support | True |
| access_rules_status | active |
| snapshot_id | None |
| create_share_from_snapshot_support | True |
| is_public | False |
| task_state | None |
| snapshot_support | True |
| id | 313c0b9b-d676-48cd-8e53-64d3a5c51f6c |
| size | 1 |
| source_share_group_snapshot_member_id | None |
| user_id | 49439aab8eb24029b2235211a1680c47 |
| name | Test200 |
| share_type | 22d0307b-da41-4dc7-ae6a-f4d558768411 |
| has_replicas | False |
| replication_type | None |
| created_at | 2017-07-17T13:47:38.000000 |
| share_proto | NFS |
| mount_snapshot_support | True |
| project_id | 8c58e9a049a4410a9cfc0ccd85295e47 |
| metadata | {} |
+---------------------------------------+--------------------------------------+
[centos@centos0 python-manilaclient]$ manila list
+--------------------------------------+---------+------+-------------+-----------+-----------+-----------------+-------------------------------------------+-------------------+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
+--------------------------------------+---------+------+-------------+-----------+-----------+-----------------+-------------------------------------------+-------------------+
| 31394d82-6e09-4ead-852d-02430cbdeb2d | Test100 | 1 | NFS | available | False | default | centos0.example.local@lvm#lvm-single-pool | nova |
| 313c0b9b-d676-48cd-8e53-64d3a5c51f6c | Test200 | 1 | NFS | available | False | default | centos0.example.local@lvm#lvm-single-pool | nova |
+--------------------------------------+---------+------+-------------+-----------+-----------+-----------------+-------------------------------------------+-------------------+
[centos@centos0 python-manilaclient]$ manila list --name Test
+--------------------------------------+---------+------+-------------+-----------+-----------+-----------------+-------------------------------------------+-------------------+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
+--------------------------------------+---------+------+-------------+-----------+-----------+-----------------+-------------------------------------------+-------------------+
| 31394d82-6e09-4ead-852d-02430cbdeb2d | Test100 | 1 | NFS | available | False | default | centos0.example.local@lvm#lvm-single-pool | nova |
| 313c0b9b-d676-48cd-8e53-64d3a5c51f6c | Test200 | 1 | NFS | available | False | default | centos0.example.local@lvm#lvm-single-pool | nova |
+--------------------------------------+---------+------+-------------+-----------+-----------+-----------------+-------------------------------------------+-------------------+

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.openstack.org/484696

Changed in manila:
assignee: nobody → zhongjun (jun-zhongjun)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/484696
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=f906bcdd4eac47b1abeb9e6d9b23b6aeb03aef38
Submitter: Jenkins
Branch: master

commit f906bcdd4eac47b1abeb9e6d9b23b6aeb03aef38
Author: zhongjun <email address hidden>
Date: Tue Jul 18 17:36:14 2017 +0800

    Fix the exact filter can be filter by inexact value

    Fix the ``exact`` filters (name, description) in ``shares``,
    ``snapshots``, ``share-networks`` list can be filter by ``inexact``
    value.

    Change-Id: I51e6b754f37a09c09a60e9a7fb51d3c9721f2d1f
    Closes-bug: #1704971

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 5.0.0.0b3

This issue was fixed in the openstack/manila 5.0.0.0b3 development milestone.

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.