Merge lp:~danwent/neutron/test-show-no-attachment into lp:neutron/essex

Proposed by dan wendlandt
Status: Merged
Merge reported by: dan wendlandt
Merged at revision: not available
Proposed branch: lp:~danwent/neutron/test-show-no-attachment
Merge into: lp:neutron/essex
Diff against target: 38 lines (+22/-0)
1 file modified
tests/unit/test_api.py (+22/-0)
To merge this branch: bzr merge lp:~danwent/neutron/test-show-no-attachment
Reviewer Review Type Date Requested Status
Salvatore Orlando (community) Approve
Tyler Smith (community) Approve
Brad Hall (community) Approve
Somik Behera (community) netstack-core Approve
Review via email: mp+76801@code.launchpad.net

Description of the change

This does not change functionality.

It adds unit tests to validate how the API performs when fetching a port attachment when no attachment is set.

To post a comment you must log in.
Revision history for this message
Somik Behera (somikbehera) wrote :

Unit test looks good.

review: Approve (netstack-core)
Revision history for this message
Brad Hall (bgh) wrote :

Looks good

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

Looks good.

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

quickest review EVER! thanks :)

On Fri, Sep 23, 2011 at 1:31 PM, Tyler Smith <email address hidden> wrote:

> Review: Approve
>
> Looks good.
> --
>
> https://code.launchpad.net/~danwent/quantum/test-show-no-attachment/+merge/76801
> You are the owner of lp:~danwent/quantum/test-show-no-attachment.
>

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Wendlandt
Nicira Networks, Inc.
www.nicira.com | www.openvswitch.org
Sr. Product Manager
cell: 650-906-2650
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Revision history for this message
James E. Blair (corvus) wrote :

dan wendlandt <email address hidden> writes:

> dan wendlandt has proposed merging lp:~danwent/quantum/test-show-no-attachment into lp:quantum.

Hi,

Shouldn't this be in Gerrit?

  http://wiki.openstack.org/GerritWorkflow

-Jim

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

Hi Jim,

This is still for diablo (we delayed our release one day, so it is releasing
today).

dan

On Fri, Sep 23, 2011 at 2:55 PM, James E. Blair <email address hidden> wrote:

> dan wendlandt <email address hidden> writes:
>
> > dan wendlandt has proposed merging
> lp:~danwent/quantum/test-show-no-attachment into lp:quantum.
>
> Hi,
>
> Shouldn't this be in Gerrit?
>
> http://wiki.openstack.org/GerritWorkflow
>
> -Jim
>
> --
>
> https://code.launchpad.net/~danwent/quantum/test-show-no-attachment/+merge/76801
> You are the owner of lp:~danwent/quantum/test-show-no-attachment.
>

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Wendlandt
Nicira Networks, Inc.
www.nicira.com | www.openvswitch.org
Sr. Product Manager
cell: 650-906-2650
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

> dan wendlandt <email address hidden> writes:
>
> > dan wendlandt has proposed merging lp:~danwent/quantum/test-show-no-
> attachment into lp:quantum.
>
> Hi,
>
> Shouldn't this be in Gerrit?
>
> http://wiki.openstack.org/GerritWorkflow
>
> -Jim

Hu Jim,

I think we are still merging into launchpad, as these are 'last-minute' patches into the diablo release, which will come from Launchpad.

Dan, please correct me if I'm wrong.

Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

Dan, thanks for adding this code.

Just a note: approving this branch implies we accept the current API behavior and hence will keep a malfunctioning Quantum Manager in Nova's diablo release.

Please tell me that I'm wrong.

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

Yes, let's chat about this.

On Fri, Sep 23, 2011 at 3:17 PM, Salvatore Orlando <
<email address hidden>> wrote:

> Review: Needs Information
>
> Dan, thanks for adding this code.
>
> Just a note: approving this branch implies we accept the current API
> behavior and hence will keep a malfunctioning Quantum Manager in Nova's
> diablo release.
>
> Please tell me that I'm wrong.
>
> --
>
> https://code.launchpad.net/~danwent/quantum/test-show-no-attachment/+merge/76801
> You are the owner of lp:~danwent/quantum/test-show-no-attachment.
>

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Wendlandt
Nicira Networks, Inc.
www.nicira.com | www.openvswitch.org
Sr. Product Manager
cell: 650-906-2650
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Revision history for this message
James E. Blair (corvus) wrote :

dan wendlandt <email address hidden> writes:

> Hi Jim,
>
> This is still for diablo (we delayed our release one day, so it is releasing
> today).

Oh, in that case maybe this proposal should be targeted to
lp:quantum/diablo instead of lp:quantum? At this point lp:quantum is a
mirror of github.

-Jim

Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

Agreed to approve after discussion on IRC.

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

On Fri, Sep 23, 2011 at 3:31 PM, James E. Blair <email address hidden> wrote:

> dan wendlandt <email address hidden> writes:
>
> > Hi Jim,
> >
> > This is still for diablo (we delayed our release one day, so it is
> releasing
> > today).
>
> Oh, in that case maybe this proposal should be targeted to
> lp:quantum/diablo instead of lp:quantum? At this point lp:quantum is a
> mirror of github.
>

Ok, I am actually merging them into lp:quantum/diablo anyway. I will play
with lauchpad to try to make things look sane :)

dan

>
> -Jim
>
> --
>
> https://code.launchpad.net/~danwent/quantum/test-show-no-attachment/+merge/76801
> You are the owner of lp:~danwent/quantum/test-show-no-attachment.
>

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Wendlandt
Nicira Networks, Inc.
www.nicira.com | www.openvswitch.org
Sr. Product Manager
cell: 650-906-2650
~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

Turns out we can't merge directly into lp:quantum, as it mirrors github. I merged this directly into lp:quantum/diablo

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/unit/test_api.py'
2--- tests/unit/test_api.py 2011-09-09 15:59:55 +0000
3+++ tests/unit/test_api.py 2011-09-23 20:18:01 +0000
4@@ -645,6 +645,22 @@
5 self.assertEqual(attachment_data['attachment']['id'], interface_id)
6 LOG.debug("_test_show_attachment - format:%s - END", format)
7
8+ def _test_show_attachment_none_set(self, format):
9+ LOG.debug("_test_show_attachment_none_set - format:%s - START", format)
10+ content_type = "application/%s" % format
11+ port_state = "ACTIVE"
12+ network_id = self._create_network(format)
13+ port_id = self._create_port(network_id, port_state, format)
14+ get_attachment_req = testlib.get_attachment_request(self.tenant_id,
15+ network_id,
16+ port_id,
17+ format)
18+ get_attachment_res = get_attachment_req.get_response(self.api)
19+ attachment_data = Serializer().deserialize(get_attachment_res.body,
20+ content_type)
21+ self.assertTrue('id' not in attachment_data['attachment'])
22+ LOG.debug("_test_show_attachment_none_set - format:%s - END", format)
23+
24 def _test_show_attachment_networknotfound(self, format):
25 LOG.debug("_test_show_attachment_networknotfound - format:%s - START",
26 format)
27@@ -1005,6 +1021,12 @@
28 def test_show_attachment_json(self):
29 self._test_show_attachment('json')
30
31+ def test_show_attachment_none_set_xml(self):
32+ self._test_show_attachment_none_set('xml')
33+
34+ def test_show_attachment_none_set_json(self):
35+ self._test_show_attachment_none_set('json')
36+
37 def test_show_attachment_networknotfound_xml(self):
38 self._test_show_attachment_networknotfound('xml')
39

Subscribers

People subscribed via source and target branches