HomeClusterLabs Projects

Refactor: python: Change the arguments to the Test add_cmd functions.

Description

Refactor: python: Change the arguments to the Test add_cmd functions.

cmd is now a keyword argument, and then all the other arguments just
get merged into "**kwargs" in the function headers. Within the
functions themselves, we extract what we need from kwargs with .get(),
passing whatever default value used to be in the header.

Note also that the args parameter gets removed from kwargs with .pop().
This is because _new_cmd already has an args parameter and having it in
kwargs as well is an error.

Further, note that callers of these functions need to specify the
parameter names when passing kwargs instead of just relying on
everything to work out based on their position. Those fixes will come
in future patches.

Details

Provenance
clumensAuthored on Jun 4 2024, 1:36 PM
Parents
rP678ca180f2e9: Refactor: CTS: Disable the private access warnings in cts-exec.
Branches
Unknown
Tags
Unknown