summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Dahn <jake@ansolabs.com>2011-08-15 11:55:53 -0700
committerJake Dahn <jake@markupisart.com>2011-08-15 11:55:53 -0700
commitbc7892f698fbfc21f8d242f52e012d9165e46de7 (patch)
treebffcc77b09d9c96c67b6ecc3a9fe940065639c64
parent2ed3b12cc8da82304cef88dde64631b6348ee60e (diff)
downloadnova-bc7892f698fbfc21f8d242f52e012d9165e46de7.tar.gz
nova-bc7892f698fbfc21f8d242f52e012d9165e46de7.tar.xz
nova-bc7892f698fbfc21f8d242f52e012d9165e46de7.zip
Adding standard inclusion of a body param which most http clients will send along with a POST request.
-rw-r--r--nova/api/openstack/contrib/floating_ips.py2
-rw-r--r--nova/tests/api/openstack/contrib/test_floating_ips.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/nova/api/openstack/contrib/floating_ips.py b/nova/api/openstack/contrib/floating_ips.py
index c07bfdf09..121a1d4a0 100644
--- a/nova/api/openstack/contrib/floating_ips.py
+++ b/nova/api/openstack/contrib/floating_ips.py
@@ -131,7 +131,7 @@ class FloatingIPController(object):
"floating_ip": floating_ip,
"fixed_ip": fixed_ip}}
- def disassociate(self, req, id):
+ def disassociate(self, req, id, body):
""" POST /floating_ips/{id}/disassociate """
context = req.environ['nova.context']
floating_ip = self.network_api.get_floating_ip(context, id)
diff --git a/nova/tests/api/openstack/contrib/test_floating_ips.py b/nova/tests/api/openstack/contrib/test_floating_ips.py
index ab7ae2e54..dd58a1b22 100644
--- a/nova/tests/api/openstack/contrib/test_floating_ips.py
+++ b/nova/tests/api/openstack/contrib/test_floating_ips.py
@@ -177,8 +177,10 @@ class FloatingIpTest(test.TestCase):
self.assertEqual(actual, expected)
def test_floating_ip_disassociate(self):
+ body = dict()
req = webob.Request.blank('/v1.1/os-floating-ips/1/disassociate')
req.method = 'POST'
+ req.body = json.dumps(body)
req.headers['Content-Type'] = 'application/json'
res = req.get_response(fakes.wsgi_app())
self.assertEqual(res.status_int, 200)