Package ganeti :: Package storage :: Module drbd_cmdgen :: Class DRBD83CmdGenerator
[hide private]
[frames] | no frames]

Class DRBD83CmdGenerator

source code


Generates drbdsetup commands suited for the DRBD <= 8.3 syntax.

Instance Methods [hide private]
 
__init__(self, version)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
GenShowCmd(self, minor) source code
 
GenInitMetaCmd(self, minor, meta_dev) source code
 
GenLocalInitCmds(self, minor, data_dev, meta_dev, size_mb, params) source code
 
GenNetInitCmd(self, minor, family, lhost, lport, rhost, rport, protocol, dual_pri, hmac, secret, params) source code
 
GenSyncParamsCmd(self, minor, params) source code
 
GenPauseSyncCmd(self, minor) source code
 
GenResumeSyncCmd(self, minor) source code
 
GenPrimaryCmd(self, minor, force) source code
 
GenSecondaryCmd(self, minor) source code
 
GenDetachCmd(self, minor) source code
 
GenDisconnectCmd(self, minor, family, lhost, lport, rhost, rport) source code
 
GenDownCmd(self, minor) source code
 
GenResizeCmd(self, minor, size_mb) source code

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

Class Methods [hide private]
 
_ComputeDiskBarrierArgs(cls, vmaj, vmin, vrel, disabled_barriers, disable_meta_flush)
Compute the DRBD command line parameters for disk barriers
source code
Static Methods [hide private]

Inherited from BaseDRBDCmdGenerator (private): _DevPath

Class Variables [hide private]
  _DISABLE_DISK_OPTION = "--no-disk-barrier"
  _DISABLE_DRAIN_OPTION = "--no-disk-drain"
  _DISABLE_FLUSH_OPTION = "--no-disk-flushes"
  _DISABLE_META_FLUSH_OPTION = "--no-md-flushes"
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, version)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

GenShowCmd(self, minor)

source code 
Overrides: BaseDRBDCmdGenerator.GenShowCmd

GenInitMetaCmd(self, minor, meta_dev)

source code 
Overrides: BaseDRBDCmdGenerator.GenInitMetaCmd

GenLocalInitCmds(self, minor, data_dev, meta_dev, size_mb, params)

source code 
Overrides: BaseDRBDCmdGenerator.GenLocalInitCmds

GenNetInitCmd(self, minor, family, lhost, lport, rhost, rport, protocol, dual_pri, hmac, secret, params)

source code 
Overrides: BaseDRBDCmdGenerator.GenNetInitCmd

GenSyncParamsCmd(self, minor, params)

source code 
Overrides: BaseDRBDCmdGenerator.GenSyncParamsCmd

GenPauseSyncCmd(self, minor)

source code 
Overrides: BaseDRBDCmdGenerator.GenPauseSyncCmd

GenResumeSyncCmd(self, minor)

source code 
Overrides: BaseDRBDCmdGenerator.GenResumeSyncCmd

GenPrimaryCmd(self, minor, force)

source code 
Overrides: BaseDRBDCmdGenerator.GenPrimaryCmd

GenSecondaryCmd(self, minor)

source code 
Overrides: BaseDRBDCmdGenerator.GenSecondaryCmd

GenDetachCmd(self, minor)

source code 
Overrides: BaseDRBDCmdGenerator.GenDetachCmd

GenDisconnectCmd(self, minor, family, lhost, lport, rhost, rport)

source code 
Overrides: BaseDRBDCmdGenerator.GenDisconnectCmd

GenDownCmd(self, minor)

source code 
Overrides: BaseDRBDCmdGenerator.GenDownCmd

GenResizeCmd(self, minor, size_mb)

source code 
Overrides: BaseDRBDCmdGenerator.GenResizeCmd

_ComputeDiskBarrierArgs(cls, vmaj, vmin, vrel, disabled_barriers, disable_meta_flush)
Class Method

source code 

Compute the DRBD command line parameters for disk barriers

Returns a list of the disk barrier parameters as requested via the disabled_barriers and disable_meta_flush arguments, and according to the supported ones in the DRBD version vmaj.vmin.vrel

If the desired option is unsupported, raises errors.BlockDeviceError.