diff options
| author | Matt Dietz <matt.dietz@rackspace.com> | 2011-09-23 15:36:50 -0500 |
|---|---|---|
| committer | Matt Dietz <matt.dietz@rackspace.com> | 2011-09-23 15:38:36 -0500 |
| commit | 774b5aaa173fa04675be5252c5d47f67a07347ac (patch) | |
| tree | 60416f512ce6c2c873b79b7c00e95875e5c36864 /plugins | |
| parent | 4e94ec1a0a566b66f09b734e6ffe964b4b3b4bee (diff) | |
| download | nova-774b5aaa173fa04675be5252c5d47f67a07347ac.tar.gz nova-774b5aaa173fa04675be5252c5d47f67a07347ac.tar.xz nova-774b5aaa173fa04675be5252c5d47f67a07347ac.zip | |
Adds disk config
Change-Id: If3e1765b659ead77f9cdaaa86ee8478a82bf67c0
Diffstat (limited to 'plugins')
| -rwxr-xr-x | plugins/xenserver/xenapi/etc/xapi.d/plugins/glance | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance index 950b78707..e7bf7e5a8 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance @@ -246,7 +246,7 @@ def _prepare_staging_area_for_upload(sr_path, staging_path, vdi_uuids): def _upload_tarball(staging_path, image_id, glance_host, glance_port, os_type, - auth_token): + auth_token, options): """ Create a tarball of the image and then stream that into Glance using chunked-transfer-encoded HTTP. @@ -293,6 +293,9 @@ def _upload_tarball(staging_path, image_id, glance_host, glance_port, os_type, 'x-image-meta-container-format': 'ovf', 'x-image-meta-property-os-type': os_type} + if options.get('managed_disk'): + headers['x-image-meta-property-managed-disk'] = options['managed_disk'] + # If we have an auth_token, set an x-auth-token header if auth_token: ovf_headers['x-auth-token'] = auth_token @@ -424,12 +427,13 @@ def upload_vhd(session, args): sr_path = params["sr_path"] os_type = params["os_type"] auth_token = params["auth_token"] + options = params["options"] staging_path = _make_staging_area(sr_path) try: _prepare_staging_area_for_upload(sr_path, staging_path, vdi_uuids) _upload_tarball(staging_path, image_id, glance_host, glance_port, - os_type, auth_token) + os_type, auth_token, options) finally: _cleanup_staging_area(staging_path) |
