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

« back to all changes in this revision

Viewing changes to nova/scheduler/filter_scheduler.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:
25
25
from nova import flags
26
26
from nova import log as logging
27
27
from nova.notifier import api as notifier
 
28
from nova.openstack.common import importutils
28
29
from nova.scheduler import driver
29
30
from nova.scheduler import least_cost
30
31
from nova.scheduler import scheduler_options
31
 
from nova import utils
32
32
 
33
33
 
34
34
FLAGS = flags.FLAGS
65
65
                locals())
66
66
 
67
67
        payload = dict(request_spec=request_spec)
68
 
        notifier.notify(notifier.publisher_id("scheduler"),
 
68
        notifier.notify(context, notifier.publisher_id("scheduler"),
69
69
                        'scheduler.run_instance.start', notifier.INFO, payload)
70
70
 
71
71
        weighted_hosts = self._schedule(context, "compute", request_spec,
91
91
            if instance:
92
92
                instances.append(instance)
93
93
 
94
 
        notifier.notify(notifier.publisher_id("scheduler"),
 
94
        notifier.notify(context, notifier.publisher_id("scheduler"),
95
95
                        'scheduler.run_instance.end', notifier.INFO, payload)
96
96
 
97
97
        return instances
125
125
        payload = dict(request_spec=request_spec,
126
126
                       weighted_host=weighted_host.to_dict(),
127
127
                       instance_id=instance['uuid'])
128
 
        notifier.notify(notifier.publisher_id("scheduler"),
 
128
        notifier.notify(context, notifier.publisher_id("scheduler"),
129
129
                        'scheduler.run_instance.scheduled', notifier.INFO,
130
130
                        payload)
131
131
 
243
243
                # NOTE: import_class is somewhat misnamed since
244
244
                # the weighing function can be any non-class callable
245
245
                # (i.e., no 'self')
246
 
                cost_fn = utils.import_class(cost_fn_str)
247
 
            except exception.ClassNotFound:
 
246
                cost_fn = importutils.import_class(cost_fn_str)
 
247
            except ImportError:
248
248
                raise exception.SchedulerCostFunctionNotFound(
249
249
                        cost_fn_str=cost_fn_str)
250
250