summaryrefslogtreecommitdiffstats
path: root/install/tools
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2013-01-23 10:05:21 -0500
committerMartin Kosek <mkosek@redhat.com>2013-03-01 16:59:45 +0100
commit5184c312f6dd1a885c9e0e10e3763eddb8110bae (patch)
treeb80d94b6fb94cb842aca6d65cc6f6be14b0ae5f0 /install/tools
parentd17f9020a847c7a6db7734f1525c59efe07fbdcd (diff)
downloadfreeipa-5184c312f6dd1a885c9e0e10e3763eddb8110bae.tar.gz
freeipa-5184c312f6dd1a885c9e0e10e3763eddb8110bae.tar.xz
freeipa-5184c312f6dd1a885c9e0e10e3763eddb8110bae.zip
replace getEntry with get_entry (or get_entries if scope != SCOPE_BASE)
Part of the work for: https://fedorahosted.org/freeipa/ticket/2660
Diffstat (limited to 'install/tools')
-rwxr-xr-xinstall/tools/ipa-csreplica-manage6
-rwxr-xr-xinstall/tools/ipa-managed-entries7
-rwxr-xr-xinstall/tools/ipa-replica-manage8
3 files changed, 9 insertions, 12 deletions
diff --git a/install/tools/ipa-csreplica-manage b/install/tools/ipa-csreplica-manage
index 5cab8b864..3f10c9003 100755
--- a/install/tools/ipa-csreplica-manage
+++ b/install/tools/ipa-csreplica-manage
@@ -135,7 +135,7 @@ class CSReplicationManager(replication.ReplicationManager):
try:
cn="%sAgreement1-%s-%s" % (master, host, instance_name)
dn = DN(('cn', cn), self.replica_dn())
- self.conn.getEntry(dn, ldap.SCOPE_BASE)
+ self.conn.get_entry(dn)
return (cn, dn)
except errors.NotFound:
dn = None
@@ -156,7 +156,7 @@ class CSReplicationManager(replication.ReplicationManager):
def has_ipaca(self):
try:
- entry = self.conn.getEntry(self.suffix, ldap.SCOPE_BASE)
+ entry = self.conn.get_entry(self.suffix)
except errors.NotFound:
return False
else:
@@ -216,7 +216,7 @@ def list_replicas(realm, host, replica, dirman_passwd, verbose):
for ent in entries:
try:
cadn = DN(('cn', 'CA'), DN(ent.dn))
- entry = conn.getEntry(cadn, ldap.SCOPE_BASE)
+ entry = conn.get_entry(cadn)
peers[ent.single_value('cn')] = ['master', '']
except errors.NotFound:
peers[ent.single_value('cn')] = ['CA not configured', '']
diff --git a/install/tools/ipa-managed-entries b/install/tools/ipa-managed-entries
index 11deb63c3..b7dbdb9d3 100755
--- a/install/tools/ipa-managed-entries
+++ b/install/tools/ipa-managed-entries
@@ -143,11 +143,8 @@ def main():
disabled = True
try:
- entry = conn.getEntry(def_dn,
- ldap.SCOPE_BASE,
- filter,
- ['originfilter'],
- )
+ [entry] = conn.get_entries(def_dn, ldap.SCOPE_BASE,
+ filter, ['originfilter'])
disable_attr = '(objectclass=disable)'
try:
org_filter = entry.single_value('originfilter', None)
diff --git a/install/tools/ipa-replica-manage b/install/tools/ipa-replica-manage
index c542c0757..585d40c65 100755
--- a/install/tools/ipa-replica-manage
+++ b/install/tools/ipa-replica-manage
@@ -765,12 +765,12 @@ def add_link(realm, replica1, replica2, dirman_passwd, options):
master1_dn = DN(('cn', replica1), masters_dn)
master2_dn = DN(('cn', replica2), masters_dn)
- repl1.conn.getEntry(master1_dn, ldap.SCOPE_BASE)
- repl1.conn.getEntry(master2_dn, ldap.SCOPE_BASE)
+ repl1.conn.get_entry(master1_dn)
+ repl1.conn.get_entry(master2_dn)
repl2 = replication.ReplicationManager(realm, replica2, dirman_passwd)
- repl2.conn.getEntry(master1_dn, ldap.SCOPE_BASE)
- repl2.conn.getEntry(master2_dn, ldap.SCOPE_BASE)
+ repl2.conn.get_entry(master1_dn)
+ repl2.conn.get_entry(master2_dn)
except errors.NotFound:
standard_logging_setup(console_format='%(message)s')