Re: Func Responses

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

 



Steve Milner wrote:
I'd like to re-open the talk about how modules return data. I
personally like the idea of a response object that __str__ returns the
exact data that the command returned (or function decides on) along
with other methods to get data in helpful ways (get_lines(),
get_first_line(), etc..).

Thoughts? Ideas? Insane responses?

Modules shouldn't be thinking in terms of "lines of output" IMHO. If we do that, we aren't too much better than 'expect' based solutions. We should be thinking in terms of data, where as the nested hash results seem to serve us well. Of course, 'standardization' of return data is rather complex in it's own right, whether or not there is a happy object to encapsulate it.

Adrian had some good suggestions about creating some higher level client side APIs for doing more advanced things,
which seems to make sense there.

Anyhow, I have a preference towards seeing things not becoming all based on parsing, and moving towards programatic ways of returning the same data where we can.



_______________________________________________
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