Re: [ClusterLabs] Is there a python package for pacemaker ?

2022-02-03 Thread Klaus Wenninger
On Wed, Feb 2, 2022 at 7:06 PM Ken Gaillot  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 
>
> ___
> 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/


Re: [ClusterLabs] Is there a python package for pacemaker ?

2022-02-02 Thread Ken Gaillot
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.
-- 
Ken Gaillot 

___
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/


[ClusterLabs] Is there a python package for pacemaker ?

2022-02-02 Thread Lentes, Bernd
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
-- 

Bernd Lentes 
System Administrator 
Institute for Metabolism and Cell Death (MCD) 
Building 25 - office 122 
HelmholtzZentrum München 
bernd.len...@helmholtz-muenchen.de 
phone: +49 89 3187 1241 
fax: +49 89 3187 2294 
http://www.helmholtz-muenchen.de/mcd 


Public key: 

30 82 01 0a 02 82 01 01 00 b3 72 3e ce 2c 0a 6f 58 49 2c 92 23 c7 b9 c1 ff 6c 
3a 53 be f7 9e e9 24 b7 49 fa 3c e8 de 28 85 2c d3 ed f7 70 03 3f 4d 82 fc cc 
96 4f 18 27 1f df 25 b3 13 00 db 4b 1d ec 7f 1b cf f9 cd e8 5b 1f 11 b3 a7 48 
f8 c8 37 ed 41 ff 18 9f d7 83 51 a9 bd 86 c2 32 b3 d6 2d 77 ff 32 83 92 67 9e 
ae ae 9c 99 ce 42 27 6f bf d8 c2 a1 54 fd 2b 6b 12 65 0e 8a 79 56 be 53 89 70 
51 02 6a eb 76 b8 92 25 2d 88 aa 57 08 42 ef 57 fb fe 00 71 8e 90 ef b2 e3 22 
f3 34 4f 7b f1 c4 b1 7c 2f 1d 6f bd c8 a6 a1 1f 25 f3 e4 4b 6a 23 d3 d2 fa 27 
ae 97 80 a3 f0 5a c4 50 4a 45 e3 45 4d 82 9f 8b 87 90 d0 f9 92 2d a7 d2 67 53 
e6 ae 1e 72 3e e9 e0 c9 d3 1c 23 e0 75 78 4a 45 60 94 f8 e3 03 0b 09 85 08 d0 
6c f3 ff ce fa 50 25 d9 da 81 7b 2a dc 9e 28 8b 83 04 b4 0a 9f 37 b8 ac 58 f1 
38 43 0e 72 af 02 03 01 00 01


smime.p7s
Description: S/MIME Cryptographic Signature
___
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/