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

« back to all changes in this revision

Viewing changes to nova/api/ec2/cloud.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Adam Gandleman, Chuck Short
  • Date: 2012-03-02 11:04:04 UTC
  • mfrom: (1.1.47)
  • Revision ID: package-import@ubuntu.com-20120302110404-fr230yakr8hov3dj
Tags: 2012.1~e4-0ubuntu1
[ Adam Gandleman ]
* debian/patches/libvirt-use-console-pipe.patch: Refreshed. 
* debain/nova-volume.upstart.in: Ensure lock directory is created
  (LP: #940780)
* debain/control: Fix nova-compute-$flavor Depends
* debian/control: Add python-iso8601 to python-nova Depends

[ Chuck Short ]
* debian/rules: Fix FTBFS.
* Merge Ubuntu/Debian packaging:
  - Thanks to Julien Danjou, Ghe Rivero, and Thomas Goirand
  - debian/copyright: Update copyright file.
  - debian/nova-api.init, debian/nova-compute.init,
    debian/nova-network.init, debian/nova-objectstore,
    debian/nova-scheduler, debian/nova-volume.init:
    Synchronize init scripts.
  - nova-common.install, debian/rules: Install policy.json
  - debian/rules, debian/nova-xcp-network.install,
    debian/nova-xcp-plugins.install, nova-xcp-plugins.postrm,
    debian/nova-xcp-plugins.doc, debian/nova-xcp-plugins.postinst,
    debian/README.xcp_and_openstack, debian/control,
    debian/ubuntu_xen-openvswitch-nova.rules,
    debian/patches/path-to-the-xenhost.conf-fixup.patch:
    Add Xen XCP support.
  - debian/control,
    debian/nova-compute-{kvm,lxc,qemu,xen,uml}.postinst: Make
    nova-compute a virtual package.
  - Dropped ubuntu_ubuntu_control_vars: We dont use it
* New upstream release.
* Dropped python-babel, it will be handled by langpacks.
* debian/patches/ec2-fixes.patch: Backport turnk fix for ec2
  permissions.
* debian/patches/path-to-the-xenhost.conf-fixup.patch: Refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1424
1424
    def register_image(self, context, image_location=None, **kwargs):
1425
1425
        if image_location is None and 'name' in kwargs:
1426
1426
            image_location = kwargs['name']
 
1427
        if image_location is None:
 
1428
            raise exception.EC2APIError(_('imageLocation is required'))
 
1429
 
1427
1430
        metadata = {'properties': {'image_location': image_location}}
1428
1431
 
1429
1432
        if 'root_device_name' in kwargs:
1498
1501
        del(image['id'])
1499
1502
 
1500
1503
        image['is_public'] = (operation_type == 'add')
1501
 
        return self.image_service.update(context, internal_id, image)
 
1504
        try:
 
1505
            return self.image_service.update(context, internal_id, image)
 
1506
        except exception.ImageNotAuthorized:
 
1507
            msg = _('Not allowed to modify attributes for image %s')
 
1508
            raise exception.EC2APIError(msg % image_id)
1502
1509
 
1503
1510
    def update_image(self, context, image_id, **kwargs):
1504
1511
        internal_id = ec2utils.ec2_id_to_id(image_id)