module documentation

Instance-related functions and classes for masterd.

Class DiskExport No class docstring; 0/4 instance variable, 0/1 constant, 4/4 methods documented
Class DiskImport No class docstring; 1/1 property, 0/3 instance variable, 0/1 constant, 4/4 methods documented
Class DiskTransfer No class docstring; 0/6 instance variable, 1/1 method documented
Class ExportInstanceHelper No class docstring; 0/5 instance variable, 10/10 methods documented
Class ImportExportCbBase Callbacks for disk import/export.
Class ImportExportLoop No class docstring; 0/3 instance variable, 0/2 constant, 5/5 methods, 2/2 static methods documented
Class ImportExportTimeouts No class docstring; 0/5 instance variable, 0/1 class variable, 0/4 constant, 1/1 method documented
Function CalculateGroupIPolicy Calculate instance policy for group.
Function CheckRemoteExportDiskInfo Verifies received disk information for an export.
Function CheckRemoteExportHandshake Checks the handshake of a remote import/export.
Function ComputeDiskSize Compute disk size requirements according to disk template
Function ComputeRemoteExportHandshake Computes the remote import/export handshake.
Function ComputeRemoteImportDiskInfo Computes the signed disk information for a remote import.
Function FormatProgress Formats progress information for user consumption
Function RemoteImport Imports an instance from another cluster.
Function TransferInstanceData Transfers an instance's data from one node to another.
Class _DiskImportExportBase No class docstring; 5/5 properties, 0/20 instance variable, 0/1 constant, 16/16 methods documented
Class _DiskTransferPrivate No class docstring; 0/5 instance variable, 2/2 methods documented
Class _RemoteExportCb No class docstring; 1/1 property, 0/2 instance variable, 4/4 methods documented
Class _RemoteImportCb No class docstring; 1/1 property, 0/8 instance variable, 5/5 methods documented
Class _TransferInstCbBase No class docstring; 0/8 instance variable, 1/1 method documented
Class _TransferInstDestCb No class docstring; 3/3 methods documented
Class _TransferInstSourceCb No class docstring; 3/3 methods documented
Exception _ImportExportError Local exception to report import/export errors.
Function _GetImportExportHandshakeMessage Returns the handshake message for a RIE protocol version.
Function _GetInstDiskMagic Computes the magic value for a disk export or import.
Function _GetRieDiskInfoMessage Returns the hashed text for import/export disk information.
def CalculateGroupIPolicy(cluster, group):

Calculate instance policy for group.

def CheckRemoteExportDiskInfo(cds, disk_index, disk_info):

Verifies received disk information for an export.

Parameters
cds:stringCluster domain secret
disk_index:numberIndex of disk (included in hash)
disk_info:sequenceDisk information sent by remote peer
def CheckRemoteExportHandshake(cds, handshake):

Checks the handshake of a remote import/export.

Parameters
cds:stringCluster domain secret
handshake:sequenceHandshake sent by remote peer
def ComputeDiskSize(disks):

Compute disk size requirements according to disk template

def ComputeRemoteExportHandshake(cds):

Computes the remote import/export handshake.

Parameters
cds:stringCluster domain secret
def ComputeRemoteImportDiskInfo(cds, salt, disk_index, host, port, magic):

Computes the signed disk information for a remote import.

Parameters
cds:stringCluster domain secret
salt:stringHMAC salt
disk_index:numberIndex of disk (included in hash)
host:stringHostname
port:numberDaemon port
magic:stringMagic value
def FormatProgress(progress):

Formats progress information for user consumption

def RemoteImport(lu, feedback_fn, instance, pnode, source_x509_ca, cds, compress, timeouts):

Imports an instance from another cluster.

Parameters
luLogical unit instance
feedback_fnFeedback function
instance:objects.InstanceInstance object
pnode:objects.NodePrimary node of instance as an object
source_x509_ca:OpenSSL.crypto.X509Import source's X509 CA
cds:stringCluster domain secret
compress:stringCompression tool to use
timeouts:ImportExportTimeoutsTimeouts for this import
def TransferInstanceData(lu, feedback_fn, src_node_uuid, dest_node_uuid, dest_ip, compress, instance, all_transfers):

Transfers an instance's data from one node to another.

Parameters
luLogical unit instance
feedback_fnFeedback function
src_node_uuid:stringSource node UUID
dest_node_uuid:stringDestination node UUID
dest_ip:stringIP address of destination node
compress:stringCompression tool to use
instance:objects.InstanceInstance object
all_transfers:list of DiskTransfer instancesList of all disk transfers to be made
Returns
listList with a boolean (True=successful, False=failed) for success for each transfer
def _GetImportExportHandshakeMessage(version):

Returns the handshake message for a RIE protocol version.

Parameters
version:numberUndocumented
def _GetInstDiskMagic(base, instance_name, index):

Computes the magic value for a disk export or import.

Parameters
base:stringRandom seed value (can be the same for all disks of a transfer)
instance_name:stringName of instance
index:numberDisk index
def _GetRieDiskInfoMessage(disk_index, host, port, magic):

Returns the hashed text for import/export disk information.

Parameters
disk_index:numberIndex of disk (included in hash)
host:stringHostname
port:numberDaemon port
magic:stringMagic value