diff options
| author | Chris Behrens <cbehrens@codestud.com> | 2011-05-23 16:51:28 -0500 |
|---|---|---|
| committer | Chris Behrens <cbehrens@codestud.com> | 2011-05-23 16:51:28 -0500 |
| commit | 42c209d90f491d19b3aabc70f8dafc33b76cf20d (patch) | |
| tree | a521166ff42a92e331923a0cf20c12597c9d7218 /plugins | |
| parent | 94766fac0f5fdb3c7847b1129a8f05948a97f887 (diff) | |
| download | nova-42c209d90f491d19b3aabc70f8dafc33b76cf20d.tar.gz nova-42c209d90f491d19b3aabc70f8dafc33b76cf20d.tar.xz nova-42c209d90f491d19b3aabc70f8dafc33b76cf20d.zip | |
fix tests, have glance plugin return json encoded string of vdi uuids
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/xenserver/xenapi/etc/xapi.d/plugins/glance | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance index 6cc7617e0..0d02adfe9 100644 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance @@ -22,6 +22,10 @@ # import httplib +try: + import json +except ImportError: + import simplejson as json import os import os.path import pickle @@ -335,7 +339,7 @@ def download_vhd(session, args): try: _download_tarball(sr_path, staging_path, image_id, glance_host, glance_port) - return _fixup_vhds(sr_path, staging_path, uuid_stack) + return json.dumps(_fixup_vhds(sr_path, staging_path, uuid_stack)) finally: _cleanup_staging_area(staging_path) |
