]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
python-common: reformat ServiceSpec class level service type lists
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 14 Dec 2023 00:20:45 +0000 (19:20 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 21 Mar 2024 22:30:58 +0000 (18:30 -0400)
commit4fc2697fb1e4dc71b480db275aa4e54c2b66d018
tree34885398ff3b191ff80875b77361b81b79a0b2ad
parent41e2b27817c783f3b4b142441ed827e1827482d6
python-common: reformat ServiceSpec class level service type lists

Reformat the ServiceSpec classes properties KNOWN_SERVICE_TYPES and
REQUIRES_SERVICE_ID. These were previously strings that were converted
to lists via a call to split. With a string there's very little a human
or a tool can do to validate the content. Changing these into proper
lists in the source code brings clarity of intent and the ability to
analyze the code. Because there's no semantic difference what services
are listed where (this means the type could probably be a set - a quest
for another day) I also took the opportunity to sort the contents of the
lists and add some basic comments for what these lists are for.

It also removes the use of (ugly, IMO) line continuations. The downside
is that it makes more total lines, but if that bugs you - use code
folding :-).

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/python-common/ceph/deployment/service_spec.py