unnecessary name and description in the search_options list.

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

Bug Description

There are unnecessary name and description in the snapshots_search_options list and share_search_options list, this part of code can be improved.
let's use list snapshot for example, part of the code is as bellow:

if 'name' in search_opts:
    search_opts['display_name'] = search_opts.pop('name')
    if 'description' in search_opts:
       search_opts['display_description'] = search_opts.pop('description')

# like filter
for key, db_key in (('name~', 'display_name~'),
                    ('description~', 'display_description~')):
    if key in search_opts:
      search_opts[db_key] = search_opts.pop(key)
    common.remove_invalid_options(context, search_opts,
                                      self._get_snapshots_search_options())

search_opts has converted name to display_name and description to display_description, so the _get_snapshots_search_options should not contain the unnecessary name and description.

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

Reviewed: https://review.openstack.org/498419
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=4263bc20e2249af076cf34137b98fdfa6542b25e
Submitter: Zuul
Branch: master

commit 4263bc20e2249af076cf34137b98fdfa6542b25e
Author: junboli <email address hidden>
Date: Mon Aug 28 18:45:14 2017 +0800

    Remove name and description from the search_options list.

    Since the "name", "name~" and "description", "description~" are both
    converted to "display_name", "display_name~" and "display_description",
    "display_description~" beforehand,So I think there is no need to keep
    the param "name" and "description" in the share search option list and
    snapshot search option list.

    Change-Id: If4dc3c6b978193f2f4be68a46b9dbe4e2b79fa9a
    Closes-bug: #1715290

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

This issue was fixed in the openstack/manila 6.0.0.0b2 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.