[ClusterLabs] Antw: Coming in pacemaker 2.0.2: XML output from tools

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Thu Apr 18 02:04:14 EDT 2019


>>> Ken Gaillot <kgaillot at redhat.com> schrieb am 17.04.2019 um 22:53 in
Nachricht
<57f8ec2dcee0c715e2bc1146005e86e7844306d1.camel at redhat.com>:
> Hi all,
> 
> Another new feature considered experimental in the upcoming pacemaker
> release is XML output from tools for easier automated parsing. To begin
> with, only stonith_admin will support the new syntax; more tools will
> be added in later releases.

As XML is only as good as ist structure, would you present the structure of
such XML output?

> 
> stonith_admin (and eventually all the tools) will accept two new
> command‑line options:
> 
>   ‑‑output‑as <format>
>   ‑‑output‑to <file>
> 
> The selected format may be "text" (the default) or "xml". If "text",
> the tool will behave the same ‑‑ it will print human‑friendly, plain
> text output. If "xml", the tool will print results in XML format; a
> schema will be provided in /usr/share/pacemaker/schemas/api.
> 
> A file name may be specified to send output to the specified file (if
> unspecified or "‑", it will print to standard output as usual).
> 
> The benefit of XML format is that it will be more reliable for external
> applications to parse than relying on human‑friendly messages that may
> change from release to release. The goal will be to keep the XML format
> backward‑compatible with new releases.

Will textual status messages be replaced with status codes then? I feel that
is important to process outpout independent of any localization.

> 
> For 2.0.2, the XML format will be considered experimental, and may
> change in future releases (though we don't expect it will for
> stonith_admin).
> 
> The feature has been designed so that it would be relatively easy to
> add new formats (such as JSON) if the need arises.

...or he good old UNIX status lines:
200 The cluster is happy

;-)

Regards,
Ulrich


> ‑‑ 
> Ken Gaillot <kgaillot at redhat.com>
> 
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users 
> 
> ClusterLabs home: https://www.clusterlabs.org/ 





More information about the Users mailing list