Updated nova-manage to work with uuid images

Fixes bug 899299

Change-Id: Ib0be692503b8761a5600902a1e0d7a4dc371a680
This commit is contained in:
Ghe Rivero 2011-12-02 19:02:58 +01:00
parent ae697c4f36
commit 2c438f55be
3 changed files with 5 additions and 3 deletions

View File

@ -20,6 +20,7 @@
<devin.carlen@gmail.com> <devcamcar@illian.local>
<edouard1.thuleau@orange.com> <thuleau@gmail.com>
<ewan.mellor@citrix.com> <emellor@silver>
<ghe@debian.org> <ghe.rivero@gmail.com>
<itoumsn@nttdata.co.jp> <itoumsn@shayol>
<jake@ansolabs.com> <jake@markupisart.com>
<jake@ansolabs.com> <admin@jakedahn.com>

View File

@ -73,6 +73,7 @@ Josh Durgin <joshd@hq.newdream.net>
Josh Kearney <josh@jk0.org>
Josh Kleinpeter <josh@kleinpeter.org>
Joshua McKenty <jmckenty@gmail.com>
Juan G. Hernando Rivero <ghe@debian.org>
Julien Danjou <julien.danjou@enovance.com>
Justin Santa Barbara <justin@fathomdb.com>
Justin Shepherd <jshepher@rackspace.com>

View File

@ -1812,15 +1812,15 @@ class ImageCommands(object):
'architecture': architecture,
'image_location': 'local'}}
if kernel_id:
meta['properties']['kernel_id'] = int(kernel_id)
meta['properties']['kernel_id'] = kernel_id
if ramdisk_id:
meta['properties']['ramdisk_id'] = int(ramdisk_id)
meta['properties']['ramdisk_id'] = ramdisk_id
elevated = context.get_admin_context()
try:
with open(path) as ifile:
image = self.image_service.create(elevated, meta, ifile)
new = image['id']
print _("Image registered to %(new)s (%(new)08x).") % locals()
print _("Image registered to %(new)s (%(path)s).") % locals()
return new
except Exception as exc:
print _("Failed to register %(path)s: %(exc)s") % locals()