Luca Foppiano wrote:
hi all,
as I said time ago sometime there are problems to use return values
from methods.
The problem is IMHO that we have too many return string for each method,
for example, command.run return a list with [status, output and error].
command.example return only a true/false value.
virt.list return only a list of machines, if there is a problem with XEN
or something else it return an exception...
I think the unification of all return string structure is a task to do,
maybe now can be appear as a waste of time but now we have a relatively
small amount of code, but in future, may be critical.
You'd have to define what unification would mean. Let's see a proposal.
Without that there isn't much to discuss.
Generally all methods in an API /are/ going to have different things
they return, because
this is how API's work.
I tried to modify my local installation but I found some troubles
because some methods don't need a status, I guess we can create a fake
of return status for these methods. what do you think?
Explain?
This is not so usable if you try to build an application around func,
because you have to customize each call to each method are you using.
Well, you are also doing some heinous evil things like parsing the
return from the command line (per your previous post).
Things would get much easier if you use XMLRPC directly and we work on
getting that XMLRPC API into the overlord
over local socket. I'd like to see that happen first from you guys
before we see whether "API standardization" is neccessary, because
I imagine parsing Func is extremely fragile and the cause of most of
your pain there.
thanks
Luca
_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list