summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Chapman <woppin@gmail.com>2021-05-05 16:54:18 +1000
committerDr. Jens Harbott <harbott@osism.tech>2021-11-13 16:12:04 +0100
commit7b27055826fbc168ceeeb7a7a5e6cf65c2156ef4 (patch)
treef60be602e019ef482f8af516b399e83ed49943dd
parentd7cd95847a04a74ccce58bd7fd52fde5ecd52c21 (diff)
downloaddesignate-7b27055826fbc168ceeeb7a7a5e6cf65c2156ef4.tar.gz
Support filtering on zone import/export list
List operations should add the task_type criterion to the user provided criterion. Added for stable/wallaby: Use the wallaby variant of the neutron-tempest-plugin-designate-scenario job since master has introduced new features in neutron. Change-Id: I983d930f975c109cce24a9587bba6db563b3f19f Closes-Bug: 1926058 (cherry picked from commit fb9f0b33d338037365f5c9dae20f4f795b119d13)
-rw-r--r--.zuul.yaml2
-rw-r--r--designate/central/service.py20
2 files changed, 15 insertions, 7 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index 4a005fef..ff185250 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -151,7 +151,7 @@
- release-notes-jobs-python3
check:
jobs:
- - neutron-tempest-plugin-designate-scenario
+ - neutron-tempest-plugin-designate-scenario-wallaby
gate:
queue: designate
experimental:
diff --git a/designate/central/service.py b/designate/central/service.py
index d86a9959..ca851fd7 100644
--- a/designate/central/service.py
+++ b/designate/central/service.py
@@ -2817,9 +2817,13 @@ class Service(service.RPCService):
target = {'tenant_id': context.project_id}
policy.check('find_zone_imports', context, target)
- criterion = {
- 'task_type': 'IMPORT'
- }
+ if not criterion:
+ criterion = {
+ 'task_type': 'IMPORT'
+ }
+ else:
+ criterion['task_type'] = 'IMPORT'
+
return self.storage.find_zone_imports(context, criterion, marker,
limit, sort_key, sort_dir)
@@ -2886,9 +2890,13 @@ class Service(service.RPCService):
target = {'tenant_id': context.project_id}
policy.check('find_zone_exports', context, target)
- criterion = {
- 'task_type': 'EXPORT'
- }
+ if not criterion:
+ criterion = {
+ 'task_type': 'EXPORT'
+ }
+ else:
+ criterion['task_type'] = 'EXPORT'
+
return self.storage.find_zone_exports(context, criterion, marker,
limit, sort_key, sort_dir)