HomeClusterLabs Projects

Refactor: python: Simplify creating a ConfigFactory instance.

Description

Refactor: python: Simplify creating a ConfigFactory instance.

Previously, we had a registration function and a (unused) deregistration
function and multiple CIB classes for supporting multiple schema
versions, all of which ended up in the same class. This would jump
through a bunch of hoops to create an attribute in the ConfigFactory
object so createConfig could later call that attribute as a function and
it would get the right version built.

Somehow, ConfigFactoryItem would help with this.

Considering how we don't really use this schema version support and even
if we did, it's only three classes, this seems overly complicated. So
just get rid of all the registration stuff multiple CIB classes. Have
ConfigFactory return an instance of the single CIB class directly,
adding its schema version as an attribute.

We could potentially also get rid of ConfigFactory entirely and just
have the caller build a CIB object, but the ConfigFactory is pretty
tangled up in all the code. For now, it can stay.

ConfigFactoryItem can go away, as can the blurb about supporting
pacemaker-1.0.

Details

Provenance
clumensAuthored on Jul 3 2023, 3:19 PM
Parents
rP6b6cda25021d: Refactor: python: Remove cluster_monitor from CTS.
Branches
Unknown
Tags
Unknown