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

« back to all changes in this revision

Viewing changes to nova/api/openstack/compute/contrib/admin_actions.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 exception
26
26
from nova import flags
27
27
from nova import log as logging
28
 
from nova.scheduler import api as scheduler_api
 
28
from nova.scheduler import rpcapi as scheduler_rpcapi
29
29
 
30
30
 
31
31
FLAGS = flags.FLAGS
41
41
    def __init__(self, *args, **kwargs):
42
42
        super(AdminActionsController, self).__init__(*args, **kwargs)
43
43
        self.compute_api = compute.API()
 
44
        self.scheduler_rpcapi = scheduler_rpcapi.SchedulerAPI()
44
45
 
45
46
    # TODO(bcwaldon): These action names should be prefixed with 'os-'
46
47
 
231
232
 
232
233
        props = {}
233
234
        metadata = entity.get('metadata', {})
234
 
        common.check_img_metadata_quota_limit(context, metadata)
 
235
        common.check_img_metadata_properties_quota(context, metadata)
235
236
        try:
236
237
            props.update(metadata)
237
238
        except ValueError:
274
275
 
275
276
        try:
276
277
            instance = self.compute_api.get(context, id)
277
 
            scheduler_api.live_migration(context,
 
278
            self.scheduler_rpcapi.live_migration(context,
278
279
                    block_migration,
279
280
                    disk_over_commit,
280
281
                    instance["id"],