+1 for syncing CLI with conf values, its good time for cleanups and tidiness before we move forward with major features. 

On Sun, Sep 25, 2016 at 10:25 AM, Yaniv Kaul <ykaul@redhat.com> wrote:
Please make sure all the changes are noted in v0.26 release notes.
Y.

On Sun, Sep 25, 2016 at 9:02 AM, Nadav Goldin <ngoldin@redhat.com> wrote:
Hi all,
As a side-effect of my proposed PR[1], 3 backward-incompatible
changes will be added:

variables names in lago.conf
------------------------------------
1. 'default_ssh_user', changed to: 'ssh_user', value: no change.
2. 'default_ssh_password, changed to: 'ssh_password', value: no change.
3. 'template_default_repo', changed to: 'template_repo_name'(same as
the existing CLI), value: was never set.
The above 3 were hard-coded in config.py's defaults dictionary and
never exposed externally. They had no documents, but, if a user knew
about them he could have added them manually to lago.conf

The reason for changing is that the PR unifies the configuration files
and CLI parameters. So keeping the 'default' prefix is misleading and
will lead to awkward results, such as:
lago --default-ssh-user root --default-ssh-password ....
instead of:
lago --ssh-user root --ssh-password ...


'template_*' section
-------------------------
'template_*' parameters which are used by lago init command, will be
move to [init] section in lago.conf.


lago.conf location
-----------------------
1. Drop /etc/lago.d/lago.conf in favour of /etc/lago/lago.conf
2. The installed file from the RPM will be all commented out(i.e.
installed just to use as a reference).
3. /etc/lago/lago.conf will be the least important in the
hierarchy(you can read more details about the hierarchy in the PR)
I'll note that Lago will be fully functional without any configuration
file at all.

These changes will possibly affect only already-customized
lago.conf files. But, changing to the new configuration format will be
easy, using the 'generate-config' command:
mkdir -p ~/.config/lago && lago generate-config > ~/.config/lago/lago.conf


The changes are needed as the the PR mainly deals with standardizing
the configuration loading module, so it is a good time for clean-up,
and dropping misleading variable names(which were probably good at the
time written). Second, I'm not sure how widely these parameters were
used, as some of them didn't have any docs. For instance I couldn't
find any evidence of usage for 'template_default_repo'(the CLI
parameter is the same as it was, 'template_repo_name').



Some possible alternatives:
1. Issue a warning about variables name change, and use both, then in
2-3 versions from now, completely remove them.
2. lago.conf location: Not a major issue, as far as I know, '.d'
suffix was used historically for distinguishing a 'directory' from a
single configuration file, so having '/etc/lago/' is better(and
keeping lago.d if someday we will need to load other user-defined
configurations). But this can be easily changed.


If there is no request for the alternatives or objection, I'll try to
get it merged for the next version and add a short summary of this
message to the release email.


Thanks,

Nadav.

[1] https://github.com/lago-project/lago/pull/324
_______________________________________________
lago-devel mailing list
lago-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/lago-devel


_______________________________________________
lago-devel mailing list
lago-devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/lago-devel




--
Eyal Edri
Associate Manager
RHV DevOps
EMEA ENG Virtualization R&D
Red Hat Israel

phone: +972-9-7692018
irc: eedri (on #tlv #rhev-dev #rhev-integ)