Merge "Return both project_id when validating auto allocate network"
This commit is contained in:
commit
06c1972a48
@ -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."""
|
||||
|
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user