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 (
|
from ipaclient import (
|
||||||
ipadiscovery,
|
ipadiscovery,
|
||||||
ipachangeconf,
|
|
||||||
ntpconf,
|
ntpconf,
|
||||||
)
|
)
|
||||||
|
from ipaclient.ipachangeconf import IPAChangeConf
|
||||||
from ipalib import (
|
from ipalib import (
|
||||||
api,
|
api,
|
||||||
certstore,
|
certstore,
|
||||||
@ -265,7 +265,7 @@ def configure_nsswitch_database(fstore, database, services, preserve=True,
|
|||||||
if not fstore.has_file(paths.NSSWITCH_CONF):
|
if not fstore.has_file(paths.NSSWITCH_CONF):
|
||||||
fstore.backup_file(paths.NSSWITCH_CONF)
|
fstore.backup_file(paths.NSSWITCH_CONF)
|
||||||
|
|
||||||
conf = ipachangeconf.IPAChangeConf("IPA Installer")
|
conf = IPAChangeConf("IPA Installer")
|
||||||
conf.setOptionAssignment(':')
|
conf.setOptionAssignment(':')
|
||||||
|
|
||||||
if preserve:
|
if preserve:
|
||||||
@ -317,7 +317,7 @@ def configure_nsswitch_database(fstore, database, services, preserve=True,
|
|||||||
|
|
||||||
def configure_ipa_conf(
|
def configure_ipa_conf(
|
||||||
fstore, cli_basedn, cli_realm, cli_domain, cli_server, hostname):
|
fstore, cli_basedn, cli_realm, cli_domain, cli_server, hostname):
|
||||||
ipaconf = ipachangeconf.IPAChangeConf("IPA Installer")
|
ipaconf = IPAChangeConf("IPA Installer")
|
||||||
ipaconf.setOptionAssignment(" = ")
|
ipaconf.setOptionAssignment(" = ")
|
||||||
ipaconf.setSectionNameDelimiters(("[", "]"))
|
ipaconf.setSectionNameDelimiters(("[", "]"))
|
||||||
|
|
||||||
@ -407,7 +407,7 @@ def disable_ra():
|
|||||||
def configure_ldap_conf(
|
def configure_ldap_conf(
|
||||||
fstore, cli_basedn, cli_realm, cli_domain, cli_server, dnsok, options,
|
fstore, cli_basedn, cli_realm, cli_domain, cli_server, dnsok, options,
|
||||||
files):
|
files):
|
||||||
ldapconf = ipachangeconf.IPAChangeConf("IPA Installer")
|
ldapconf = IPAChangeConf("IPA Installer")
|
||||||
ldapconf.setOptionAssignment(" ")
|
ldapconf.setOptionAssignment(" ")
|
||||||
|
|
||||||
opts = [
|
opts = [
|
||||||
@ -537,7 +537,7 @@ def configure_ldap_conf(
|
|||||||
def configure_nslcd_conf(
|
def configure_nslcd_conf(
|
||||||
fstore, cli_basedn, cli_realm, cli_domain, cli_server, dnsok, options,
|
fstore, cli_basedn, cli_realm, cli_domain, cli_server, dnsok, options,
|
||||||
files):
|
files):
|
||||||
nslcdconf = ipachangeconf.IPAChangeConf("IPA Installer")
|
nslcdconf = IPAChangeConf("IPA Installer")
|
||||||
nslcdconf.setOptionAssignment(" ")
|
nslcdconf.setOptionAssignment(" ")
|
||||||
|
|
||||||
opts = [
|
opts = [
|
||||||
@ -644,7 +644,7 @@ def configure_nslcd_conf(
|
|||||||
|
|
||||||
|
|
||||||
def configure_openldap_conf(fstore, cli_basedn, cli_server):
|
def configure_openldap_conf(fstore, cli_basedn, cli_server):
|
||||||
ldapconf = ipachangeconf.IPAChangeConf("IPA Installer")
|
ldapconf = IPAChangeConf("IPA Installer")
|
||||||
ldapconf.setOptionAssignment((" ", "\t"))
|
ldapconf.setOptionAssignment((" ", "\t"))
|
||||||
|
|
||||||
opts = [
|
opts = [
|
||||||
@ -757,7 +757,7 @@ def hardcode_ldap_server(cli_server):
|
|||||||
if not file_exists(paths.LDAP_CONF):
|
if not file_exists(paths.LDAP_CONF):
|
||||||
return
|
return
|
||||||
|
|
||||||
ldapconf = ipachangeconf.IPAChangeConf("IPA Installer")
|
ldapconf = IPAChangeConf("IPA Installer")
|
||||||
ldapconf.setOptionAssignment(" ")
|
ldapconf.setOptionAssignment(" ")
|
||||||
|
|
||||||
opts = [
|
opts = [
|
||||||
@ -784,7 +784,7 @@ def configure_krb5_conf(
|
|||||||
cli_realm, cli_domain, cli_server, cli_kdc, dnsok,
|
cli_realm, cli_domain, cli_server, cli_kdc, dnsok,
|
||||||
options, filename, client_domain, client_hostname):
|
options, filename, client_domain, client_hostname):
|
||||||
|
|
||||||
krbconf = ipachangeconf.IPAChangeConf("IPA Installer")
|
krbconf = IPAChangeConf("IPA Installer")
|
||||||
krbconf.setOptionAssignment((" = ", " "))
|
krbconf.setOptionAssignment((" = ", " "))
|
||||||
krbconf.setSectionNameDelimiters(("[", "]"))
|
krbconf.setSectionNameDelimiters(("[", "]"))
|
||||||
krbconf.setSubSectionDelimiters(("{", "}"))
|
krbconf.setSubSectionDelimiters(("{", "}"))
|
||||||
|
Loading…
Reference in New Issue
Block a user