mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-07 05:43:26 +00:00
library/ipadiscovery.py: Compatibilty to ipa 4.4 and later, new version check
freeipa 4.4 is the first version that supports all needed functions. Therefore a check has been added to make sure that ipadiscovery fails for versions before 4.4. The python bindings of ipa versions before 4.6 are having a different structure.
This commit is contained in:
@@ -162,9 +162,16 @@ if NUM_VERSION < 30201:
|
||||
else:
|
||||
IPA_PYTHON_VERSION = NUM_VERSION
|
||||
from ipapython.dn import DN
|
||||
from ipaclient.install import ipadiscovery
|
||||
from ipalib.install.sysrestore import SYSRESTORE_STATEFILE
|
||||
from ipaplatform.paths import paths
|
||||
try:
|
||||
from ipaclient.install import ipadiscovery
|
||||
except ImportError:
|
||||
from ipaclient import ipadiscovery
|
||||
try:
|
||||
from ipalib.install.sysrestore import SYSRESTORE_STATEFILE
|
||||
except ImportError:
|
||||
from ipapython.sysrestore import SYSRESTORE_STATEFILE
|
||||
|
||||
|
||||
def get_cert_path(cert_path):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user