~rackspace-titan/nova/api-profiling

« back to all changes in this revision

Viewing changes to nova/scheduler/api.py

  • Committer: Tarmac
  • Author(s): Sandy Walsh
  • Date: 2011-06-16 01:16:39 UTC
  • mfrom: (1182.1.4 novaclient_project_id)
  • Revision ID: tarmac-20110616011639-imd9bzgvw9vubo2k
novaclient changed to support projectID in authentication. Caused some minor issues with distributed scheduler. This fixes them up.

Show diffs side-by-side

added added

removed removed

Lines of Context:
106
106
def _process(func, zone):
107
107
    """Worker stub for green thread pool. Give the worker
108
108
    an authenticated nova client and zone info."""
109
 
    nova = novaclient.OpenStack(zone.username, zone.password, zone.api_url)
 
109
    nova = novaclient.OpenStack(zone.username, zone.password, None,
 
110
                                zone.api_url)
110
111
    nova.authenticate()
111
112
    return func(nova, zone)
112
113
 
122
123
    results = []
123
124
    for zone in db.zone_get_all(context):
124
125
        try:
125
 
            nova = novaclient.OpenStack(zone.username, zone.password,
 
126
            nova = novaclient.OpenStack(zone.username, zone.password, None,
126
127
                    zone.api_url)
127
128
            nova.authenticate()
128
129
        except novaclient.exceptions.BadRequest, e: