On Wed, Feb 2, 2022 at 7:06 PM Ken Gaillot <kgail...@redhat.com> wrote:
> On Wed, 2022-02-02 at 18:46 +0100, Lentes, Bernd wrote: > > Hi, > > > > i need to write some scripts for our cluster. Until now i wrote bash > > scripts. > > But i like to learn python. Is there a package for pacemaker ? > > What i found is: https://pypi.org/project/pacemaker/ and i'm not sure > > what that is. > > > > Thanks. > > > > Bernd > > Not currently (that's an unrelated project I wasn't aware of). It is a > goal to make one, but time hasn't been available. > > We're taking a big step towards it by creating a high-level C API for > Pacemaker that's essentially equivalent to how the command-line tools > work. It will be much easier to wrap this API in Python. There are > already high-level API equivalents of crmadmin and crm_simulate, and > the crm_mon equivalent is expected in the next release. > > In the meantime, the easiest approach is probably just to use the > subprocess module to execute the Pacemaker command-line tools to do > what you want. > You might as well use pcs, crmsh or cts as a source of inspiration as they are all 3 written in python. AFAIK none of those offers a (stable) python API (yet) though. Klaus > -- > Ken Gaillot <kgail...@redhat.com> > > _______________________________________________ > Manage your subscription: > https://lists.clusterlabs.org/mailman/listinfo/users > > ClusterLabs home: https://www.clusterlabs.org/ > >
_______________________________________________ Manage your subscription: https://lists.clusterlabs.org/mailman/listinfo/users ClusterLabs home: https://www.clusterlabs.org/