projects
/
ganeti-local
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TryOSFromDisk: s/os_scripts/os_files/
[ganeti-local]
/
lib
/
confd
/
client.py
diff --git
a/lib/confd/client.py
b/lib/confd/client.py
index
b12a730
..
e944431
100644
(file)
--- a/
lib/confd/client.py
+++ b/
lib/confd/client.py
@@
-101,12
+101,10
@@
class ConfdClient:
@keyword logger: optional logger for internal conditions
"""
@keyword logger: optional logger for internal conditions
"""
- if not isinstance(peers, list):
- raise errors.ProgrammerError("peers must be a list")
if not callable(callback):
raise errors.ProgrammerError("callback must be callable")
if not callable(callback):
raise errors.ProgrammerError("callback must be callable")
- self._peers = peers
+ self.UpdatePeerList(peers)
self._hmac_key = hmac_key
self._socket = ConfdAsyncUDPClient(self)
self._callback = callback
self._hmac_key = hmac_key
self._socket = ConfdAsyncUDPClient(self)
self._callback = callback
@@
-118,6
+116,17
@@
class ConfdClient:
if self._confd_port is None:
self._confd_port = utils.GetDaemonPort(constants.CONFD)
if self._confd_port is None:
self._confd_port = utils.GetDaemonPort(constants.CONFD)
+ def UpdatePeerList(self, peers):
+ """Update the list of peers
+
+ @type peers: list
+ @param peers: list of peer nodes
+
+ """
+ if not isinstance(peers, list):
+ raise errors.ProgrammerError("peers must be a list")
+ self._peers = peers
+
def _PackRequest(self, request, now=None):
"""Prepare a request to be sent on the wire.
def _PackRequest(self, request, now=None):
"""Prepare a request to be sent on the wire.