For 2.1.8 (this task), we should deprecate (via doxygen comments) all current libcrmcluster public APIs (in include/crm/cluster.h), except the following APIs that need special handling:
- enum cluster_type_e: deprecate this name and create an equivalent enum pcmk_cluster_type (the enum value names are fine and do not need to be deprecated)
- Make crm_cluster_t a deprecated type alias for a new name pcmk_cluster_t
- Deprecate direct access to all members
- Create new public API functions to set destroy() (note: the destroy function is passed a void pointer to the pcmk_cluster_t as its argument) and cpg.cpg_confchg_fn
- Make get_cluster_type(), name_for_cluster_type(), and crm_cluster_connect() deprecated wrappers for new public API equivalents pcmk_cluster_type(), pcmk_cluster_type_text(), and pcmk_cluster_connect()
- Keep pcmk_cluster_new() and pcmk_cluster_free() public (do not deprecate)
For 3.0.0 (T793), drop any deprecated APIs not used internally except the ones handled specially above, and make the remaining deprecated APIs internal. For pcmk_cluster_t, we can replace all deprecated struct members except destroy() and cpg with a void *private member that can be used internally for a new internal struct containing the deprecated members. (We may want to re-expose certain APIs after a redesign, but that can wait.)
SBD will need to be updated (T794), but Pacemaker and SBD should be able to build together regardless of their versions.