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:
-
The list of local peers must contain only
LocalPeer
objects
-
The list of remote peers must contain only
RemotePeer
objects
Note:
Lists within this class are "unordered" for equality
comparisons.
|
__init__(self,
localPeers=None,
remotePeers=None)
Constructor for the PeersConfig class. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
_getLocalPeers(self)
Property target used to get the local 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__
|
__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__
|
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__
|
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.
|
Indicates whether any peers are filled into this object.
- Returns:
- Boolean true if any local or remote peers are filled in, false
otherwise.
|
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.
|
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
|
localPeers
List of local peers.
- Get Method:
- _getLocalPeers(self)
- Property target used to get the local peers list.
- Set Method:
- _setLocalPeers(self,
value)
- Property target used to set the local peers list.
|
remotePeers
List of remote peers.
- Get Method:
- _getRemotePeers(self)
- Property target used to get the remote peers list.
- Set Method:
- _setRemotePeers(self,
value)
- Property target used to set the remote peers list.
|