diff options
| author | Ewan Mellor <ewan.mellor@citrix.com> | 2011-01-12 11:35:13 +0000 |
|---|---|---|
| committer | Ewan Mellor <ewan.mellor@citrix.com> | 2011-01-12 11:35:13 +0000 |
| commit | 3461b9cf49201eb88ed65473eccf395382c25611 (patch) | |
| tree | 533347e54306a0345279b4a72d48646258361146 /plugins | |
| parent | 6f9408d7ac38d5c857e1e1cdd92c49e000742734 (diff) | |
| parent | 2f9ac0fd02115ff9af2e96f5a92f3442d273c6b0 (diff) | |
| download | nova-3461b9cf49201eb88ed65473eccf395382c25611.tar.gz nova-3461b9cf49201eb88ed65473eccf395382c25611.tar.xz nova-3461b9cf49201eb88ed65473eccf395382c25611.zip | |
Merged with Orlando's recent changes.
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/xenserver/xenapi/etc/xapi.d/plugins/glance | 3 | ||||
| -rwxr-xr-x | plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance index 7f0b375e1..97cf32dcf 100644 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/glance @@ -18,7 +18,7 @@ # under the License. # -# XenAPI plugin for putting images into glance +# XenAPI plugin for managing glance images # import base64 @@ -62,6 +62,7 @@ def _copy_kernel_vdi(dest,copy_args): #read data from /dev/ and write into a file on /boot/guest of=open(filename,'wb') f=open(dest,'rb') + #copy only vdi_size bytes data=f.read(vdi_size) of.write(data) f.close() diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py b/plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py index 17fcd474e..8e7a829d5 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/pluginlib_nova.py @@ -154,7 +154,7 @@ def create_vdi(session, sr_ref, name_label, virtual_size, read_only): return vdi_ref -def with_vdi_in_dom0(session, vdi, read_only, f,args=None): +def with_vdi_in_dom0(session, vdi, read_only, f): dom0 = get_domain_0(session) vbd_rec = {} vbd_rec['VM'] = dom0 @@ -176,7 +176,7 @@ def with_vdi_in_dom0(session, vdi, read_only, f,args=None): logging.debug('Plugging VBD %s ... ', vbd) session.xenapi.VBD.plug(vbd) logging.debug('Plugging VBD %s done.', vbd) - return f(session.xenapi.VBD.get_device(vbd),args) + return f(session.xenapi.VBD.get_device(vbd)) finally: logging.debug('Destroying VBD for VDI %s ... ', vdi) vbd_unplug_with_retry(session, vbd) |
