[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-12-02 Thread jcholast
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context jcholast commented: """ Pushed with #302. """ See the full comment at https://github.com/freeipa/freeipa/pull/182#issuecomment-264460352 -- Manage your subscription for the

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-12-02 Thread jcholast
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context jcholast commented: """ @pvoborni, yes, although it should not inherit from `InvocationError`, since it does not happen during command invocation, but way before, during API

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-12-02 Thread jcholast
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context jcholast commented: """ @pvoborni, yes, although it should not inherit from 'InvocationError`, since it does not happen during command invocation, but way before, during API

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-12-02 Thread pvoborni
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context pvoborni commented: """ True, also thinking that it might not be the best name because it can be confused with buildin EnvironmentError so the usages should be either

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-12-02 Thread tiran
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context tiran commented: """ You have a copy and paste typo: EnvironmentError, not Environ**t**mentError """ See the full comment at

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-12-02 Thread pvoborni
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context pvoborni commented: """ Honza, would this work? ```diff diff --git a/ipalib/config.py b/ipalib/config.py index 9d87782..6c3a0b1 100644 --- a/ipalib/config.py +++

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-28 Thread rcritten
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context rcritten commented: """ I don't see this as a convenience method. I'd find it less likely to use directly with the ipa tool (though having to specify -e every time I used a

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-28 Thread tiran
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context tiran commented: """ Latest PR depends on PR #280 . """ See the full comment at https://github.com/freeipa/freeipa/pull/182#issuecomment-263313005 -- Manage your

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-24 Thread pvoborni
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context pvoborni commented: """ If I understand it correctly, the review is stalled for some time given that there is misalignment if this pull request is needed. As described in

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-16 Thread tiran
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context tiran commented: """ Integration test will be fairly easy after #247 has landed. """ See the full comment at

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-16 Thread mbasti-rh
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context mbasti-rh commented: """ This should have test because it is completely new so it is not part of any current test suites. However final review will wait for @jcholast """

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-11 Thread tiran
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context tiran commented: """ http://www.freeipa.org/page/V4/Integration_Improvements#API_for_local_configuration_directory """ See the full comment at

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-10 Thread tiran
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context tiran commented: """ The argument is mood. Even now you can't tell which config file ```ipa ping``` is going to load. There are tons of ways to modify behavior, e.g. mount

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-10 Thread tiran
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context tiran commented: """ For a long time FreeIPA ignored Python packaging guidelines. It did neither support pip and wheels nor virtual envs or local configuration. There is

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-10 Thread mbasti-rh
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context mbasti-rh commented: """ For the long history of IPA we haven't had need for our own environment variables. I agree with Honza, why we should have the another way how to pass

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-10 Thread jcholast
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context jcholast commented: """ Sorry, but I just don't see an explanation in the comment you linked, just that you think it's easier to set an environment variable rather than an

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-10 Thread tiran
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context tiran commented: """ Let me google that for you: * https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html *

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-10 Thread tiran
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context tiran commented: """ Let me google that for you: * https://specifications.freedesktop.org/basedir-spec/latest/ar01s03.html *

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-10 Thread jcholast
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context jcholast commented: """ Care to point me to some actual standard which recommends this? Using explicit configuration via library initialization arguments is no NIH, everyone

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-10 Thread jcholast
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context jcholast commented: """ Care to point me to some actual standard which recommends this? Using explicit configuration via library initialization arguments is no NIH, everyone

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-10 Thread tiran
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context tiran commented: """ Everyone else does it is a very good argument. Standards and common practices provide a good user and developer experience. I detest _Not Invented Here_

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-10 Thread tiran
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context tiran commented: """ Everyone else does it is a very good argument. Standards and common practices provide a good user and developer experience. I detest _Not Invented Here_

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-10 Thread jcholast
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context jcholast commented: """ "Everyone else does it" is not really a good argument to anything. Just saying. Also you still haven't provided a single example of where explicitly

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-10 Thread tiran
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context tiran commented: """ No, env vars are **the** standard way to change the behavior of a program for a local session. They are used all over the place: MIT KRB5 as KRB5_CONFIG,

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-10 Thread jcholast
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context jcholast commented: """ @tiran, setting `confdir` explicitly is not a hack, but the proper way to set the config directory path and there is nothing that makes the environment

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-10 Thread jcholast
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context jcholast commented: """ @tiran, setting `confdir` explicitly is not a hack, but the proper way to set the config directory path and there is nothing that makes the environment

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-10 Thread tomaskrizek
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context tomaskrizek commented: """ In that case, we probably need to properly handle the exception somewhere. Since that's out of the scope of this PR, I'm going to ACK this. We can

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-09 Thread tiran
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context tiran commented: """ ipapython.admintool.ScriptError still prints the full traceback: ``` $ IPA_CONFDIR=/tmp/ipa ./ipa [2016-11-09T16:35:38Z ipa] : ScriptError: IPA_CONFDIR

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-11-07 Thread tomaskrizek
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context tomaskrizek commented: """ I also think `IPA_CONFDIR` environment variable is the proper way to configure the config directory with use cases such as Ansible. However, with

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-10-25 Thread tiran
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context tiran commented: """ Your proposals are hacks / workarounds, not a proper API to point ipa/ipalib to a custom configuration location. I'm proposing a proper API for

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-10-25 Thread jcholast
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context jcholast commented: """ In custom Python scripts, you have to call `api.bootstrap()`, so you may as well call `api.bootstrap(confdir='/path/to/confdir')`. You may even call

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-10-25 Thread tiran
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context tiran commented: """ It's explained in the title. The ```-e confdir=/path/to/confdir``` only works for ipa command. The env var affects all ```cli``` contexts including custom

[Freeipa-devel] [freeipa PR#182][comment] Use env var IPA_CONFDIR to get confdir for 'cli' context

2016-10-24 Thread jcholast
URL: https://github.com/freeipa/freeipa/pull/182 Title: #182: Use env var IPA_CONFDIR to get confdir for 'cli' context jcholast commented: """ This seems rather unnecessary to me, as you can do: ``` $ ipa -e confdir=/path/to/confdir command ``` In case there is some shortcoming in the above, I