summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipaserver/replication.py
diff options
context:
space:
mode:
authorKarl MacMillan <kmacmill@redhat.com>2007-12-21 11:02:29 -0500
committerKarl MacMillan <kmacmill@redhat.com>2007-12-21 11:02:29 -0500
commit19bdd1f166ac6a05aa1ca9611a9b3dbfc5776319 (patch)
tree5f7970dd7be3af7f63d0f07e412f55bc3dbfd6c3 /ipa-server/ipaserver/replication.py
parent5f6a67da4b5dd1f0b01adade73f1108711c26a44 (diff)
downloadfreeipa.git-19bdd1f166ac6a05aa1ca9611a9b3dbfc5776319.tar.gz
freeipa.git-19bdd1f166ac6a05aa1ca9611a9b3dbfc5776319.tar.xz
freeipa.git-19bdd1f166ac6a05aa1ca9611a9b3dbfc5776319.zip
- Enable ssl for replication.
- Add replication management script that allows listing adding, and deleting replicas.
Diffstat (limited to 'ipa-server/ipaserver/replication.py')
-rw-r--r--ipa-server/ipaserver/replication.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/ipa-server/ipaserver/replication.py b/ipa-server/ipaserver/replication.py
index df2b0288..765905e5 100644
--- a/ipa-server/ipaserver/replication.py
+++ b/ipa-server/ipaserver/replication.py
@@ -23,7 +23,7 @@ import ipaldap, ldap, dsinstance
from ipa import ipaerror
DIRMAN_CN = "cn=directory manager"
-PORT = 389
+PORT = 636
TIMEOUT = 120
class ReplicationManager:
@@ -43,9 +43,9 @@ class ReplicationManager:
self.suffix = ""
def find_replication_dns(self, conn):
- filt = "(objectlcass=nsds5ReplicationAgreement)"
+ filt = "(objectclass=nsDS5ReplicationAgreement)"
try:
- ents = conn.search_s("cn=mapping tree,cn-config", ldap.SCOPE_SUBTREE, filt, ["cn"])
+ ents = conn.search_s("cn=mapping tree,cn=config", ldap.SCOPE_SUBTREE, filt)
except ldap.NO_SUCH_OBJECT:
return []
return [ent.dn for ent in ents]
@@ -223,12 +223,16 @@ class ReplicationManager:
entry.setValues('nsds5replicabindmethod', 'simple')
entry.setValues('nsds5replicaroot', self.suffix)
entry.setValues('nsds5replicaupdateschedule', '0000-2359 0123456')
+ entry.setValues('nsds5replicatransportinfo', 'SSL')
entry.setValues('description', "me to %s%d" % (b.host, PORT))
a.add_s(entry)
entry = a.waitForEntry(entry)
+ def delete_agreement(self, other):
+ cn, dn = self.agreement_dn(other)
+ return self.conn.deleteEntry(dn)
def check_repl_init(self, conn, agmtdn):
done = False