This is an automated email from the git hooks/post-receive script.
firstyear pushed a commit to branch master
in repository 389-ds-base.
commit 6b4e0432f3c98c509b7c1e6d97a29b3cd08cad48
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Wed Dec 18 10:28:51 2013 -0700
fix deprecated repl args in dirsrv class - use default timeout of 120
Reviewed by: nkinder (Thanks!)
---
src/lib389/lib389/__init__.py | 16 +++++++++++-----
src/lib389/lib389/tools.py | 4 ++--
2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/src/lib389/lib389/__init__.py b/src/lib389/lib389/__init__.py
index 59ee7fb..2069750 100644
--- a/src/lib389/lib389/__init__.py
+++ b/src/lib389/lib389/__init__.py
@@ -2084,13 +2084,19 @@ class DirSrv(SimpleLDAPObject):
log.warn("User already exists: %r " % user)
# setup replica
- repArgs['rtype'], repArgs['rid'] = repArgs['type'],
repArgs['id']
+ # map old style args to new style replica args
+ if repArgs['type'] == MASTER_TYPE:
+ repArgs['role'] = REPLICAROLE_MASTER
+ elif repArgs['type'] == LEAF_TYPE:
+ repArgs['role'] = REPLICAROLE_CONSUMER
+ else:
+ repArgs['role'] = REPLICAROLE_HUB
+ repArgs['rid'] = repArgs['id']
# remove invalid arguments from replica.add
- for invalid_arg in 'type id bename'.split():
- del repArgs[invalid_arg]
- if 'log' in repArgs:
- del repArgs['log']
+ for invalid_arg in 'type id bename log'.split():
+ if invalid_arg in repArgs:
+ del repArgs[invalid_arg]
ret = self.replica.add(**repArgs)
if 'legacy' in repArgs:
diff --git a/src/lib389/lib389/tools.py b/src/lib389/lib389/tools.py
index 4b83fea..f283882 100644
--- a/src/lib389/lib389/tools.py
+++ b/src/lib389/lib389/tools.py
@@ -243,7 +243,7 @@ class DirSrvTools(object):
return 0
@staticmethod
- def stop(self, verbose=False, timeout=0):
+ def stop(self, verbose=False, timeout=120):
"""Stop server or raise."""
if not self.isLocal and hasattr(self, 'asport'):
log.info("stopping remote server ", self)
@@ -260,7 +260,7 @@ class DirSrvTools(object):
return DirSrvTools.serverCmd(self, 'stop', verbose, timeout)
@staticmethod
- def start(self, verbose=False, timeout=0):
+ def start(self, verbose=False, timeout=120):
if not self.isLocal and hasattr(self, 'asport'):
log.debug("starting remote server %s " % self)
cgiargs = {}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.