mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
client: import IPAChangeConf directly instead the module
We should use as specific import as possible, better for python memory consumption and speed, and looks better in code. https://fedorahosted.org/freeipa/ticket/6392 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
parent
c30b45ab15
commit
1c9267803c
@ -32,9 +32,9 @@ from six.moves.urllib.parse import urlparse, urlunparse
|
||||
|
||||
from ipaclient import (
|
||||
ipadiscovery,
|
||||
ipachangeconf,
|
||||
ntpconf,
|
||||
)
|
||||
from ipaclient.ipachangeconf import IPAChangeConf
|
||||
from ipalib import (
|
||||
api,
|
||||
certstore,
|
||||
@ -265,7 +265,7 @@ def configure_nsswitch_database(fstore, database, services, preserve=True,
|
||||
if not fstore.has_file(paths.NSSWITCH_CONF):
|
||||
fstore.backup_file(paths.NSSWITCH_CONF)
|
||||
|
||||
conf = ipachangeconf.IPAChangeConf("IPA Installer")
|
||||
conf = IPAChangeConf("IPA Installer")
|
||||
conf.setOptionAssignment(':')
|
||||
|
||||
if preserve:
|
||||
@ -317,7 +317,7 @@ def configure_nsswitch_database(fstore, database, services, preserve=True,
|
||||
|
||||
def configure_ipa_conf(
|
||||
fstore, cli_basedn, cli_realm, cli_domain, cli_server, hostname):
|
||||
ipaconf = ipachangeconf.IPAChangeConf("IPA Installer")
|
||||
ipaconf = IPAChangeConf("IPA Installer")
|
||||
ipaconf.setOptionAssignment(" = ")
|
||||
ipaconf.setSectionNameDelimiters(("[", "]"))
|
||||
|
||||
@ -407,7 +407,7 @@ def disable_ra():
|
||||
def configure_ldap_conf(
|
||||
fstore, cli_basedn, cli_realm, cli_domain, cli_server, dnsok, options,
|
||||
files):
|
||||
ldapconf = ipachangeconf.IPAChangeConf("IPA Installer")
|
||||
ldapconf = IPAChangeConf("IPA Installer")
|
||||
ldapconf.setOptionAssignment(" ")
|
||||
|
||||
opts = [
|
||||
@ -537,7 +537,7 @@ def configure_ldap_conf(
|
||||
def configure_nslcd_conf(
|
||||
fstore, cli_basedn, cli_realm, cli_domain, cli_server, dnsok, options,
|
||||
files):
|
||||
nslcdconf = ipachangeconf.IPAChangeConf("IPA Installer")
|
||||
nslcdconf = IPAChangeConf("IPA Installer")
|
||||
nslcdconf.setOptionAssignment(" ")
|
||||
|
||||
opts = [
|
||||
@ -644,7 +644,7 @@ def configure_nslcd_conf(
|
||||
|
||||
|
||||
def configure_openldap_conf(fstore, cli_basedn, cli_server):
|
||||
ldapconf = ipachangeconf.IPAChangeConf("IPA Installer")
|
||||
ldapconf = IPAChangeConf("IPA Installer")
|
||||
ldapconf.setOptionAssignment((" ", "\t"))
|
||||
|
||||
opts = [
|
||||
@ -757,7 +757,7 @@ def hardcode_ldap_server(cli_server):
|
||||
if not file_exists(paths.LDAP_CONF):
|
||||
return
|
||||
|
||||
ldapconf = ipachangeconf.IPAChangeConf("IPA Installer")
|
||||
ldapconf = IPAChangeConf("IPA Installer")
|
||||
ldapconf.setOptionAssignment(" ")
|
||||
|
||||
opts = [
|
||||
@ -784,7 +784,7 @@ def configure_krb5_conf(
|
||||
cli_realm, cli_domain, cli_server, cli_kdc, dnsok,
|
||||
options, filename, client_domain, client_hostname):
|
||||
|
||||
krbconf = ipachangeconf.IPAChangeConf("IPA Installer")
|
||||
krbconf = IPAChangeConf("IPA Installer")
|
||||
krbconf.setOptionAssignment((" = ", " "))
|
||||
krbconf.setSectionNameDelimiters(("[", "]"))
|
||||
krbconf.setSubSectionDelimiters(("{", "}"))
|
||||
|
Loading…
Reference in New Issue
Block a user