|
1 From d7b8c1eeb6c36800a891584ad948b4b5ab1f52bf Mon Sep 17 00:00:00 2001 |
|
2 From: armando-migliaccio <[email protected]> |
|
3 Date: Mon, 3 Jun 2013 13:57:44 -0700 |
|
4 Subject: [PATCH] Fix bug in port creation form |
|
5 |
|
6 'network_name' is not a recognized Quantum attribute, so passing it |
|
7 in the request to the Quantum Server causes an error. In the end this |
|
8 is not required because the network is identified by its id. So |
|
9 this patch removes it (as it's done in other cases as well). |
|
10 |
|
11 Fixes bug #1187129 |
|
12 |
|
13 Change-Id: Ie18c7bd504f8c241d002d6a050b8bcc59ed9fc03 |
|
14 |
|
15 Fixed in Havana 2013.2 |
|
16 --- |
|
17 .../dashboards/admin/networks/ports/forms.py | 1 + |
|
18 .../dashboards/admin/networks/tests.py | 2 -- |
|
19 2 files changed, 1 insertion(+), 2 deletions(-) |
|
20 |
|
21 diff --git a/openstack_dashboard/dashboards/admin/networks/ports/forms.py b/openstack_dashboard/dashboards/admin/networks/ports/forms.py |
|
22 index 7a1f45d..939952b 100644 |
|
23 --- a/openstack_dashboard/dashboards/admin/networks/ports/forms.py |
|
24 +++ b/openstack_dashboard/dashboards/admin/networks/ports/forms.py |
|
25 @@ -57,6 +57,7 @@ class CreatePort(forms.SelfHandlingForm): |
|
26 network = api.quantum.network_get(request, data['network_id']) |
|
27 data['tenant_id'] = network.tenant_id |
|
28 data['admin_state_up'] = data['admin_state'] |
|
29 + del data['network_name'] |
|
30 del data['admin_state'] |
|
31 |
|
32 port = api.quantum.port_create(request, **data) |
|
33 diff --git a/openstack_dashboard/dashboards/admin/networks/tests.py b/openstack_dashboard/dashboards/admin/networks/tests.py |
|
34 index d6c0123..9c2cd19 100644 |
|
35 --- a/openstack_dashboard/dashboards/admin/networks/tests.py |
|
36 +++ b/openstack_dashboard/dashboards/admin/networks/tests.py |
|
37 @@ -651,7 +651,6 @@ class NetworkPortTests(test.BaseAdminViewTests): |
|
38 api.quantum.port_create(IsA(http.HttpRequest), |
|
39 tenant_id=network.tenant_id, |
|
40 network_id=network.id, |
|
41 - network_name=network.name, |
|
42 name=port.name, |
|
43 admin_state_up=port.admin_state_up, |
|
44 device_id=port.device_id, |
|
45 @@ -688,7 +687,6 @@ class NetworkPortTests(test.BaseAdminViewTests): |
|
46 api.quantum.port_create(IsA(http.HttpRequest), |
|
47 tenant_id=network.tenant_id, |
|
48 network_id=network.id, |
|
49 - network_name=network.name, |
|
50 name=port.name, |
|
51 admin_state_up=port.admin_state_up, |
|
52 device_id=port.device_id, |