]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
qa/tasks: reduce duplicated code
authorJohn Mulligan <jmulligan@redhat.com>
Tue, 27 Feb 2024 14:44:51 +0000 (09:44 -0500)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 21 Mar 2024 22:31:16 +0000 (18:31 -0400)
commitbf1607a4a14e92a745cd8d7e743e5f81b7d407b7
treee30ec702e8aeeb67f35358aca965c26827588cc4
parent361cbd46b9c5431452c742edd3ca7f0280e4161b
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>
qa/tasks/cephadm.py