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

Class PeersConfig

source code

object --+
         |
        PeersConfig

Class representing Cedar Backup global peer configuration.

This section contains a list of local and remote peers in a master's backup pool. The section is optional. If a master does not define this section, then all peers are unmanaged, and the stage configuration section must explicitly list any peer that is to be staged. If this section is configured, then peers may be managed or unmanaged, and the stage section peer configuration (if any) completely overrides this configuration.

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.

The following restrictions exist on data in this class:


Note: Lists within this class are "unordered" for equality comparisons.

Instance Methods [hide private]
 
__init__(self, localPeers=None, remotePeers=None)
Constructor for the PeersConfig 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
 
hasPeers(self)
Indicates whether any peers are filled into this object.
source code
 
_setLocalPeers(self, value)
Property target used to set the local peers list.
source code
 
_getLocalPeers(self)
Property target used to get the local peers list.
source code
 
_setRemotePeers(self, value)
Property target used to set the remote peers list.
source code
 
_getRemotePeers(self)
Property target used to get the remote peers list.
source code

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

Properties [hide private]
  localPeers
List of local peers.
  remotePeers
List of remote peers.

Inherited from object: __class__

Method Details [hide private]

__init__(self, localPeers=None, remotePeers=None)
(Constructor)

source code 
Constructor for the PeersConfig class.
Parameters:
  • localPeers - List of local peers.
  • remotePeers - List of remote peers.
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. Lists within this class are "unordered" for equality comparisons.
Parameters:
  • other - Other object to compare to.
Returns:
-1/0/1 depending on whether self is <, = or > other.

hasPeers(self)

source code 
Indicates whether any peers are filled into this object.
Returns:
Boolean true if any local or remote peers are filled in, false otherwise.

_setLocalPeers(self, value)

source code 
Property target used to set the local peers list. Either the value must be None or each element must be a LocalPeer.
Raises:
  • ValueError - If the value is not an absolute path.

_setRemotePeers(self, value)

source code 
Property target used to set the remote peers list. Either the value must be None or each element must be a RemotePeer.
Raises:
  • ValueError - If the value is not a RemotePeer

Property Details [hide private]

localPeers

List of local peers.
Get Method:
CedarBackup2.config.PeersConfig._getLocalPeers(self) - Property target used to get the local peers list.
Set Method:
CedarBackup2.config.PeersConfig._setLocalPeers(self, value) - Property target used to set the local peers list.

remotePeers

List of remote peers.
Get Method:
CedarBackup2.config.PeersConfig._getRemotePeers(self) - Property target used to get the remote peers list.
Set Method:
CedarBackup2.config.PeersConfig._setRemotePeers(self, value) - Property target used to set the remote peers list.