HomeClusterLabs Projects

Refactor: cts: Drop key == "Name" test from ClusterManager.__getitem__()

Description

Refactor: cts: Drop key == "Name" test from ClusterManager.getitem()

name is a public member, so access it directly. It wouldn't hurt to
make it a property in the future, but there's no reason to treat it like
a dict member.

We replace a couple of existing self.templates["Name"] uses as well.
Note that self.templates["Name"] ends up being exactly self.name for a
Corosync2 instance ("crm-corosync") and incorrect for any other type of
ClusterManager ("crm-base").

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Sun, Aug 17, 10:14 PM
Parents
rP397b83d2ee10: Refactor: cts: Drop redundant Corosync2.templates assignment
Branches
Unknown
Tags
Unknown