~ubuntu-branches/ubuntu/saucy/nova/saucy-proposed

« back to all changes in this revision

Viewing changes to nova/auth/manager.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-05-24 13:12:53 UTC
  • mfrom: (1.1.55)
  • Revision ID: package-import@ubuntu.com-20120524131253-ommql08fg1en06ut
Tags: 2012.2~f1-0ubuntu1
* New upstream release.
* Prepare for quantal:
  - Dropped debian/patches/upstream/0006-Use-project_id-in-ec2.cloud._format_image.patch
  - Dropped debian/patches/upstream/0005-Populate-image-properties-with-project_id-again.patch
  - Dropped debian/patches/upstream/0004-Fixed-bug-962840-added-a-test-case.patch
  - Dropped debian/patches/upstream/0003-Allow-unprivileged-RADOS-users-to-access-rbd-volumes.patch
  - Dropped debian/patches/upstream/0002-Stop-libvirt-test-from-deleting-instances-dir.patch
  - Dropped debian/patches/upstream/0001-fix-bug-where-nova-ignores-glance-host-in-imageref.patch 
  - Dropped debian/patches/0001-fix-useexisting-deprecation-warnings.patch
* debian/control: Add python-keystone as a dependency. (LP: #907197)
* debian/patches/kombu_tests_timeout.patch: Refreshed.
* debian/nova.conf, debian/nova-common.postinst: Convert to new ini
  file configuration
* debian/patches/nova-manage_flagfile_location.patch: Refreshed

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
import uuid
29
29
import zipfile
30
30
 
 
31
from nova.auth import signer
31
32
from nova import context
32
33
from nova import crypto
33
34
from nova import db
35
36
from nova import flags
36
37
from nova import log as logging
37
38
from nova.openstack.common import cfg
 
39
from nova.openstack.common import importutils
38
40
from nova import utils
39
 
from nova.auth import signer
40
41
 
41
42
 
42
43
auth_opts = [
247
248
        __init__ is run every time AuthManager() is called, so we only
248
249
        reset the driver if it is not set or a new driver is specified.
249
250
        """
250
 
        self.network_manager = utils.import_object(FLAGS.network_manager)
 
251
        self.network_manager = importutils.import_object(FLAGS.network_manager)
251
252
        if driver or not getattr(self, 'driver', None):
252
 
            self.driver = utils.import_class(driver or FLAGS.auth_driver)
 
253
            self.driver = importutils.import_class(driver or FLAGS.auth_driver)
253
254
        if AuthManager.mc is None:
254
255
            AuthManager.mc = memcache.Client(FLAGS.memcached_servers, debug=0)
255
256
 
446
447
        """
447
448
        if role == 'projectmanager':
448
449
            if not project:
449
 
                raise exception.Error(_("Must specify project"))
 
450
                raise exception.NovaException(_("Must specify project"))
450
451
            return self.is_project_manager(user, project)
451
452
 
452
453
        global_role = self._has_role(User.safe_id(user),