Replace ipaplatform's symlinks with a meta importer

Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Petr Spacek <pspacek@redhat.com>
This commit is contained in:
Christian Heimes
2016-10-18 09:14:31 +02:00
committed by David Kupka
parent a420592280
commit 8f98fa1bd5
6 changed files with 37 additions and 17 deletions

View File

@@ -1,12 +1,20 @@
#
# Copyright (C) 2015 FreeIPA Contributors see COPYING for license
#
"""Module containing platform-specific functionality.
ipaplatform.constants
ipaplatform.paths
ipaplatform.services
ipaplatform.tasks
"""
import os
'''
Module containing platform-specific functionality for every platform.
'''
NAME = "__PLATFORM__"
# FIXME: too much cyclic dependencies
# from __PLATFORM__ import paths, tasks, services
# Create an alias for platform specific modulues, e.g.
# 'import ipaplatform.paths' loads 'ipaplatform/NAME/paths.py'.
__path__.append(
os.path.join(os.path.dirname(os.path.abspath(__file__)), NAME))

View File

@@ -483,7 +483,10 @@ class SystemdService(PlatformService):
# Objects below are expected to be exported by platform module
service = None
def base_service_class_factory(name):
raise NotImplementedError
service = base_service_class_factory
knownservices = None
# System may support more time&date services. FreeIPA supports ntpd only, other