Louis Coilliot wrote:
Hello,
the module is in attachment, FYI.
I wrote this primarily for Symbolic. Symbolic needs to get the arg
list to create forms for WebUI operations based on func modules, and
the register_method_args method is not always defined (that's a pity).
Perhaps it would be better to implement this in the inners of func,
but as a func module it was quick to do.
I like it. I'm poking around now to see if there is a good spot to
put this into func core so
we can expose this and potentially more of "inspect" functions.
I'm adding this to the git tree for now as a module. If we move it
later, it should be easy to deal with.
Adrian
Examples of use:
import func.overlord.client as fc
c = fc.Client("*")
print c.func_getargs.get('mount','umount')
print c.func_getargs.get('command','run')
print c.func_getargs.get('reboot','reboot')
will return (here on the minion 'kermit'):
{'kermit': ['dir', 'killall', 'force', 'lazy']}
{'kermit': ['command', 'env']}
{'kermit': ['when', 'message']}
Louis
------------------------------------------------------------------------
_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list
_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list