summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorChris Behrens <cbehrens@codestud.com>2011-05-23 16:51:28 -0500
committerChris Behrens <cbehrens@codestud.com>2011-05-23 16:51:28 -0500
commit42c209d90f491d19b3aabc70f8dafc33b76cf20d (patch)
treea521166ff42a92e331923a0cf20c12597c9d7218 /plugins
parent94766fac0f5fdb3c7847b1129a8f05948a97f887 (diff)
downloadnova-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/glance6
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)