[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] Per user preference file



On 11/11/2010, at 10:21 PM, Daniel P. Berrange wrote:
<snip>
> So we really come down to a config file with the URI and a logfile.
> Is this any better than just setting LIBVIRT_DEFUALT_URI and
> LIBVIRT_LOG_OUTPUTS in $HOME/.bashrc, which *will* actually impact
> any application using libvirt.so without needing any code changes
> on those apps

Having a preference file, per user, gives us a known place to put (and
suggest) further preferences.

Ages ago, when I was adding options to virsh like "--details" for the pool-list
and vol-list commands, I really wanted a way to change the default behaviour
for some commands.

For example, two defaults I'd like to be able to change are:

  + having the *-list commands use "--all" by default
    + list --> list --all
    + net-list  --> net-list --all
    + pool-list --> pool-list --all
    + vol-list --> vol-list --all

    Changing the virsh wide default though, instead of having it be a user
    preference, would likely break existing scripting.  Not a go-er. :)

 + having the pool-list and vol-list commands also use "--details" by default
    + pool-list --> pool-list --details
    + vol-list --> vol-list --details

    Again, changing this in virsh without it being a user preference would just
    break existing stuff.

Didn't/couldn't do the above, because we have no existing spot to store user
preferences.  If we did, then the above could happen, and I'm "pretty sure"
other people would also tweak their often used stuff too. :)

Of course, we could probably do it with environment variables.  Seems like
a non-optimal direction to take though, if we think there could be a bunch
of things added over time.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]