On 3.7.2013 10:38, Roman Rakus wrote:
On 07/03/13 09:38, Jan Safranek wrote:
o we need documentation (on wiki), how to create new subcommands + the part in /usr/libexec/lmi/cmd just registers new subcommands and parses command line, calling functions imported from/usr/lib/python2.7/site-packages/lmi/scripts/
What about to have filename defining the subcommand? It should simplify things a lot. Example: /usr/libexec/lmi/account/list_user /usr/libexec/lmi/account/create_user /usr/libexec/lmi/account/delete_user /usr/libexec/lmi/storrage/create_vg ...
pros:
- simplifies the process
- one file do one thing - the UNIX way
- transparency
cons:
- a lot of files to maintain
Any ideas, objections?
I like the idea, but each such scripton could define its own subcommands. Example above would result in commands:
* lmi list_user ... * lmi create_user ... * lmi delete_user ... * lmi create_vg ...
I would prefer following layout:
*
/usr/libexec/lmi/account/account
*
/usr/libexec/lmi/storrage/vg
*
/usr/libexec/lmi/storrage/md
*
/usr/libexec/lmi/software/sw
Each would define its own subcommands. Then the metacommand would take:
* lmi account list ... * lmi account create ... * lmi account delete ... * lmi vg ... * lmi md ... * lmi sw ...
Mm
RR
openlmi-devel mailing list openlmi-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/openlmi-devel