Re: New GROUPS API and Groups CLI

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

 



Michael DeHaan wrote:
Adrian LIkins wrote:
On 06/20/2009 07:22 AM, makkalot wrote:
Hi ML,

In last a few days i've been working on new pluggable groups api.
The public group code is now independent from the backend of the
groups. Current code supports 2 backends :
   - Configuration file (the old one)
   - sqlite backend

The default groups backend is configuration file for now because
it is a little bit faster than sqlite backend.If you need to change
to sqlite backend what you need to do is go to : /etc/func/overlord.conf
and change:
   backend = sqlite
   group_db = /path/you/want

    Has the groups config file changed formats any?

A new addition is groups cli, we will be able to control groups api
via cli with new stuff. Let see some cli examples :

(For testing purposes i added 100 test nonexisting minions range(100))
---------------------------------------------------------------------
Listing all of the current stuff
[root@fedorabig func]# func "*" group --la
Group : group5
          Host : 1
          Host : 3
          Host : 2
          Host : 5
          Host : 4
-----------------------------------------------------------------------
Adding a new group :
[root@fedorabig func]# func "*" group --ag "newgr"
[root@fedorabig func]#

    I'd tend to prefer --add-group, --list-all etc style long options.

Beat me to it, please disregard :)


    The output format could maybe be a little plainer? Might make
it easier for apps that want to parse the output. That said, I'm not
sure it makes that much sense to need to parse the output. But
maybe something like

I also thought the same.

The CLI ought to be usable by humans and not look programmer-ery where possible, as the tool is interesting even if you don't use the API.



_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux