Package ganeti :: Package masterd :: Module instance :: Class ExportInstanceHelper
[hide private]
[frames] | no frames]

Class ExportInstanceHelper

source code


Instance Methods [hide private]
 
__init__(self, lu, feedback_fn, instance)
Initializes this class.
source code
 
_SnapshotsReady(self)
Returns true if snapshots are ready to be used in exports.
source code
bool
CreateSnapshots(self)
Attempts to create a snapshot for every disk of the instance.
source code
 
_RemoveSnapshot(self, disk_index)
Removes an LVM snapshot.
source code
list of objects.Disk
_GetDisksToTransfer(self)
Returns disks to be transferred, whether snapshots or instance disks.
source code
string
_GetDiskLabel(self, idx)
Returns a label which should be used to represent a disk to transfer.
source code
 
LocalExport(self, dest_node, compress)
Intra-cluster instance export.
source code
 
RemoteExport(self, disk_info, key_name, dest_ca_pem, compress, timeouts)
Inter-cluster instance export.
source code
 
_TransferFinished(self, idx)
Called once a transfer has finished.
source code
 
Cleanup(self)
Remove all snapshots.
source code

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, lu, feedback_fn, instance)
(Constructor)

source code 

Initializes this class.

Parameters:
  • lu - Logical unit instance
  • feedback_fn - Feedback function
  • instance (objects.Instance) - Instance object
Overrides: object.__init__

CreateSnapshots(self)

source code 

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

Currently support drbd, plain and ext disk templates.

Returns: bool
Whether following transfers can use snapshots

_RemoveSnapshot(self, disk_index)

source code 

Removes an LVM snapshot.

Parameters:
  • disk_index (number) - Index of the snapshot to be removed

_GetDisksToTransfer(self)

source code 

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

Returns: list of objects.Disk
The disks to transfer

_GetDiskLabel(self, idx)

source code 

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

Parameters:
  • idx (int) - The disk index
Returns: string

LocalExport(self, dest_node, compress)

source code 

Intra-cluster instance export.

Parameters:
  • dest_node (objects.Node) - Destination node
  • compress (string) - Compression tool to use

RemoteExport(self, disk_info, key_name, dest_ca_pem, compress, timeouts)

source code 

Inter-cluster instance export.

Parameters:
  • disk_info (list) - Per-disk destination information
  • key_name (string) - Name of X509 key to use
  • dest_ca_pem (string) - Destination X509 CA in PEM format
  • compress (string) - Compression tool to use
  • timeouts (ImportExportTimeouts) - Timeouts for this import

_TransferFinished(self, idx)

source code 

Called once a transfer has finished.

Parameters:
  • idx (number) - Disk index