Merge "Incoming tenant id when creating a subnet on create network form"
This commit is contained in:
commit
c99cabf19f
@ -588,7 +588,8 @@ class NetworkTests(test.BaseAdminViewTests):
|
||||
'provider:network_type': 'local'}
|
||||
self.mock_network_create.assert_called_once_with(test.IsHttpRequest(),
|
||||
**params)
|
||||
subnet_params = {'name': subnet.name,
|
||||
subnet_params = {'tenant_id': tenant_id,
|
||||
'name': subnet.name,
|
||||
'network_id': subnet.network_id,
|
||||
'cidr': subnet.cidr,
|
||||
'enable_dhcp': subnet.enable_dhcp,
|
||||
|
@ -493,6 +493,7 @@ class NetworkTests(test.TestCase, NetworkStubMixin):
|
||||
'admin_state_up': network.admin_state_up,
|
||||
'shared': False}
|
||||
subnet_params = {'network_id': network.id,
|
||||
'tenant_id': network.tenant_id,
|
||||
'name': subnet.name,
|
||||
'cidr': subnet.cidr,
|
||||
'ip_version': subnet.ip_version,
|
||||
@ -629,6 +630,7 @@ class NetworkTests(test.TestCase, NetworkStubMixin):
|
||||
self.mock_subnet_create.assert_called_once_with(
|
||||
test.IsHttpRequest(),
|
||||
network_id=network.id,
|
||||
tenant_id=network.tenant_id,
|
||||
name=subnet.name,
|
||||
cidr=subnet.cidr,
|
||||
ip_version=subnet.ip_version,
|
||||
@ -801,6 +803,7 @@ class NetworkTests(test.TestCase, NetworkStubMixin):
|
||||
'admin_state_up': network.admin_state_up,
|
||||
'shared': False}
|
||||
subnet_params = {'network_id': network.id,
|
||||
'tenant_id': network.tenant_id,
|
||||
'name': subnet.name,
|
||||
'cidr': cidr,
|
||||
'ip_version': subnet.ip_version,
|
||||
@ -930,6 +933,7 @@ class NetworkTests(test.TestCase, NetworkStubMixin):
|
||||
'shared': False,
|
||||
'with_subnet': True}
|
||||
subnet_params = {'network_id': network.id,
|
||||
'tenant_id': network.tenant_id,
|
||||
'name': subnet.name,
|
||||
'cidr': subnet.cidr,
|
||||
'ip_version': subnet.ip_version,
|
||||
|
@ -600,7 +600,8 @@ class CreateNetwork(workflows.Workflow):
|
||||
# If we do not need to create a subnet, return here.
|
||||
if not data['with_subnet']:
|
||||
return True
|
||||
subnet = self._create_subnet(request, data, network, no_redirect=True)
|
||||
subnet = self._create_subnet(request, data, network, no_redirect=True,
|
||||
tenant_id=network.tenant_id)
|
||||
if subnet:
|
||||
return True
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user