New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config: remove meaningless defaults #492
Conversation
|
https://github.com/HonzaCholasta/freeipa/blob/4ebf4b907213c9951eb9cbd276e0460552563fb1/ipalib/config.py#L579 initializes server from jsonrpc_uri. Does it make sense move this block before your new code? |
|
@tiran, not really, the order does not matter here. |
|
It does matter. In the current version |
|
I stand corrected, but it does not make sense to reorder the code as you suggested anyway, as it would change the current default of |
|
Can you add a comment to explain the order of checks and assignments? Without explanation, it's going to confuse the next poor developer. |
|
Sure. |
|
It's probably easier to always define options like |
IPAConfig, config and init_config were removed in rev 7b966e8. Ipsilon uses ipapython.config to get realm, domain and server of an enrolled host. Re-add a simplified version that reads settings from api.env. init_config() does not perform DNS discovery. Depends on PR freeipa#492 to get meaningful defaults. https://fedorahosted.org/freeipa/ticket/6707 Signed-off-by: Christian Heimes <cheimes@redhat.com>
|
I took the hard way and removed the URI argument from |
|
Regardless of what branch status widget shows the PR seems to be in need of rebase. |
Use LDAPClient instead of ldap2 for ad-hoc remote LDAP connections in the user_status and migrate-ds plugins.
…ctions Use the default LDAP URI from api.env.ldap_uri instead of specifying a custom URI in the argument, as the custom URI is always the same as the default URI.
Use the default LDAP URI from api.env.ldap_uri instead of specifying a custom URI in the argument. The default URI might be ldapi://, so make sure autobind is not attempted where the custom URI was ldap://.
LDAPClient should be used for ad-hoc connections, so the argument is not necessary, and currently also unused.
…dap_uri Domain, realm, basedn, xmlrpc_uri, ldap_uri do not have any reasonable default. This patch removes hardcoded default so the so the code which depends on these values blows up early and does not do crazy stuff with default values instead of real ones. This should help to uncover issues caused by improper ipalib initialization.
Derive the default value of `xmlrpc_uri` and `ldap_uri` from `server`. Derive the default value of `basedn` from `domain`.
|
master:
|
ipalib.constants: Remove default domain, realm, basedn, xmlrpc_uri, ldap_uri
Domain, realm, basedn, xmlrpc_uri, ldap_uri do not have any reasonable default.
This patch removes hardcoded default so the so the code which depends
on these values blows up early and does not do crazy stuff
with default values instead of real ones.
This should help to uncover issues caused by improper ipalib
initialization.
config: provide defaults for
xmlrpc_uri,ldap_uriandbasednDerive the default value of
xmlrpc_uriandldap_urifromserver.Derive the default value of
basednfromdomain.This supersedes @pspacek's PR #113.