Package CedarBackup2 :: Module config :: Class RemotePeer
[hide private]
[frames] | no frames]

Class RemotePeer

source code

object --+
         |
        RemotePeer

Class representing a Cedar Backup peer.

As with all of the other classes that represent configuration sections, all of these values are optional. It is up to some higher-level construct to decide whether everything they need is filled in. Some validation is done on non-None assignments through the use of the Python property() construct.

The following restrictions exist on data in this class:

Instance Methods [hide private]
 
__init__(self, name=None, collectDir=None, remoteUser=None, rcpCommand=None, rshCommand=None, cbackCommand=None, managed=True, managedActions=None, ignoreFailureMode=None)
Constructor for the RemotePeer class.
source code
 
__repr__(self)
Official string representation for class instance.
source code
 
__str__(self)
Informal string representation for class instance.
source code
 
__cmp__(self, other)
Definition of equals operator for this class.
source code
 
_setName(self, value)
Property target used to set the peer name.
source code
 
_getName(self)
Property target used to get the peer name.
source code
 
_setCollectDir(self, value)
Property target used to set the collect directory.
source code
 
_getCollectDir(self)
Property target used to get the collect directory.
source code
 
_setRemoteUser(self, value)
Property target used to set the remote user.
source code
 
_getRemoteUser(self)
Property target used to get the remote user.
source code
 
_setRcpCommand(self, value)
Property target used to set the rcp command.
source code
 
_getRcpCommand(self)
Property target used to get the rcp command.
source code
 
_setRshCommand(self, value)
Property target used to set the rsh command.
source code
 
_getRshCommand(self)
Property target used to get the rsh command.
source code
 
_setCbackCommand(self, value)
Property target used to set the cback command.
source code
 
_getCbackCommand(self)
Property target used to get the cback command.
source code
 
_setManaged(self, value)
Property target used to set the managed flag.
source code
 
_getManaged(self)
Property target used to get the managed flag.
source code
 
_setManagedActions(self, value)
Property target used to set the managed actions list.
source code
 
_getManagedActions(self)
Property target used to get the managed actions list.
source code
 
_setIgnoreFailureMode(self, value)
Property target used to set the ignoreFailure mode.
source code
 
_getIgnoreFailureMode(self)
Property target used to get the ignoreFailure mode.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Properties [hide private]
  name
Name of the peer, must be a valid hostname.
  collectDir
Collect directory to stage files from on peer.
  remoteUser
Name of backup user on remote peer.
  rcpCommand
Overridden rcp-compatible copy command for peer.
  rshCommand
Overridden rsh-compatible remote shell command for peer.
  cbackCommand
Overridden cback-compatible command to use on remote peer.
  managed
Indicates whether this is a managed peer.
  managedActions
Overridden set of actions that are managed on the peer.
  ignoreFailureMode
Ignore failure mode for peer.

Inherited from object: __class__

Method Details [hide private]

__init__(self, name=None, collectDir=None, remoteUser=None, rcpCommand=None, rshCommand=None, cbackCommand=None, managed=True, managedActions=None, ignoreFailureMode=None)
(Constructor)

source code 
Constructor for the RemotePeer class.
Parameters:
  • name - Name of the peer, must be a valid hostname.
  • collectDir - Collect directory to stage files from on peer.
  • remoteUser - Name of backup user on remote peer.
  • rcpCommand - Overridden rcp-compatible copy command for peer.
  • rshCommand - Overridden rsh-compatible remote shell command for peer.
  • cbackCommand - Overridden cback-compatible command to use on remote peer.
  • managed - Indicates whether this is a managed peer.
  • managedActions - Overridden set of actions that are managed on the peer.
  • ignoreFailureMode - Ignore failure mode for peer.
Raises:
  • ValueError - If one of the values is invalid.
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 
Official string representation for class instance.
Overrides: object.__repr__

__str__(self)
(Informal representation operator)

source code 
Informal string representation for class instance.
Overrides: object.__str__

__cmp__(self, other)
(Comparison operator)

source code 
Definition of equals operator for this class.
Parameters:
  • other - Other object to compare to.
Returns:
-1/0/1 depending on whether self is <, = or > other.

_setName(self, value)

source code 
Property target used to set the peer name. The value must be a non-empty string if it is not None.
Raises:
  • ValueError - If the value is an empty string.

_setCollectDir(self, value)

source code 
Property target used to set the collect directory. The value must be an absolute path if it is not None. It does not have to exist on disk at the time of assignment.
Raises:
  • ValueError - If the value is not an absolute path.
  • ValueError - If the value cannot be encoded properly.

_setRemoteUser(self, value)

source code 
Property target used to set the remote user. The value must be a non-empty string if it is not None.
Raises:
  • ValueError - If the value is an empty string.

_setRcpCommand(self, value)

source code 
Property target used to set the rcp command. The value must be a non-empty string if it is not None.
Raises:
  • ValueError - If the value is an empty string.

_setRshCommand(self, value)

source code 
Property target used to set the rsh command. The value must be a non-empty string if it is not None.
Raises:
  • ValueError - If the value is an empty string.

_setCbackCommand(self, value)

source code 
Property target used to set the cback command. The value must be a non-empty string if it is not None.
Raises:
  • ValueError - If the value is an empty string.

_setManaged(self, value)

source code 
Property target used to set the managed flag. No validations, but we normalize the value to True or False.

_setManagedActions(self, value)

source code 
Property target used to set the managed actions list. Elements do not have to exist on disk at the time of assignment.

_setIgnoreFailureMode(self, value)

source code 
Property target used to set the ignoreFailure mode. If not None, the mode must be one of the values in VALID_FAILURE_MODES.
Raises:
  • ValueError - If the value is not valid.

Property Details [hide private]

name

Name of the peer, must be a valid hostname.
Get Method:
CedarBackup2.config.RemotePeer._getName(self) - Property target used to get the peer name.
Set Method:
CedarBackup2.config.RemotePeer._setName(self, value) - Property target used to set the peer name.

collectDir

Collect directory to stage files from on peer.
Get Method:
CedarBackup2.config.RemotePeer._getCollectDir(self) - Property target used to get the collect directory.
Set Method:
CedarBackup2.config.RemotePeer._setCollectDir(self, value) - Property target used to set the collect directory.

remoteUser

Name of backup user on remote peer.
Get Method:
CedarBackup2.config.RemotePeer._getRemoteUser(self) - Property target used to get the remote user.
Set Method:
CedarBackup2.config.RemotePeer._setRemoteUser(self, value) - Property target used to set the remote user.

rcpCommand

Overridden rcp-compatible copy command for peer.
Get Method:
CedarBackup2.config.RemotePeer._getRcpCommand(self) - Property target used to get the rcp command.
Set Method:
CedarBackup2.config.RemotePeer._setRcpCommand(self, value) - Property target used to set the rcp command.

rshCommand

Overridden rsh-compatible remote shell command for peer.
Get Method:
CedarBackup2.config.RemotePeer._getRshCommand(self) - Property target used to get the rsh command.
Set Method:
CedarBackup2.config.RemotePeer._setRshCommand(self, value) - Property target used to set the rsh command.

cbackCommand

Overridden cback-compatible command to use on remote peer.
Get Method:
CedarBackup2.config.RemotePeer._getCbackCommand(self) - Property target used to get the cback command.
Set Method:
CedarBackup2.config.RemotePeer._setCbackCommand(self, value) - Property target used to set the cback command.

managed

Indicates whether this is a managed peer.
Get Method:
CedarBackup2.config.RemotePeer._getManaged(self) - Property target used to get the managed flag.
Set Method:
CedarBackup2.config.RemotePeer._setManaged(self, value) - Property target used to set the managed flag.

managedActions

Overridden set of actions that are managed on the peer.
Get Method:
CedarBackup2.config.RemotePeer._getManagedActions(self) - Property target used to get the managed actions list.
Set Method:
CedarBackup2.config.RemotePeer._setManagedActions(self, value) - Property target used to set the managed actions list.

ignoreFailureMode

Ignore failure mode for peer.
Get Method:
CedarBackup2.config.RemotePeer._getIgnoreFailureMode(self) - Property target used to get the ignoreFailure mode.
Set Method:
CedarBackup2.config.RemotePeer._setIgnoreFailureMode(self, value) - Property target used to set the ignoreFailure mode.