diff options
author | Kevin L. Mitchell <kevin.mitchell@rackspace.com> | 2012-01-12 17:37:18 -0600 |
---|---|---|
committer | Kevin L. Mitchell <kevin.mitchell@rackspace.com> | 2012-01-16 20:01:17 +0000 |
commit | 8be89626681388c3a0e8f3c94830aff7c2a4c37e (patch) | |
tree | 62cfcc53c6294905016daa05a669b6be6a0187eb /nova/tests/api/openstack/compute/contrib/test_floating_ips.py | |
parent | 312caea8ab278882552cf9006653de97ced88ef8 (diff) | |
download | nova-8be89626681388c3a0e8f3c94830aff7c2a4c37e.tar.gz nova-8be89626681388c3a0e8f3c94830aff7c2a4c37e.tar.xz nova-8be89626681388c3a0e8f3c94830aff7c2a4c37e.zip |
Update some extensions (1)
Updates the following extensions to conform to new interfaces:
* admin_actions (AdminActions)
* console_output (Console_output)
* deferred_delete (DeferredDelete)
* floating_ips (Floating_ips)
* multinic (NMN)
* rescue (Rescue)
* security_groups (SecurityGroups)
Related to blueprint extension-refactor.
Change-Id: Ica7b44db22835971703cc72d831410d7e7660f1d
Diffstat (limited to 'nova/tests/api/openstack/compute/contrib/test_floating_ips.py')
-rw-r--r-- | nova/tests/api/openstack/compute/contrib/test_floating_ips.py | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/nova/tests/api/openstack/compute/contrib/test_floating_ips.py b/nova/tests/api/openstack/compute/contrib/test_floating_ips.py index 27c980f00..a8dddf08f 100644 --- a/nova/tests/api/openstack/compute/contrib/test_floating_ips.py +++ b/nova/tests/api/openstack/compute/contrib/test_floating_ips.py @@ -107,11 +107,6 @@ def fake_instance_get(context, instance_id): "project_id": '123'} -class StubExtensionManager(object): - def register(self, *args): - pass - - class FloatingIpTest(test.TestCase): floating_ip = "10.10.10.10" @@ -151,7 +146,7 @@ class FloatingIpTest(test.TestCase): self._create_floating_ip() self.controller = floating_ips.FloatingIPController() - self.manager = floating_ips.Floating_ips(StubExtensionManager()) + self.manager = floating_ips.FloatingIPActionController() def tearDown(self): self._delete_floating_ip() @@ -264,13 +259,13 @@ class FloatingIpTest(test.TestCase): body = dict(addFloatingIp=dict(address=self.floating_ip)) req = fakes.HTTPRequest.blank('/v2/fake/servers/test_inst/action') - self.manager._add_floating_ip(body, req, 'test_inst') + self.manager._add_floating_ip(req, 'test_inst', body) def test_floating_ip_disassociate(self): body = dict(removeFloatingIp=dict(address='10.10.10.10')) req = fakes.HTTPRequest.blank('/v2/fake/servers/test_inst/action') - self.manager._remove_floating_ip(body, req, 'test_inst') + self.manager._remove_floating_ip(req, 'test_inst', body) # these are a few bad param tests @@ -279,24 +274,24 @@ class FloatingIpTest(test.TestCase): req = fakes.HTTPRequest.blank('/v2/fake/servers/test_inst/action') self.assertRaises(webob.exc.HTTPBadRequest, - self.manager._add_floating_ip, body, req, - 'test_inst') + self.manager._add_floating_ip, req, 'test_inst', + body) def test_missing_dict_param_in_remove_floating_ip(self): body = dict(removeFloatingIp='11.0.0.1') req = fakes.HTTPRequest.blank('/v2/fake/servers/test_inst/action') self.assertRaises(webob.exc.HTTPBadRequest, - self.manager._remove_floating_ip, body, req, - 'test_inst') + self.manager._remove_floating_ip, req, 'test_inst', + body) def test_missing_dict_param_in_add_floating_ip(self): body = dict(addFloatingIp='11.0.0.1') req = fakes.HTTPRequest.blank('/v2/fake/servers/test_inst/action') self.assertRaises(webob.exc.HTTPBadRequest, - self.manager._add_floating_ip, body, req, - 'test_inst') + self.manager._add_floating_ip, req, 'test_inst', + body) class FloatingIpSerializerTest(test.TestCase): |