summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/plugins
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2013-01-21 06:55:05 -0500
committerMartin Kosek <mkosek@redhat.com>2013-03-01 16:59:44 +0100
commit607ff478f55e330ab68744beb699dc96d6a5f94a (patch)
treeefe142857471920fe00808d9a2f350f740a17273 /ipaserver/install/plugins
parent8be8d4ebfd876aba109ea133efe11d2386564f3b (diff)
downloadfreeipa.git-607ff478f55e330ab68744beb699dc96d6a5f94a.tar.gz
freeipa.git-607ff478f55e330ab68744beb699dc96d6a5f94a.tar.xz
freeipa.git-607ff478f55e330ab68744beb699dc96d6a5f94a.zip
Remove IPAdmin.updateEntry calls from fix_replica_agreements
Part of the work for: https://fedorahosted.org/freeipa/ticket/2660
Diffstat (limited to 'ipaserver/install/plugins')
-rw-r--r--ipaserver/install/plugins/fix_replica_agreements.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/ipaserver/install/plugins/fix_replica_agreements.py b/ipaserver/install/plugins/fix_replica_agreements.py
index 82098dd5..9f2c2414 100644
--- a/ipaserver/install/plugins/fix_replica_agreements.py
+++ b/ipaserver/install/plugins/fix_replica_agreements.py
@@ -80,12 +80,11 @@ class update_replica_attribute_lists(PreUpdate):
if attrlist is None:
self.log.debug("Adding %s", attribute)
- current = replica.toDict()
# Need to add it altogether
replica[attribute] = [template % " ".join(values)]
try:
- repl.conn.updateEntry(replica.dn, current, replica.toDict())
+ repl.conn.update_entry(replica.dn, replica)
self.log.debug("Updated")
except Exception, e:
self.log.error("Error caught updating replica: %s", str(e))
@@ -98,13 +97,12 @@ class update_replica_attribute_lists(PreUpdate):
if missing:
self.log.debug("%s needs updating (missing: %s)", attribute,
', '.join(missing))
- current = replica.toDict()
replica[attribute] = [
'%s %s' % (attrlist, ' '.join(missing))]
try:
- repl.conn.updateEntry(replica.dn, current, replica.toDict())
+ repl.conn.update_entry(replica.dn, replica)
self.log.debug("Updated %s", attribute)
except Exception, e:
self.log.error("Error caught updating %s: %s",