~ubuntu-cloud-archive/ubuntu/precise/nova/trunk

« back to all changes in this revision

Viewing changes to nova/scheduler/multi.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Adam Gandelman, Chuck Short
  • Date: 2012-07-06 10:18:33 UTC
  • mfrom: (1.1.58)
  • Revision ID: package-import@ubuntu.com-20120706101833-wp2nv392mpe9re8p
Tags: 2012.2~f2-0ubuntu1
[ Adam Gandelman ]
* Use new rootwrap configuration structure:
  - debian/nova-{compute, network, volume}.{pyinstall, pyremove}: Dropped.
  - debian/nova-common.dirs: Add /etc/nova/rootwrap.d/.
  - debian/nova-common.install: Install /etc/nova/rootwrap.conf.
  - debian/debian/nova.conf: Reference rootwrap.conf in calls to
    nova-rootwrap.
  - debian/nova-{compute, network, volume}.install: Install corresponding
    filter in /etc/nova/rootwrap.d/
* debian/rules: Install logging_sample.conf to /etc/nova/logging.conf
  as part of nova-common.
* debian/pydist-overrides: Add setuptools-git.
* debian/control: Add python-setuptools-git as a Build-Depends.
* debian/rules: Do not remove nova.egg-info during auto_clean.  Now that
  upstream has moved to setuptools-git, doing so results in missing files
  from built package.

[ Chuck Short ]
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    cfg.StrOpt('volume_scheduler_driver',
36
36
               default='nova.scheduler.chance.ChanceScheduler',
37
37
               help='Driver to use for scheduling volume calls'),
 
38
    cfg.StrOpt('default_scheduler_driver',
 
39
               default='nova.scheduler.chance.ChanceScheduler',
 
40
               help='Default driver to use for scheduling calls'),
38
41
    ]
39
42
 
40
43
FLAGS = flags.FLAGS
60
63
                FLAGS.compute_scheduler_driver)
61
64
        volume_driver = importutils.import_object(
62
65
                FLAGS.volume_scheduler_driver)
 
66
        default_driver = importutils.import_object(
 
67
                FLAGS.default_scheduler_driver)
63
68
 
64
69
        self.drivers = {'compute': compute_driver,
65
 
                        'volume': volume_driver}
 
70
                        'volume': volume_driver,
 
71
                        'default': default_driver}
66
72
 
67
73
    def __getattr__(self, key):
68
74
        if not key.startswith('schedule_'):
73
79
        return getattr(self.drivers[_METHOD_MAP[method]], key)
74
80
 
75
81
    def schedule(self, context, topic, method, *_args, **_kwargs):
76
 
        return self.drivers[topic].schedule(context, topic,
 
82
        driver = self.drivers.get(topic, self.drivers['default'])
 
83
        return driver.schedule(context, topic,
77
84
                method, *_args, **_kwargs)
78
85
 
79
86
    def schedule_run_instance(self, *args, **kwargs):