Merge lp:~bgh/neutron/202to200 into lp:neutron/diablo

Proposed by Brad Hall
Status: Merged
Merged at revision: 77
Proposed branch: lp:~bgh/neutron/202to200
Merge into: lp:neutron/diablo
Diff against target: 102 lines (+13/-11)
4 files modified
quantum/api/networks.py (+3/-2)
quantum/api/ports.py (+3/-2)
quantum/plugins/cisco/tests/unit/test_cisco_extension.py (+5/-5)
tests/unit/test_api.py (+2/-2)
To merge this branch: bzr merge lp:~bgh/neutron/202to200
Reviewer Review Type Date Requested Status
Tyler Smith Approve
dan wendlandt Approve
Review via email: mp+76803@code.launchpad.net

Description of the change

Pick up 202->200 changes. This is the same as salvatore's branch but it doesn't include the attachment_id fix and it also changes the expected return code in the cisco plugin tests.

To post a comment you must log in.
Revision history for this message
dan wendlandt (danwent) wrote :

Will be running tests on this as part of the final tests for diablo.

Will try to figure out how to invoke the Cisco tests, but it would be great if someone from that team was able to do a quick review as well.

review: Approve
Revision history for this message
dan wendlandt (danwent) wrote :

As an update, I tried running the cisco tests, but they seem to require that the config file has a database set, so I got many failures with the line:

OperationalError: (OperationalError) (2005, "Unknown MySQL server host '<put_quantum_mysql_host_here>' (1)") None None

Hopefully we can get someone from Cisco to run the tests on their setup (Brad's changes seem pretty benign, but its best to be overly cautious)

Revision history for this message
Tyler Smith (tylesmit) wrote :

Give me a minute; I'm setting up now.

Revision history for this message
Tyler Smith (tylesmit) wrote :

I'm getting 2 errors and 5 failures. The failures are definitely caused by this. I'm looking into it.

Revision history for this message
Tyler Smith (tylesmit) wrote :

I've fixed the issue and sent a merge prop from the fixed branch to this one. Once it's merged in everything should be good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'quantum/api/networks.py'
2--- quantum/api/networks.py 2011-09-02 11:50:08 +0000
3+++ quantum/api/networks.py 2011-09-23 20:25:27 +0000
4@@ -109,8 +109,9 @@
5 result = builder.build(network)['network']
6 # Wsgi middleware allows us to build the response
7 # before returning the call.
8- # This will allow us to return a 202 status code.
9- return self._build_response(request, dict(network=result), 202)
10+ # This will allow us to return a 200 status code. NOTE: in v1.1 we
11+ # will be returning a 202 status code.
12+ return self._build_response(request, dict(network=result), 200)
13
14 def update(self, request, tenant_id, id):
15 """ Updates the name for the network with the given id """
16
17=== modified file 'quantum/api/ports.py'
18--- quantum/api/ports.py 2011-09-02 11:50:08 +0000
19+++ quantum/api/ports.py 2011-09-23 20:25:27 +0000
20@@ -118,8 +118,9 @@
21 result = builder.build(port)['port']
22 # Wsgi middleware allows us to build the response
23 # before returning the call.
24- # This will allow us to return a 202 status code.
25- return self._build_response(request, dict(port=result), 202)
26+ # This will allow us to return a 200 status code. NOTE: in v1.1
27+ # we will be returning a 202 status code.
28+ return self._build_response(request, dict(port=result), 200)
29 except exception.NetworkNotFound as e:
30 return faults.Fault(faults.NetworkNotFound(e))
31 except exception.StateInvalid as e:
32
33=== modified file 'quantum/plugins/cisco/tests/unit/test_cisco_extension.py'
34--- quantum/plugins/cisco/tests/unit/test_cisco_extension.py 2011-08-31 07:33:54 +0000
35+++ quantum/plugins/cisco/tests/unit/test_cisco_extension.py 2011-09-23 20:25:27 +0000
36@@ -290,7 +290,7 @@
37 delete_path = str(delete_path_temp)
38 delete_response = self.test_app.delete(delete_path)
39
40- self.assertEqual(202, delete_response.status_int)
41+ self.assertEqual(200, delete_response.status_int)
42 LOG.debug("test_delete_portprofile - END")
43
44 def test_delete_portprofileDNE(self, portprofile_id='100'):
45@@ -396,7 +396,7 @@
46 associate_response = self.test_app.put(
47 associate_path, req_assign_body,
48 content_type=self.contenttype)
49- self.assertEqual(202, associate_response.status_int)
50+ self.assertEqual(200, associate_response.status_int)
51
52 # Clean Up - Disassociate and Delete the Port Profile
53 disassociate_path_temp = self.portprofile_path +\
54@@ -459,7 +459,7 @@
55 disassociate_response = self.test_app.put(
56 disassociate_path, req_assign_body,
57 content_type=self.contenttype)
58- self.assertEqual(202, disassociate_response.status_int)
59+ self.assertEqual(200, disassociate_response.status_int)
60 resp_body = wsgi.Serializer().deserialize(index_response.body,
61 self.contenttype)
62 delete_path_temp = self.portprofile_path +\
63@@ -762,7 +762,7 @@
64 resp_body['qoss']['qos']['id']
65 delete_path = str(delete_path_temp)
66 delete_response = self.test_app.delete(delete_path)
67- self.assertEqual(202, delete_response.status_int)
68+ self.assertEqual(200, delete_response.status_int)
69 LOG.debug("test_delete_qos - END")
70
71 def test_delete_qosDNE(self, qos_id='100'):
72@@ -1002,7 +1002,7 @@
73 resp_body['credentials']['credential']['id']
74 delete_path = str(delete_path_temp)
75 delete_response = self.test_app.delete(delete_path)
76- self.assertEqual(202, delete_response.status_int)
77+ self.assertEqual(200, delete_response.status_int)
78 LOG.debug("test_delete_credential - END")
79
80 def test_delete_credentialDNE(self, credential_id='100'):
81
82=== modified file 'tests/unit/test_api.py'
83--- tests/unit/test_api.py 2011-09-09 15:59:55 +0000
84+++ tests/unit/test_api.py 2011-09-23 20:25:27 +0000
85@@ -33,7 +33,7 @@
86 class APITest(unittest.TestCase):
87
88 def _create_network(self, format, name=None, custom_req_body=None,
89- expected_res_status=202):
90+ expected_res_status=200):
91 LOG.debug("Creating network")
92 content_type = "application/" + format
93 if name:
94@@ -51,7 +51,7 @@
95 return network_data['network']['id']
96
97 def _create_port(self, network_id, port_state, format,
98- custom_req_body=None, expected_res_status=202):
99+ custom_req_body=None, expected_res_status=200):
100 LOG.debug("Creating port for network %s", network_id)
101 content_type = "application/%s" % format
102 port_req = testlib.new_port_request(self.tenant_id, network_id,

Subscribers

People subscribed via source and target branches