]> git.apps.os.sepia.ceph.com Git - ceph-ci.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)
committerAdam King <adking@redhat.com>
Mon, 15 Apr 2024 15:01:30 +0000 (11:01 -0400)
commit7e5bcc3045d335a8ccd7e3ed999fb29fdc030bc2
treed5f12b08f35219f0d613334c038304892bc45a48
parentbb07baf82038351527e4c4fb21c180c00a894f1e
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>
(cherry picked from commit 0847ee2ee4531f2bb02ee3cc2a290c4c10fe4330)
src/pybind/mgr/cephadm/module.py