Script move_instance :: Class MoveRuntime
[hide private]
[frames] | no frames]

Class MoveRuntime


Class to keep track of instance move.

Instance Methods [hide private]
 
__init__(self, move)
Initializes this class.
 
HandleErrors(self, prefix, fn, *args)
Wrapper to catch errors and abort threads.
 
CheckAbort(self)
Check whether thread should be aborted.
 
Wait(self, cond, check_fn)
Waits for a condition to become true.
 
PollJob(self, cl, job_id, remote_import_fn=None)
Wrapper for polling a job.

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, move)
(Constructor)

 

Initializes this class.

Parameters:
Overrides: object.__init__

HandleErrors(self, prefix, fn, *args)

 

Wrapper to catch errors and abort threads.

Parameters:
  • prefix (string) - Variable name prefix ("src" or "dest")
  • fn (callable) - Function

CheckAbort(self)

 

Check whether thread should be aborted.

Raises:
  • Abort - When thread should be aborted

Wait(self, cond, check_fn)

 

Waits for a condition to become true.

Parameters:
  • cond (threading.Condition) - Threading condition
  • check_fn (callable) - Function to check whether condition is true

PollJob(self, cl, job_id, remote_import_fn=None)

 

Wrapper for polling a job.

Parameters:
  • cl (rapi.client.GanetiRapiClient) - RAPI client
  • job_id (string) - Job ID
  • remote_import_fn (callable or None) - Callback for reporting received remote import information
Returns:
opreturn of the move job
Raises: