]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/cephadm: simplify _get_container_image a bit
authorJohn Mulligan <jmulligan@redhat.com>
Fri, 5 Jan 2024 15:45:08 +0000 (10:45 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 21 Mar 2024 22:30:58 +0000 (18:30 -0400)
commit0847ee2ee4531f2bb02ee3cc2a290c4c10fe4330
treea841e58d9c5ba26783b1de6045905d1f6aaadf80
parent3985325e6983e3440ebb73a5b328071c096ac027
mgr/cephadm: simplify _get_container_image a bit

Because the "if-ladder" was only ever assigning a single variable with
a value it can be directly replaced by a dict & dict-lookup which is
much more succinct.
Also take the opportunity to sort the (non-comment) lines as there's
no meaning to the previous order and this makes it easier for a reader
to scan through.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/cephadm/module.py