diff options
| author | Ed Leafe <ed@leafe.com> | 2011-08-08 14:42:18 +0000 |
|---|---|---|
| committer | Ed Leafe <ed@leafe.com> | 2011-08-08 14:42:18 +0000 |
| commit | 973032959ea4b1300cb68f767885dbd3226bebd9 (patch) | |
| tree | 5c75bf3db2a3c13292642a095f54736032c964ab | |
| parent | b1a503053cb8cbeb1a4ab18e650b49cc4da15e23 (diff) | |
| download | nova-973032959ea4b1300cb68f767885dbd3226bebd9.tar.gz nova-973032959ea4b1300cb68f767885dbd3226bebd9.tar.xz nova-973032959ea4b1300cb68f767885dbd3226bebd9.zip | |
Fixed some typos from the last refactoring
| -rw-r--r-- | nova/api/openstack/contrib/hosts.py | 2 | ||||
| -rw-r--r-- | nova/tests/test_hosts.py | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/nova/api/openstack/contrib/hosts.py b/nova/api/openstack/contrib/hosts.py index d5bd3166b..ecaa365b7 100644 --- a/nova/api/openstack/contrib/hosts.py +++ b/nova/api/openstack/contrib/hosts.py @@ -133,7 +133,7 @@ class Hosts(extensions.ExtensionDescriptor): @admin_only.admin_only def get_resources(self): - resources = [extensions.ResourceExtension('os-hosts', + resources = [extensions.ResourceExtension('os-hosts', HostController(), collection_actions={'update': 'PUT'}, member_actions={"startup": "GET", "shutdown": "GET", "reboot": "GET"})] diff --git a/nova/tests/test_hosts.py b/nova/tests/test_hosts.py index cd22571e6..a724db9da 100644 --- a/nova/tests/test_hosts.py +++ b/nova/tests/test_hosts.py @@ -94,12 +94,11 @@ class HostTestCase(test.TestCase): self.assertEqual(result_c2["status"], "disabled") def test_host_startup(self): - self.assertRaises(webob.exc.HTTPBadRequest, self.controller.startup, - self.req, "host_c1") + result = self.controller.startup(self.req, "host_c1") + self.assertEqual(result["power_action"], "startup") def test_host_shutdown(self): result = self.controller.shutdown(self.req, "host_c1") - print "RES", result self.assertEqual(result["power_action"], "shutdown") def test_host_reboot(self): |
