class documentation

class _DiskImportExportBase(object):

Known subclasses: ganeti.masterd.instance.DiskExport, ganeti.masterd.instance.DiskImport

View In Hierarchy

Undocumented

Method __init__ Initializes this class.
Method Abort Sends SIGTERM to import/export daemon (if still active).
Method CheckConnected Checks whether the daemon is connected.
Method CheckDaemon Checks whether daemon has been started and if not, starts it.
Method CheckFinished Checks whether the daemon exited.
Method CheckListening Checks whether the daemon is listening.
Method Finalize Finalizes this import/export.
Method GetDaemonName Returns the daemon name.
Method SetDaemonData Updates daemon status data.
Method SetLoop Sets the parent loop.
Constant MODE_TEXT Undocumented
Instance Variable final_message Undocumented
Instance Variable node_name Undocumented
Instance Variable node_uuid Undocumented
Instance Variable success Undocumented
Property active Determines whether this transport is still active.
Property loop Returns parent loop.
Property magic Returns the magic value for this import/export.
Property progress Returns transfer progress information.
Property recent_output Returns the most recent output from the daemon.
Method _CheckProgress Checks whether a progress update should be reported.
Method _Finalize Makes the RPC call to finalize this import/export.
Method _GetConnectedCheckEpoch Returns timeout to calculate connect timeout.
Method _ReportFinished Transfer is finished or daemon exited.
Method _SetDaemonData Internal function for updating status daemon data.
Method _StartDaemon Starts the import/export daemon.
Instance Variable _cbs Undocumented
Instance Variable _component Undocumented
Instance Variable _daemon Undocumented
Instance Variable _daemon_name Undocumented
Instance Variable _instance Undocumented
Instance Variable _loop Undocumented
Instance Variable _lu Undocumented
Instance Variable _opts Undocumented
Instance Variable _private Undocumented
Instance Variable _timeouts Undocumented
Instance Variable _ts_begin Undocumented
Instance Variable _ts_cleanup Undocumented
Instance Variable _ts_connected Undocumented
Instance Variable _ts_finished Undocumented
Instance Variable _ts_last_error Undocumented
Instance Variable _ts_last_progress Undocumented
def __init__(self, lu, node_uuid, opts, instance, component, timeouts, cbs, private=None):

Initializes this class.

Parameters
luLogical unit instance
node_uuid:stringNode UUID for import
opts:objects.ImportExportOptionsImport/export daemon options
instance:objects.InstanceInstance object
component:stringwhich part of the instance is being imported
timeouts:ImportExportTimeoutsTimeouts for this import
cbs:ImportExportCbBaseCallbacks
privatePrivate data for callback functions
def Abort(self):

Sends SIGTERM to import/export daemon (if still active).

def CheckConnected(self):

Checks whether the daemon is connected.

Returns
boolWhether the daemon is connected
def CheckDaemon(self):

Checks whether daemon has been started and if not, starts it.

Returns
stringDaemon name
def CheckFinished(self):

Checks whether the daemon exited.

Returns
boolWhether the transfer is finished
def CheckListening(self):

Checks whether the daemon is listening.

def Finalize(self, error=None):

Finalizes this import/export.

def GetDaemonName(self):

Returns the daemon name.

def SetDaemonData(self, success, data):

Updates daemon status data.

Parameters
success:boolWhether fetching data was successful or not
data:objects.ImportExportStatusDaemon status data
def SetLoop(self, loop):

Sets the parent loop.

Parameters
loop:ImportExportLoopUndocumented
MODE_TEXT =
final_message =

Undocumented

node_name =

Undocumented

node_uuid =

Undocumented

success =

Undocumented

@property
active =

Determines whether this transport is still active.

@property
loop: ImportExportLoop =

Returns parent loop.

@property
magic =

Returns the magic value for this import/export.

@property
progress =

Returns transfer progress information.

@property
recent_output =

Returns the most recent output from the daemon.

def _CheckProgress(self):

Checks whether a progress update should be reported.

def _Finalize(self):

Makes the RPC call to finalize this import/export.

def _GetConnectedCheckEpoch(self):

Returns timeout to calculate connect timeout.

def _ReportFinished(self, success, message):

Transfer is finished or daemon exited.

Parameters
success:boolWhether the transfer was successful
message:stringError message
def _SetDaemonData(self, data):

Internal function for updating status daemon data.

Parameters
data:objects.ImportExportStatusDaemon status data
def _StartDaemon(self):

Starts the import/export daemon.

_cbs =

Undocumented

_component =

Undocumented

_daemon =

Undocumented

_daemon_name =

Undocumented

_instance =

Undocumented

_loop =

Undocumented

_lu =

Undocumented

_opts =

Undocumented

_private =

Undocumented

_timeouts =

Undocumented

_ts_begin =

Undocumented

_ts_cleanup =

Undocumented

_ts_connected =

Undocumented

_ts_finished =

Undocumented

_ts_last_error =

Undocumented

_ts_last_progress =

Undocumented