Glare client now properly filters by class name

Adaptor class which wraps the legacy filtering requests into the
Glare-compatible ones has got a conversion for class_name ->
class_definitions attribute.
This fixes a bug when the engine could not properly fetch the package
by class name when deploying an app.

Change-Id: I98846bfad5fc03558dfc2e46fb4dcbfdb40489e8
Closes-bug: #1503224
This commit is contained in:
Alexander Tivelkov 2015-11-30 14:01:08 +03:00 committed by Kirill Zaitsev
parent 4b4d828be0
commit 4f2336fa38
1 changed files with 3 additions and 0 deletions

View File

@ -219,6 +219,7 @@ class PackageManagerAdapter(object):
search = kwargs.pop('search', None)
category = kwargs.pop('category', None)
fqn = kwargs.pop('fqn', None)
class_name = kwargs.pop('class_name', None)
if category:
kwargs['categories'] = category
if search:
@ -229,6 +230,8 @@ class PackageManagerAdapter(object):
kwargs['enabled'] = True
if fqn:
kwargs['name'] = fqn
if class_name:
kwargs['class_definitions'] = class_name
for pkg in self.glare.list(**kwargs):
yield PackageWrapper(pkg)