Fix 'owned' flag when Glare is used
This patch adds 'owner' filter for Glare if 'owned' parameter is used for filtering artifacts. Change-Id: Id855904f15b7d90096cc1466332dc4f20d22891e Closes-bug: #1603505
This commit is contained in:
parent
9f8e6c3286
commit
bd4645d567
|
@ -237,7 +237,6 @@ class PackageManagerAdapter(object):
|
|||
@rewrap_http_exceptions
|
||||
def filter(self, **kwargs):
|
||||
kwargs.pop('catalog', None) # NOTE(ativelkov): Glare ignores 'catalog'
|
||||
kwargs.pop('owned', None) # NOTE(ativelkov): Glare ignores 'owned'
|
||||
include_disabled = kwargs.pop('include_disabled', False)
|
||||
order_by = kwargs.pop('order_by', None)
|
||||
search = kwargs.pop('search', None)
|
||||
|
@ -256,6 +255,9 @@ class PackageManagerAdapter(object):
|
|||
kwargs['name'] = fqn
|
||||
if class_name:
|
||||
kwargs['class_definitions'] = class_name
|
||||
# if 'owned' is used there should be a filter with 'owner' parameter
|
||||
if kwargs.pop('owned', None):
|
||||
kwargs['owner'] = self.glare.tenant
|
||||
|
||||
for pkg in self.glare.list(**kwargs):
|
||||
yield PackageWrapper(pkg)
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
fixes:
|
||||
- It was impossible to use `--owned` flag when Glare was used
|
||||
to filter packages. This issue is fixed now.
|
Loading…
Reference in New Issue