summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorSandy Walsh <sandy.walsh@rackspace.com>2011-09-12 04:58:39 -0700
committerSandy Walsh <sandy.walsh@rackspace.com>2011-09-12 04:58:39 -0700
commita27aa5dce2788560b29fd33b4805acf0190a27e3 (patch)
tree99735c9a38decf777b4ac7f8735ae49f7ee39dc5 /nova
parent65593df54c7f547451b903ed148b0dc9ecebca19 (diff)
tweaks
Diffstat (limited to 'nova')
-rw-r--r--nova/scheduler/abstract_scheduler.py3
-rw-r--r--nova/scheduler/zone_manager.py4
2 files changed, 5 insertions, 2 deletions
diff --git a/nova/scheduler/abstract_scheduler.py b/nova/scheduler/abstract_scheduler.py
index e5ea0f4e4..657ac1483 100644
--- a/nova/scheduler/abstract_scheduler.py
+++ b/nova/scheduler/abstract_scheduler.py
@@ -118,7 +118,8 @@ class AbstractScheduler(driver.Scheduler):
". ReservationID=%(reservation_id)s") % locals())
nova = None
try:
- nova = novaclient.Client(zone.username, zone.password, None, url)
+ nova = novaclient.Client(zone.username, zone.password, None, url,
+ token=context.auth_token)
nova.authenticate()
except novaclient_exceptions.BadRequest, e:
raise exception.NotAuthorized(_("Bad credentials attempting "
diff --git a/nova/scheduler/zone_manager.py b/nova/scheduler/zone_manager.py
index df78411cb..16b4c7faf 100644
--- a/nova/scheduler/zone_manager.py
+++ b/nova/scheduler/zone_manager.py
@@ -92,7 +92,9 @@ class ZoneState(object):
def _call_novaclient(zone):
- """Call novaclient. Broken out for testing purposes."""
+ """Call novaclient. Broken out for testing purposes. Note that
+ we have to use the admin credentials for this since there is no
+ available context."""
client = novaclient.Client(zone.username, zone.password, None,
zone.api_url, region_name=zone.name)
return client.zones.info()._info