Fixes filtering applications by name with glare.

This fix applies to Murano + Glare only.

The glare artifact_properties table does not contain a property
name 'name', but rather 'display_name'. Thus, filtering by 'name'
was not working. This change changes the kwargs filter dict to
use the key 'display_name' rather than 'name'.

Change-Id: I10d4d728fcd3e4bc0cc41cbddcad9ccd40b57f5e
Closes-Bug: #1653774
This commit is contained in:
Felipe Monteiro 2017-01-03 17:06:45 -05:00
parent 12c70b72d0
commit 85b3a042dd
1 changed files with 3 additions and 0 deletions

View File

@ -243,6 +243,7 @@ class PackageManagerAdapter(object):
category = kwargs.pop('category', None)
fqn = kwargs.pop('fqn', None)
class_name = kwargs.pop('class_name', None)
name = kwargs.pop('name', None)
if category:
kwargs['categories'] = category
if search:
@ -255,6 +256,8 @@ class PackageManagerAdapter(object):
kwargs['name'] = fqn
if class_name:
kwargs['class_definitions'] = class_name
if name:
kwargs['display_name'] = name
# if 'owned' is used there should be a filter with 'owner' parameter
if kwargs.pop('owned', None):
kwargs['owner'] = self.glare.tenant