]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
qa/tasks: reduce duplicated code
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 27 Feb 2024 14:44:51 +0000 (09:44 -0500)
committerAdam King <adking@redhat.com>
Mon, 15 Apr 2024 15:01:30 +0000 (11:01 -0400)
commitbd922cf657e1c68a01083e91ebf0a13b6dc16d2a
tree5d778d9e5ccb8e928a00ecace400310942221441
parent636f55b2e7d92c0b03f8127c305c0a11da9d4052
qa/tasks: reduce duplicated code

All `exec`-style function in teuthology appear to have a transformation
block that expands names like `all-roles` and `all-hosts`. With the new
cephadm.exec task that block appeared twice in cephadm.py. This change
removes the duplication by creating an _expand_roles function that
can be called from the command executing functions.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
(cherry picked from commit bf1607a4a14e92a745cd8d7e743e5f81b7d407b7)
qa/tasks/cephadm.py