summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/httpinstance.py
diff options
context:
space:
mode:
authorTomas Krizek <tkrizek@redhat.com>2016-11-09 12:53:14 +0100
committerMartin Basti <mbasti@redhat.com>2016-11-22 16:17:27 +0100
commit68295bf8cfd57333deb50f58df1b336a4b48ffe7 (patch)
tree525a018e5d7216847b09d0373bbdc0de2f8e55e0 /ipaserver/install/httpinstance.py
parent4c133837d149352a68e1d6cbefbb28e4ae048755 (diff)
downloadfreeipa-68295bf8cfd57333deb50f58df1b336a4b48ffe7.tar.gz
freeipa-68295bf8cfd57333deb50f58df1b336a4b48ffe7.tar.xz
freeipa-68295bf8cfd57333deb50f58df1b336a4b48ffe7.zip
services: replace admin_conn with api.Backend.ldap2
Since service.admin_conn is only an alias to api.Backend.ldap2, replace it everywhere with the explicit api.Backend.ldap2 instead. https://fedorahosted.org/freeipa/ticket/6461 Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'ipaserver/install/httpinstance.py')
-rw-r--r--ipaserver/install/httpinstance.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/ipaserver/install/httpinstance.py b/ipaserver/install/httpinstance.py
index 4e8107e1a..cd1674362 100644
--- a/ipaserver/install/httpinstance.py
+++ b/ipaserver/install/httpinstance.py
@@ -416,7 +416,8 @@ class HTTPInstance(service.Service):
attr_name = 'kdcProxyEnabled'
try:
- entry = self.admin_conn.get_entry(entry_name, ['ipaConfigString'])
+ entry = api.Backend.ldap2.get_entry(
+ entry_name, ['ipaConfigString'])
except errors.NotFound:
pass
else:
@@ -427,7 +428,7 @@ class HTTPInstance(service.Service):
entry.setdefault('ipaConfigString', []).append(attr_name)
try:
- self.admin_conn.update_entry(entry)
+ api.Backend.ldap2.update_entry(entry)
except errors.EmptyModlist:
root_logger.debug("service KDCPROXY already enabled")
return
@@ -438,7 +439,7 @@ class HTTPInstance(service.Service):
root_logger.debug("service KDCPROXY enabled")
return
- entry = self.admin_conn.make_entry(
+ entry = api.Backend.ldap2.make_entry(
entry_name,
objectclass=["nsContainer", "ipaConfigObject"],
cn=['KDC'],
@@ -446,7 +447,7 @@ class HTTPInstance(service.Service):
)
try:
- self.admin_conn.add_entry(entry)
+ api.Backend.ldap2.add_entry(entry)
except errors.DuplicateEntry:
root_logger.debug("failed to add service KDCPROXY entry")
raise