On Tue, 2019-01-08 at 10:07 -0600, Ken Gaillot wrote: > On Tue, 2019-01-08 at 10:30 +0100, Kristoffer Grönlund wrote: > > On Mon, 2019-01-07 at 17:52 -0600, Ken Gaillot wrote: > > > > > Having all the tools able to produce XML output like cibadmin and > > crm_mon would be good in general, I think. So that seems like a > > good > > proposal to me. > > > > In the case of an error, at least in my experience just getting a > > return code and stderr output is enough to make sense of it - > > getting > > XML on stderr in the case of an error wouldn't seem like something > > that > > would add much value to me. > > There are two benefits: it can give extended information (such as the > text string that corresponds to a numeric exit status), and because > it > would also be used by any future REST API (which won't have stderr), > API/CLI output could be parsed identically. >
Hm, am I understanding you correctly: My sort-of vision for implementing a REST API has been to move all of the core functionality out of the command line tools and into the C libraries (I think we discussed something like a libpacemakerclient before) - the idea is that the XML output would be generated on that level? If so, that is something that I am all for :) Right now, we are experimenting with a REST API based on taking what we use in Hawk and moving that into an API server written in Go, and just calling crm_mon --as-xml to get status information that can be exposed via the API. Having that available in C directly and not having to call out to command line tools would be great and a lot cleaner: https://github.com/krig/hawk-apiserver https://github.com/hawk-ui/hawk-web-client Cheers, Kristoffer _______________________________________________ Users mailing list: [email protected] https://lists.clusterlabs.org/mailman/listinfo/users Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://bugs.clusterlabs.org
