freeipa/ipaserver/install/plugins/update_ca_topology.py
Martin Basti 801672cc66 Remove invalid error messages from topology upgrade
Return False does not mean that update failed, it mean that nothing has
been updated, respectively ldap is up to date.

https://fedorahosted.org/freeipa/ticket/5482

Reviewed-By: Tomas Babej <tbabej@redhat.com>
2015-11-25 13:58:05 +01:00

34 lines
838 B
Python

#
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
#
from ipalib import api
from ipalib import Updater
from ipaserver.install import certs, cainstance
from ipaserver.install import ldapupdate
from ipaplatform.paths import paths
class update_ca_topology(Updater):
"""
Updates CA topology configuration entries
"""
def execute(self, **options):
ca = cainstance.CAInstance(self.api.env.realm, certs.NSS_DIR)
if not ca.is_configured():
self.log.debug("CA is not configured on this host")
return False, []
ld = ldapupdate.LDAPUpdate(ldapi=True, sub_dict={
'SUFFIX': self.api.env.basedn,
'FQDN': self.api.env.host,
})
ld.update([paths.CA_TOPOLOGY_ULDIF])
return False, []
api.register(update_ca_topology)