ClusterLabs / pcs

Pacemaker command line interface and GUI
GNU General Public License v2.0
250 stars 115 forks source link

usage as library #187

Open h5rdly opened 5 years ago

h5rdly commented 5 years ago

I wanted to ask whether it would be possible to add library functionality to pcs, eg importing it and using some of its functions as api, to control pacemaker directly from Python

Thanks, Eli

tomjelinek commented 5 years ago

This is one of our long term goals. We have been working on it for quite some time now. However, there are always other priorities, features to be added and bugs to be fixed. And this basically requires most of the pcs code base to be overhauled. So I cannot make any promises about when this would be finished. Most of the recently added features can be used as a library (e.g. qdevice, bundles and so on), while most of the more basic stuff (e.g. resources management) are still in the old architecture.

If you are interested, take a look at pcs.lib.commands package, which is a planned interface of the library. Going through that you can see which features are already in the library. Bear in mind this has not been released yet as a public API and therefore it may change at any time.

h5rdly commented 5 years ago

Thank you