[Pacemaker] Newcomer's question - API?

Andrew Beekhof andrew at beekhof.net
Wed Nov 2 08:31:42 EDT 2011


On Wed, Nov 2, 2011 at 10:05 PM, Tim Ward <Tim.Ward at ipaccess.com> wrote:
>> 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?

Correct

>
> If so we can work out for ourselves whether to use commands that take
> arguments or ones that take and generate XML

Most of the cib api is a combination of options and xml.

> - there's plenty of other
> XML handing in our application so a little more XML parsing and
> generating wouldn't frighten us.

Great.  Feel free to poke us if you need more info

> 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
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
>




More information about the Pacemaker mailing list