Package archipelagentvmcasting :: Module appliancecompresser :: Class TNApplianceCompresser
[hide private]
[frames] | no frames]

Class TNApplianceCompresser

source code

        object --+        
                 |        
threading._Verbose --+    
                     |    
      threading.Thread --+
                         |
                        TNApplianceCompresser

Instance Methods [hide private]
 
__init__(self, name, paths, xml_definition, xml_snapshots, working_dir, vm_dir, hypervisor_repo_path, success_callback, error_callback, entity, should_gzip)
Initialize a TNApplianceCompresser.
source code
 
run(self)
run the thread
source code
string
compress_disk(self, path)
Perform compression of disk.
source code

Inherited from threading.Thread: __repr__, daemon, getName, ident, isAlive, isDaemon, is_alive, join, name, setDaemon, setName, start

Inherited from threading.Thread (private): _set_daemon, _set_ident

Inherited from threading._Verbose (private): _note

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, paths, xml_definition, xml_snapshots, working_dir, vm_dir, hypervisor_repo_path, success_callback, error_callback, entity, should_gzip)
(Constructor)

source code 

Initialize a TNApplianceCompresser.

Parameters:
  • name (string) - the name of the package
  • paths (array) - the paths of things to compress
  • xml_definition (xmpp.Node) - the XML description of virtual machine
  • xml_snapshots (xmpp.Node) - the XML description of snapshot
  • working_dir (string) - the path of the working dir
  • vm_dir (string) - the path of the vm folder
  • hypervisor_repo_path (string) - the path for the hypervisor repository
  • success_callback (function) - called when compression is done
  • error_callback (function) - called if any error occurs
  • entity (TNArchipelEntity) - The requester virtual machine
  • should_gzip (Boolean) - if set to False, TNApplianceCompresser will not gzip drives (faster but bigger)
Overrides: object.__init__

run(self)

source code 

run the thread

Overrides: threading.Thread.run

compress_disk(self, path)

source code 

Perform compression of disk.

Parameters:
  • path (string) - the relative disk path
Returns: string
zipped disk path