None project_id now default

This commit is contained in:
Sandy Walsh
2011-06-15 06:40:42 -07:00
parent 1cfda087b4
commit dbe3729971
3 changed files with 7 additions and 4 deletions

View File

@@ -106,7 +106,8 @@ def _wrap_method(function, self):
def _process(func, zone): def _process(func, zone):
"""Worker stub for green thread pool. Give the worker """Worker stub for green thread pool. Give the worker
an authenticated nova client and zone info.""" an authenticated nova client and zone info."""
nova = novaclient.OpenStack(zone.username, zone.password, zone.api_url) nova = novaclient.OpenStack(zone.username, zone.password, None,
zone.api_url)
nova.authenticate() nova.authenticate()
return func(nova, zone) return func(nova, zone)
@@ -122,7 +123,7 @@ def call_zone_method(context, method_name, errors_to_ignore=None,
results = [] results = []
for zone in db.zone_get_all(context): for zone in db.zone_get_all(context):
try: try:
nova = novaclient.OpenStack(zone.username, zone.password, nova = novaclient.OpenStack(zone.username, zone.password, None,
zone.api_url) zone.api_url)
nova.authenticate() nova.authenticate()
except novaclient.exceptions.BadRequest, e: except novaclient.exceptions.BadRequest, e:

View File

@@ -105,7 +105,8 @@ class ZoneAwareScheduler(driver.Scheduler):
% locals()) % locals())
nova = None nova = None
try: try:
nova = novaclient.OpenStack(zone.username, zone.password, url) nova = novaclient.OpenStack(zone.username, zone.password, None,
url)
nova.authenticate() nova.authenticate()
except novaclient.exceptions.BadRequest, e: except novaclient.exceptions.BadRequest, e:
raise exception.NotAuthorized(_("Bad credentials attempting " raise exception.NotAuthorized(_("Bad credentials attempting "

View File

@@ -89,7 +89,8 @@ class ZoneState(object):
def _call_novaclient(zone): def _call_novaclient(zone):
"""Call novaclient. Broken out for testing purposes.""" """Call novaclient. Broken out for testing purposes."""
client = novaclient.OpenStack(zone.username, zone.password, zone.api_url) client = novaclient.OpenStack(zone.username, zone.password, None,
zone.api_url)
return client.zones.info()._info return client.zones.info()._info