Merge lp:~jakedahn/nova/lp820620 into lp:~hudson-openstack/nova/trunk

Proposed by Jake Dahn
Status: Merged
Approved by: Devin Carlen
Approved revision: 1436
Merged at revision: 1436
Proposed branch: lp:~jakedahn/nova/lp820620
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 27 lines (+3/-1)
2 files modified
nova/api/openstack/contrib/floating_ips.py (+1/-1)
nova/tests/api/openstack/contrib/test_floating_ips.py (+2/-0)
To merge this branch: bzr merge lp:~jakedahn/nova/lp820620
Reviewer Review Type Date Requested Status
Devin Carlen (community) Approve
Ed Leafe (community) Approve
Review via email: mp+70633@code.launchpad.net

Description of the change

This branch allows the standard inclusion of a body param which most http clients will send along with a POST request.

To post a comment you must log in.
Revision history for this message
Ed Leafe (ed-leafe) wrote :

lgtm

review: Approve
Revision history for this message
Devin Carlen (devcamcar) wrote :

lgtm

review: Approve
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :
Download full text (88.1 KiB)

The attempt to merge lp:~jakedahn/nova/lp820620 into lp:nova failed. Below is the output from the failed tests.

FloatingIpTest
    test_floating_ip_allocate OK 0.15
    test_floating_ip_associate OK 0.08
    test_floating_ip_disassociate OK 0.09
    test_floating_ip_release OK 0.09
    test_floating_ip_show OK 0.08
    test_floating_ips_list OK 0.09
    test_translate_floating_ip_view OK 0.04
    test_translate_floating_ip_view_dict OK 0.02
FixedIpTest
    test_add_fixed_ip OK 0.18
    test_add_fixed_ip_no_network OK 0.06
    test_remove_fixed_ip OK 0.06
    test_remove_fixed_ip_no_address OK 0.06
AccountsTest
    test_account_create OK 0.15
    test_account_delete OK 0.14
    test_account_update OK 0.30
    test_get_account OK 0.14
AdminAPITest
    test_admin_disabled OK 0.11
    test_admin_enabled OK 0.15
APITest
    test_exceptions_are_converted_to_faults OK 0.01
    test_malformed_json OK 0.05
    test_malformed_xml OK 0.06
Test
    test_authorize_project OK 0.22
    test_authorize_token OK 0.09
    test_authorize_user OK 0.05
    test_bad_project OK 0.09
    test_bad_token OK 0.05
    test_bad_user_bad_key OK 0.05
    test_bad_user_good_key OK 0.05
    test_no_user OK 0.05
    test_not_existing_project OK 0.19
    test_token_expiry OK 0.05
TestFunctional
    test_token_doesnotexist OK 0.06
    test_token_expiry OK 0.08
TestLimiter
    test_authorize_token OK 0.10
LimiterTest
    test_limiter_custom_max_limit OK 0.00
    test_limiter_limit_and_offset OK 0.00
    test_limiter_limit_medium OK 0.00
    test_limiter_limit_over_max OK 0.00
    test_limiter_limit_zero OK 0.00
    test_limiter_negative_limit OK 0.00
    test_limiter_negative_offset ...

Revision history for this message
Jake Dahn (jakedahn) wrote :

added my email to mailmap.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :
Download full text (111.4 KiB)

The attempt to merge lp:~jakedahn/nova/lp820620 into lp:nova failed. Below is the output from the failed tests.

FloatingIpTest
    test_floating_ip_allocate OK 0.17
    test_floating_ip_associate OK 0.09
    test_floating_ip_disassociate OK 0.09
    test_floating_ip_release FAIL
    test_floating_ip_show OK 0.10
    test_floating_ips_list OK 0.23
    test_translate_floating_ip_view OK 0.04
    test_translate_floating_ip_view_dict OK 0.02
KeypairsTest
    test_keypair_create OK 0.20
    test_keypair_delete OK 0.08
    test_keypair_import OK 0.13
    test_keypair_list OK 0.08
FixedIpTest
    test_add_fixed_ip OK 0.07
    test_add_fixed_ip_no_network OK 0.08
    test_remove_fixed_ip OK 0.08
    test_remove_fixed_ip_no_address OK 0.27
TestSecurityGroupRules
    test_create_add_existing_rules_json OK 0.33
    test_create_by_cidr_json OK 0.35
    test_create_by_group_id_json OK 0.54
    test_create_rule_with_same_group_parent_id_json OK 0.33
    test_create_with_empty_group_id_json OK 0.49
    test_create_with_invalid_cidr_json OK 0.33
    test_create_with_invalid_from_port_json OK 0.52
    test_create_with_invalid_group_id_json OK 0.35
    test_create_with_invalid_parent_group_id_json OK 0.49
    test_create_with_invalid_protocol_json OK 0.34
    test_create_with_invalid_to_port_json OK 0.33
    test_create_with_no_body_json OK 0.46
    test_create_with_no_cidr_group_json OK 0.35
    test_create_with_no_protocol_json OK 0.50
    test_create_with_no_security_group_rule_in_body_json OK 0.31
    test_create_with_no_to_port_json OK 0.48
    test_create_with_non_existing_parent_group_id_json OK 0.32
    test_create_with_non_numerical_from_port_json OK 0.33
    test_create_with_non_numerical_to_port_json OK 0.53
    test_delete OK 0.49
    test_delete_invalid_rule_id OK 0.49
    test_delete_non_existing_rule_id OK 0.33
TestSecurityGroupRulesXMLDeserializer
    test_create_no_protocol_request OK 0.00
    test_create_request OK 0.00
TestSecurityGroupXMLDeserializer
    test_create_no_description_reques...

Revision history for this message
Jake Dahn (jakedahn) wrote :

Fixed the broken test.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/api/openstack/contrib/floating_ips.py'
2--- nova/api/openstack/contrib/floating_ips.py 2011-08-12 14:59:10 +0000
3+++ nova/api/openstack/contrib/floating_ips.py 2011-08-15 19:07:35 +0000
4@@ -131,7 +131,7 @@
5 "floating_ip": floating_ip,
6 "fixed_ip": fixed_ip}}
7
8- def disassociate(self, req, id):
9+ def disassociate(self, req, id, body=None):
10 """ POST /floating_ips/{id}/disassociate """
11 context = req.environ['nova.context']
12 floating_ip = self.network_api.get_floating_ip(context, id)
13
14=== modified file 'nova/tests/api/openstack/contrib/test_floating_ips.py'
15--- nova/tests/api/openstack/contrib/test_floating_ips.py 2011-08-02 11:28:43 +0000
16+++ nova/tests/api/openstack/contrib/test_floating_ips.py 2011-08-15 19:07:35 +0000
17@@ -177,8 +177,10 @@
18 self.assertEqual(actual, expected)
19
20 def test_floating_ip_disassociate(self):
21+ body = dict()
22 req = webob.Request.blank('/v1.1/os-floating-ips/1/disassociate')
23 req.method = 'POST'
24+ req.body = json.dumps(body)
25 req.headers['Content-Type'] = 'application/json'
26 res = req.get_response(fakes.wsgi_app())
27 self.assertEqual(res.status_int, 200)