summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandy Walsh <sandy.walsh@rackspace.com>2011-03-03 15:11:16 -0400
committerSandy Walsh <sandy.walsh@rackspace.com>2011-03-03 15:11:16 -0400
commitc297880fb7c007aa4f6b6a9f7b985ecc981d8fe2 (patch)
treeb5384649a8ada36dc83785b5832af67b8ec00c31
parent24f91e6123c15510e4ed99036b568f3958189941 (diff)
parentd3584eeeb289120eef17ae5dd448a6237e05935b (diff)
merge trunk
-rw-r--r--nova/scheduler/zone_manager.py10
-rw-r--r--nova/tests/test_zones.py12
-rw-r--r--tools/pip-requires2
3 files changed, 12 insertions, 12 deletions
diff --git a/nova/scheduler/zone_manager.py b/nova/scheduler/zone_manager.py
index 758c5e3db..edf9000cc 100644
--- a/nova/scheduler/zone_manager.py
+++ b/nova/scheduler/zone_manager.py
@@ -17,7 +17,7 @@
ZoneManager oversees all communications with child Zones.
"""
-import novatools
+import novaclient
import thread
import traceback
@@ -85,9 +85,9 @@ class ZoneState(object):
"attempts. Marking inactive.") % locals())
-def _call_novatools(zone):
- """Call novatools. Broken out for testing purposes."""
- client = novatools.OpenStack(zone.username, zone.password, zone.api_url)
+def _call_novaclient(zone):
+ """Call novaclient. Broken out for testing purposes."""
+ client = novaclient.OpenStack(zone.username, zone.password, zone.api_url)
return client.zones.info()._info
@@ -95,7 +95,7 @@ def _poll_zone(zone):
"""Eventlet worker to poll a zone."""
logging.debug(_("Polling zone: %s") % zone.api_url)
try:
- zone.update_metadata(_call_novatools(zone))
+ zone.update_metadata(_call_novaclient(zone))
except Exception, e:
zone.log_error(traceback.format_exc())
diff --git a/nova/tests/test_zones.py b/nova/tests/test_zones.py
index c273230a9..5a52a0506 100644
--- a/nova/tests/test_zones.py
+++ b/nova/tests/test_zones.py
@@ -18,7 +18,7 @@ Tests For ZoneManager
import datetime
import mox
-import novatools
+import novaclient
from nova import context
from nova import db
@@ -40,8 +40,8 @@ class FakeZone:
setattr(self, k, v)
-def exploding_novatools(zone):
- """Used when we want to simulate a novatools call failing."""
+def exploding_novaclient(zone):
+ """Used when we want to simulate a novaclient call failing."""
raise Exception("kaboom")
@@ -139,8 +139,8 @@ class ZoneManagerTestCase(test.TestCase):
self.assertEquals(zm.zone_states[2].username, 'user2')
def test_poll_zone(self):
- self.mox.StubOutWithMock(zone_manager, '_call_novatools')
- zone_manager._call_novatools(mox.IgnoreArg()).AndReturn(
+ self.mox.StubOutWithMock(zone_manager, '_call_novaclient')
+ zone_manager._call_novaclient(mox.IgnoreArg()).AndReturn(
dict(name='zohan', capabilities='hairdresser'))
zone_state = zone_manager.ZoneState()
@@ -156,7 +156,7 @@ class ZoneManagerTestCase(test.TestCase):
self.assertEquals(zone_state.name, 'zohan')
def test_poll_zone_fails(self):
- self.stubs.Set(zone_manager, "_call_novatools", exploding_novatools)
+ self.stubs.Set(zone_manager, "_call_novaclient", exploding_novaclient)
zone_state = zone_manager.ZoneState()
zone_state.update_credentials(FakeZone(id=2,
diff --git a/tools/pip-requires b/tools/pip-requires
index a5d4675be..3c9047e04 100644
--- a/tools/pip-requires
+++ b/tools/pip-requires
@@ -10,7 +10,7 @@ boto==1.9b
carrot==0.10.5
eventlet==0.9.12
lockfile==0.8
-python-novatools==2.0
+python-novaclient==2.3
python-daemon==1.5.5
python-gflags==1.3
redis==2.0.0