mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-25 00:44:42 +00:00
Fix latest ansible-test sanity findings
Some argument_spec and also DOCUMENTATION issues were fixed. But also some recurring invalid-name findings like for example for the __metaclass__ line needed to be "fixed".
This commit is contained in:
@@ -23,7 +23,9 @@
|
||||
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
__metaclass__ = type
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
__all__ = ["gssapi", "version", "ipadiscovery", "api", "errors", "x509",
|
||||
"constants", "sysrestore", "certmonger", "certstore",
|
||||
@@ -49,7 +51,8 @@ __all__ = ["gssapi", "version", "ipadiscovery", "api", "errors", "x509",
|
||||
"sssd_enable_ifp", "configure_selinux_for_client",
|
||||
"getargspec", "paths", "options",
|
||||
"IPA_PYTHON_VERSION", "NUM_VERSION", "certdb", "get_ca_cert",
|
||||
"ipalib", "logger", "ipautil", "installer"]
|
||||
"ipalib", "logger", "ipautil", "installer",
|
||||
"CLIENT_SUPPORTS_NO_DNSSEC_VALIDATION"]
|
||||
|
||||
import sys
|
||||
|
||||
@@ -76,6 +79,7 @@ except ImportError:
|
||||
return ArgSpec(args, varargs, varkw, defaults)
|
||||
|
||||
|
||||
ANSIBLE_IPA_CLIENT_MODULE_IMPORT_ERROR = None # pylint: disable=invalid-name
|
||||
try:
|
||||
from ipapython.version import NUM_VERSION, VERSION
|
||||
|
||||
@@ -311,13 +315,17 @@ try:
|
||||
configure_selinux_for_client = None
|
||||
|
||||
try:
|
||||
# pylint: disable=invalid-name
|
||||
CLIENT_SUPPORTS_NO_DNSSEC_VALIDATION = False
|
||||
# pylint: enable=invalid-name
|
||||
from ipaclient.install.client import ClientInstallInterface
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
if hasattr(ClientInstallInterface, "no_dnssec_validation"):
|
||||
# pylint: disable=invalid-name
|
||||
CLIENT_SUPPORTS_NO_DNSSEC_VALIDATION = True
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
logger = logging.getLogger("ipa-client-install")
|
||||
root_logger = logger
|
||||
@@ -327,14 +335,13 @@ try:
|
||||
raise RuntimeError("freeipa version '%s' is too old" % VERSION)
|
||||
|
||||
except ImportError as _err:
|
||||
# pylint: disable=invalid-name
|
||||
ANSIBLE_IPA_CLIENT_MODULE_IMPORT_ERROR = str(_err)
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
for attr in __all__:
|
||||
setattr(sys.modules[__name__], attr, None)
|
||||
|
||||
else:
|
||||
ANSIBLE_IPA_CLIENT_MODULE_IMPORT_ERROR = None
|
||||
|
||||
|
||||
def setup_logging():
|
||||
standard_logging_setup(
|
||||
|
||||
Reference in New Issue
Block a user