Break ipaplatform / ipalib import cycle of hell

Here is an attempt to break the import cycle of hell between ipaplatform
and ipalib. All services now pass an ipalib.api object to
services.service(). RedHatServices.__init__() still needs to do a local
import because it initializes its wellknown service dict with service
instances.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Christian Heimes
2016-11-18 15:42:23 +01:00
committed by Martin Basti
parent 2cbaf15604
commit 6409abf1a6
20 changed files with 72 additions and 63 deletions

View File

@@ -262,7 +262,7 @@ class server_mod(LDAPUpdate):
if 'ipalocation_location' or 'ipaserviceweight' in options:
self.add_message(messages.ServiceRestartRequired(
service=services.service('named').systemd_name,
service=services.service('named', api).systemd_name,
server=keys[0], ))
result = self.api.Command.dns_update_system_records()