CedarBackup2.config.PeersConfig

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.

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.

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__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

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: _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.