summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/automount.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2013-10-31 16:54:21 +0000
committerPetr Viktorin <pviktori@redhat.com>2014-01-24 20:38:15 +0100
commitc2bd6f365d2b65082f72bd9eb104e79e8c507fe3 (patch)
tree31449afe21beb62edf20982c2215568997eb6c11 /ipalib/plugins/automount.py
parent5737eaf1348ba101ae227fa79fb4451a2413fc84 (diff)
downloadfreeipa-c2bd6f365d2b65082f72bd9eb104e79e8c507fe3.tar.gz
freeipa-c2bd6f365d2b65082f72bd9eb104e79e8c507fe3.tar.xz
freeipa-c2bd6f365d2b65082f72bd9eb104e79e8c507fe3.zip
Convert remaining frontend code to LDAPEntry API.
Diffstat (limited to 'ipalib/plugins/automount.py')
-rw-r--r--ipalib/plugins/automount.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ipalib/plugins/automount.py b/ipalib/plugins/automount.py
index a7596b475..4b94a5957 100644
--- a/ipalib/plugins/automount.py
+++ b/ipalib/plugins/automount.py
@@ -603,11 +603,11 @@ class automountmap_del(LDAPDelete):
assert isinstance(dn, DN)
# delete optional parental connection (direct maps may not have this)
try:
- (dn_, entry_attrs) = ldap.find_entry_by_attr(
+ entry_attrs = ldap.find_entry_by_attr(
'automountinformation', keys[0], 'automount',
base_dn=DN(self.obj.container_dn, api.env.basedn)
)
- ldap.delete_entry(dn_)
+ ldap.delete_entry(entry_attrs)
except errors.NotFound:
pass
return True
@@ -715,7 +715,7 @@ class automountkey(LDAPObject):
# First we look with the information given, then try to search for
# the right entry.
try:
- (dn, entry_attrs) = ldap.get_entry(dn, ['*'])
+ dn = ldap.get_entry(dn, ['*']).dn
except errors.NotFound:
if kwargs.get('automountinformation', False):
sfilter = '(&(automountkey=%s)(automountinformation=%s))' % \
@@ -732,7 +732,7 @@ class automountkey(LDAPObject):
raise errors.NotFound(reason=_('More than one entry with key %(key)s found, use --info to select specific entry.') % dict(key=pkey))
if truncated:
raise errors.LimitsExceeded()
- dn = entries[0][0]
+ dn = entries[0].dn
return dn
@@ -955,7 +955,7 @@ class automountkey_mod(LDAPUpdate):
# automountinformation attribute of existing LDAP object needs
# to be retrieved so that RDN can be generated
dn = self.obj.get_dn(*keys, **options)
- (dn_, entry_attrs_) = ldap.get_entry(dn, ['automountinformation'])
+ entry_attrs_ = ldap.get_entry(dn, ['automountinformation'])
new_info = entry_attrs_.get('automountinformation', [])[0]
# automounkey attribute cannot be overwritten so that get_dn()