From efb08d757f877650581cffb4e43817718b45aca2 Mon Sep 17 00:00:00 2001 From: ssamson-tis Date: Tue, 28 Jul 2015 10:48:45 +0200 Subject: [PATCH] Compress xva export --- libtisbackup/backup_xva.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libtisbackup/backup_xva.py b/libtisbackup/backup_xva.py index f737726..2237886 100755 --- a/libtisbackup/backup_xva.py +++ b/libtisbackup/backup_xva.py @@ -45,13 +45,14 @@ class backup_xva(backup_generic): type = 'xen-xva' required_params = backup_generic.required_params + ['xcphost','password_file','server_name'] - optional_params = backup_generic.optional_params + ['enable_https', 'halt_vm', 'verify_export', 'reuse_snapshot', 'ignore_proxies'] + optional_params = backup_generic.optional_params + ['enable_https', 'halt_vm', 'verify_export', 'reuse_snapshot', 'ignore_proxies', 'use_compression' ] enable_https = "no" halt_vm = "no" verify_export = "no" reuse_snapshot = "no" ignore_proxies = "yes" + use_compression = "true" if str2bool(ignore_proxies) == True: os.environ['http_proxy']="" @@ -150,8 +151,8 @@ class backup_xva(backup_generic): scheme = "http://" if str2bool(enable_https) == True: scheme = "https://" - url = scheme+user_xen+":"+password_xen+"@"+self.xcphost+"/export?uuid="+session.xenapi.VM.get_uuid(vm) - + url = scheme+user_xen+":"+password_xen+"@"+self.xcphost+"/export?use_compression="+self.use_compression+"&uuid="+session.xenapi.VM.get_uuid(vm) + urllib.urlretrieve(url, filename_temp) urllib.urlcleanup()