summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRick Harris <rick.harris@rackspace.com>2011-02-15 21:36:13 +0000
committerRick Harris <rick.harris@rackspace.com>2011-02-15 21:36:13 +0000
commit1d72b9d3ddc835d788ba1fec1a937c2788e94b38 (patch)
treefe7fbf31e6b3084d5b0b9385e36ecf46be2f0105 /plugins
parent300657f298fbecf9a08792b6d15e462560a6cdf5 (diff)
downloadnova-1d72b9d3ddc835d788ba1fec1a937c2788e94b38.tar.gz
nova-1d72b9d3ddc835d788ba1fec1a937c2788e94b38.tar.xz
nova-1d72b9d3ddc835d788ba1fec1a937c2788e94b38.zip
Using Nova style nokernel
Diffstat (limited to 'plugins')
-rw-r--r--plugins/xenserver/xenapi/etc/xapi.d/plugins/glance9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance
index dac773ff1..75bdda2c6 100644
--- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance
+++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance
@@ -182,15 +182,19 @@ def _upload_tarball(staging_path, image_id, glance_host, glance_port):
using chunked-transfer-encoded HTTP.
"""
conn = httplib.HTTPConnection(glance_host, glance_port)
- #NOTE(sirp): httplib under python2.4 won't accept a file-like object
+ # NOTE(sirp): httplib under python2.4 won't accept a file-like object
# to request
conn.putrequest('PUT', '/images/%s' % image_id)
+ # FIXME(sirp): nokernel signals Nova to use a raw image. This is defined by
+ # FLAGS.null_kernel. Is there a way to get rid of this?
headers = {
'x-image-meta-store': 'file',
'x-image-meta-is_public': 'True',
'x-image-meta-type': 'raw',
'x-image-meta-property-disk-format': 'vhd',
+ 'x-image-meta-property-kernel-id': 'nokernel',
+ 'x-image-meta-property-ramdisk-id': 'noramdisk',
'x-image-meta-property-container-format': 'tarball',
'transfer-encoding': "chunked",
'content-type': 'application/octet-stream',
@@ -251,7 +255,6 @@ def _make_staging_area(sr_path):
guarantee that it resides within the same filesystem and therefore permit
hard-linking and cheap file moves.
"""
- # NOTE(sirp): staging area is created in SR to allow hard-linking
staging_path = tempfile.mkdtemp(dir=sr_path)
return staging_path
@@ -314,7 +317,7 @@ def upload_image(session, args):
finally:
_cleanup_staging_area(staging_path)
- return ""
+ return "" # Nothing useful to return on an upload
def copy_kernel_vdi(session,args):