summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openstack_dashboard/dashboards/admin/networks/tests.py3
-rw-r--r--openstack_dashboard/dashboards/project/networks/tests.py4
-rw-r--r--openstack_dashboard/dashboards/project/networks/workflows.py3
3 files changed, 8 insertions, 2 deletions
diff --git a/openstack_dashboard/dashboards/admin/networks/tests.py b/openstack_dashboard/dashboards/admin/networks/tests.py
index 38b616a..f0223e9 100644
--- a/openstack_dashboard/dashboards/admin/networks/tests.py
+++ b/openstack_dashboard/dashboards/admin/networks/tests.py
@@ -588,7 +588,8 @@ class NetworkTests(test.BaseAdminViewTests):
588 'provider:network_type': 'local'} 588 'provider:network_type': 'local'}
589 self.mock_network_create.assert_called_once_with(test.IsHttpRequest(), 589 self.mock_network_create.assert_called_once_with(test.IsHttpRequest(),
590 **params) 590 **params)
591 subnet_params = {'name': subnet.name, 591 subnet_params = {'tenant_id': tenant_id,
592 'name': subnet.name,
592 'network_id': subnet.network_id, 593 'network_id': subnet.network_id,
593 'cidr': subnet.cidr, 594 'cidr': subnet.cidr,
594 'enable_dhcp': subnet.enable_dhcp, 595 'enable_dhcp': subnet.enable_dhcp,
diff --git a/openstack_dashboard/dashboards/project/networks/tests.py b/openstack_dashboard/dashboards/project/networks/tests.py
index afc878a..89b2347 100644
--- a/openstack_dashboard/dashboards/project/networks/tests.py
+++ b/openstack_dashboard/dashboards/project/networks/tests.py
@@ -493,6 +493,7 @@ class NetworkTests(test.TestCase, NetworkStubMixin):
493 'admin_state_up': network.admin_state_up, 493 'admin_state_up': network.admin_state_up,
494 'shared': False} 494 'shared': False}
495 subnet_params = {'network_id': network.id, 495 subnet_params = {'network_id': network.id,
496 'tenant_id': network.tenant_id,
496 'name': subnet.name, 497 'name': subnet.name,
497 'cidr': subnet.cidr, 498 'cidr': subnet.cidr,
498 'ip_version': subnet.ip_version, 499 'ip_version': subnet.ip_version,
@@ -629,6 +630,7 @@ class NetworkTests(test.TestCase, NetworkStubMixin):
629 self.mock_subnet_create.assert_called_once_with( 630 self.mock_subnet_create.assert_called_once_with(
630 test.IsHttpRequest(), 631 test.IsHttpRequest(),
631 network_id=network.id, 632 network_id=network.id,
633 tenant_id=network.tenant_id,
632 name=subnet.name, 634 name=subnet.name,
633 cidr=subnet.cidr, 635 cidr=subnet.cidr,
634 ip_version=subnet.ip_version, 636 ip_version=subnet.ip_version,
@@ -801,6 +803,7 @@ class NetworkTests(test.TestCase, NetworkStubMixin):
801 'admin_state_up': network.admin_state_up, 803 'admin_state_up': network.admin_state_up,
802 'shared': False} 804 'shared': False}
803 subnet_params = {'network_id': network.id, 805 subnet_params = {'network_id': network.id,
806 'tenant_id': network.tenant_id,
804 'name': subnet.name, 807 'name': subnet.name,
805 'cidr': cidr, 808 'cidr': cidr,
806 'ip_version': subnet.ip_version, 809 'ip_version': subnet.ip_version,
@@ -930,6 +933,7 @@ class NetworkTests(test.TestCase, NetworkStubMixin):
930 'shared': False, 933 'shared': False,
931 'with_subnet': True} 934 'with_subnet': True}
932 subnet_params = {'network_id': network.id, 935 subnet_params = {'network_id': network.id,
936 'tenant_id': network.tenant_id,
933 'name': subnet.name, 937 'name': subnet.name,
934 'cidr': subnet.cidr, 938 'cidr': subnet.cidr,
935 'ip_version': subnet.ip_version, 939 'ip_version': subnet.ip_version,
diff --git a/openstack_dashboard/dashboards/project/networks/workflows.py b/openstack_dashboard/dashboards/project/networks/workflows.py
index dcefe98..b04c623 100644
--- a/openstack_dashboard/dashboards/project/networks/workflows.py
+++ b/openstack_dashboard/dashboards/project/networks/workflows.py
@@ -600,7 +600,8 @@ class CreateNetwork(workflows.Workflow):
600 # If we do not need to create a subnet, return here. 600 # If we do not need to create a subnet, return here.
601 if not data['with_subnet']: 601 if not data['with_subnet']:
602 return True 602 return True
603 subnet = self._create_subnet(request, data, network, no_redirect=True) 603 subnet = self._create_subnet(request, data, network, no_redirect=True,
604 tenant_id=network.tenant_id)
604 if subnet: 605 if subnet:
605 return True 606 return True
606 else: 607 else: