[Pacemaker] Newcomer's question - API?
Tim Ward
Tim.Ward at ipaccess.com
Wed Nov 2 11:05:34 UTC 2011
> From: Andrew Beekhof [mailto:andrew at beekhof.net]
>
> For a Java based GUI, you could poke around at
> http://hg.clusterlabs.org/pacemaker/gui which I apparently
> forgot to add a license to :-) Its not been updated for many
> moons and so may or may not work anymore, but it did at one
> point and should be enough to get you started.
>
> ...
>
> > I have not yet found documentation of the output format or return
> > codes of these commands. So the worry is that if we write a
> parser to
> > interpret the output as observed by experiment (a) we'll miss some
> > error cases that we didn't manage to provoke during our experiments
> > and (b) the text output format from the commands might
> change in a new version.
>
> Generally, since they all end up sending XML to the CIB, they
> return CIB error codes which are documented in the header file.
Thanks, the two together suggest that a reasonable approach is
- execute the command line from Java
- if the return code is zero it worked
- if the return code is non-zero it should be one of the numbers in
cib_errors in cib.h (and there will quite likely be some useful error
text in the standard error stream).
Does that sound sensible?
If so we can work out for ourselves whether to use commands that take
arguments or ones that take and generate XML - there's plenty of other
XML handing in our application so a little more XML parsing and
generating wouldn't frighten us.
Tim Ward
Brett Ward Limited - www.brettward.co.uk
This message contains confidential information and may be privileged. If you are not the intended recipient, please notify the sender and delete the message immediately.
ip.access Ltd, registration number 3400157, Building 2020,
Cambourne Business Park, Cambourne, Cambridge CB23 6DW, United Kingdom
More information about the Pacemaker
mailing list