diff --git a/neutron/services/auto_allocate/db.py b/neutron/services/auto_allocate/db.py index c51777f1473..1d6d77519e8 100644 --- a/neutron/services/auto_allocate/db.py +++ b/neutron/services/auto_allocate/db.py @@ -194,7 +194,9 @@ class AutoAllocatedTopologyMixin(object): except n_exc.NotFound: raise exceptions.AutoAllocationFailure( reason=_("No default subnetpools defined")) - return {'id': 'dry-run=pass', 'tenant_id': tenant_id} + return {'id': 'dry-run=pass', + 'tenant_id': tenant_id, + 'project_id': tenant_id} def _validate(self, context, tenant_id): """Validate and return the tenant to be associated to the topology.""" diff --git a/neutron/tests/unit/services/auto_allocate/test_db.py b/neutron/tests/unit/services/auto_allocate/test_db.py index 83167d7ee62..2ff3cf7955a 100644 --- a/neutron/tests/unit/services/auto_allocate/test_db.py +++ b/neutron/tests/unit/services/auto_allocate/test_db.py @@ -351,7 +351,10 @@ class AutoAllocateTestCase(testlib_api.SqlTestCase): mock.patch.object( self.mixin, '_get_supported_subnetpools'): result = self.mixin._check_requirements(self.ctx, 'foo_tenant') - expected = {'id': 'dry-run=pass', 'tenant_id': 'foo_tenant'} + expected = { + 'id': 'dry-run=pass', + 'tenant_id': 'foo_tenant', + 'project_id': 'foo_tenant'} self.assertEqual(expected, result) def test__cleanup_handles_failures(self):