mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Add disconnect command to ipa-replica-manage
Can remove replication agreements between 2 replicas as long as it is not the last agreement (except for Ad replication agreements, which can always be removed). Fixes: https://fedorahosted.org/freeipa/ticket/551
This commit is contained in:
@@ -135,6 +135,28 @@ class ReplicationManager:
|
||||
return []
|
||||
return [ent.dn for ent in ents]
|
||||
|
||||
def find_ipa_replication_agreements(self):
|
||||
"""
|
||||
The replication agreements are stored in
|
||||
cn="$SUFFIX",cn=mapping tree,cn=config
|
||||
|
||||
Return the list of hosts we have replication agreements.
|
||||
"""
|
||||
|
||||
res = []
|
||||
|
||||
filt = "(objectclass=nsds5ReplicationAgreement)"
|
||||
try:
|
||||
ents = self.conn.search_s("cn=mapping tree,cn=config",
|
||||
ldap.SCOPE_SUBTREE, filt)
|
||||
except ldap.NO_SUCH_OBJECT:
|
||||
return res
|
||||
|
||||
for ent in ents:
|
||||
res.append(ent.nsds5replicahost)
|
||||
|
||||
return res
|
||||
|
||||
def add_replication_manager(self, conn, passwd=None):
|
||||
"""
|
||||
Create a pseudo user to use for replication. If no password
|
||||
|
||||
Reference in New Issue
Block a user