mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-31 11:54:47 +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:
|
else:
|
||||||
IPA_PYTHON_VERSION = NUM_VERSION
|
IPA_PYTHON_VERSION = NUM_VERSION
|
||||||
from ipapython.dn import DN
|
from ipapython.dn import DN
|
||||||
from ipaclient.install import ipadiscovery
|
|
||||||
from ipalib.install.sysrestore import SYSRESTORE_STATEFILE
|
|
||||||
from ipaplatform.paths import paths
|
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):
|
def get_cert_path(cert_path):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user