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

« back to all changes in this revision

Viewing changes to nova/policy.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:
17
17
 
18
18
"""Policy Engine For Nova"""
19
19
 
 
20
import os.path
 
21
 
20
22
from nova.common import policy
21
23
from nova import exception
22
24
from nova import flags
52
54
    global _POLICY_PATH
53
55
    global _POLICY_CACHE
54
56
    if not _POLICY_PATH:
55
 
        _POLICY_PATH = utils.find_config(FLAGS.policy_file)
 
57
        _POLICY_PATH = FLAGS.policy_file
 
58
        if not os.path.exists(_POLICY_PATH):
 
59
            _POLICY_PATH = FLAGS.find_file(_POLICY_PATH)
 
60
        if not _POLICY_PATH:
 
61
            raise exception.ConfigNotFound(path=FLAGS.policy_file)
56
62
    utils.read_cached_file(_POLICY_PATH, _POLICY_CACHE,
57
63
                           reload_func=_set_brain)
58
64