class documentation

class ExportInstanceHelper(object):

View In Hierarchy

Undocumented

Method __init__ Initializes this class.
Method Cleanup Remove all snapshots.
Method CreateSnapshots Attempts to create a snapshot for every disk of the instance.
Method LocalExport Intra-cluster instance export.
Method RemoteExport Inter-cluster instance export.
Method _GetDiskLabel Returns a label which should be used to represent a disk to transfer.
Method _GetDisksToTransfer Returns disks to be transferred, whether snapshots or instance disks.
Method _RemoveSnapshot Removes an LVM snapshot.
Method _SnapshotsReady Returns true if snapshots are ready to be used in exports.
Method _TransferFinished Called once a transfer has finished.
Instance Variable _feedback_fn Undocumented
Instance Variable _instance Undocumented
Instance Variable _lu Undocumented
Instance Variable _snapshots Undocumented
Instance Variable _snapshots_removed Undocumented
def __init__(self, lu, feedback_fn, instance):

Initializes this class.

Parameters
luLogical unit instance
feedback_fnFeedback function
instance:objects.InstanceInstance object
def Cleanup(self):

Remove all snapshots.

def CreateSnapshots(self):

Attempts to create a snapshot for every disk of the instance.

Currently support drbd, plain and ext disk templates.

Returns
boolWhether following transfers can use snapshots
def LocalExport(self, dest_node, compress):

Intra-cluster instance export.

Parameters
dest_node:objects.NodeDestination node
compress:stringCompression tool to use
def RemoteExport(self, disk_info, key_name, dest_ca_pem, compress, timeouts):

Inter-cluster instance export.

Parameters
disk_info:listPer-disk destination information
key_name:stringName of X509 key to use
dest_ca_pem:stringDestination X509 CA in PEM format
compress:stringCompression tool to use
timeouts:ImportExportTimeoutsTimeouts for this import
def _GetDiskLabel(self, idx):

Returns a label which should be used to represent a disk to transfer.

Parameters
idx:intThe disk index
Returns
stringUndocumented
def _GetDisksToTransfer(self):

Returns disks to be transferred, whether snapshots or instance disks.

Returns
list of objects.DiskThe disks to transfer
def _RemoveSnapshot(self, disk_index):

Removes an LVM snapshot.

Parameters
disk_index:numberIndex of the snapshot to be removed
def _SnapshotsReady(self):

Returns true if snapshots are ready to be used in exports.

def _TransferFinished(self, idx):

Called once a transfer has finished.

Parameters
idx:numberDisk index
_feedback_fn =

Undocumented

_instance =

Undocumented

_lu =

Undocumented

_snapshots =

Undocumented

_snapshots_removed =

Undocumented