diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-09-06 10:05:44 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-09-06 10:05:44 +0000 |
commit | c11a4038d984b84a00e4d9030ec2c8b6e85a9aae (patch) | |
tree | 2b7ccae92ca59335a6b2de2e30068023a30c500f /neutron/pecan_wsgi | |
parent | f27782dd9b3cc9253db96ba176bdbbd497b59716 (diff) | |
parent | bf36f8c934b49310103a1b1831c9f7c8a0d14adf (diff) | |
download | neutron-c11a4038d984b84a00e4d9030ec2c8b6e85a9aae.tar.gz |
Merge "Pecan: set tenant_id field when project_id set"
Diffstat (limited to 'neutron/pecan_wsgi')
-rw-r--r-- | neutron/pecan_wsgi/controllers/utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/neutron/pecan_wsgi/controllers/utils.py b/neutron/pecan_wsgi/controllers/utils.py index 703a50f5d3..83dd9eaeab 100644 --- a/neutron/pecan_wsgi/controllers/utils.py +++ b/neutron/pecan_wsgi/controllers/utils.py @@ -140,6 +140,10 @@ class NeutronPecanController(object): self._mandatory_fields = set([field for (field, data) in self.resource_info.items() if data.get('required_by_policy')]) + if 'tenant_id' in self._mandatory_fields: + # ensure that project_id is queried in the database when + # tenant_id is required + self._mandatory_fields.add('project_id') else: self._mandatory_fields = set() self.allow_pagination = allow_pagination |