From: Kefu Chai Date: Fri, 31 Jul 2020 05:05:15 +0000 (+0800) Subject: orchestra/cluster: be explicit that a positional argument is needed X-Git-Tag: 1.1.0~59^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1541%2Fhead;p=teuthology.git orchestra/cluster: be explicit that a positional argument is needed otherwise the caller may run into sh() missing 1 required positional argument: 'script' if the developer only check the function signature of Cluster.sh(). Signed-off-by: Kefu Chai --- diff --git a/teuthology/orchestra/cluster.py b/teuthology/orchestra/cluster.py index 50e078cd8..dbc74de02 100644 --- a/teuthology/orchestra/cluster.py +++ b/teuthology/orchestra/cluster.py @@ -63,7 +63,7 @@ class Cluster(object): remotes = sorted(self.remotes.keys(), key=lambda rem: rem.name) return [remote.run(**kwargs) for remote in remotes] - def sh(self, **kwargs): + def sh(self, script, **kwargs): """ Run a command on all the nodes in this cluster. @@ -72,7 +72,7 @@ class Cluster(object): Returns a list of the command outputs correspondingly. """ remotes = sorted(self.remotes.keys(), key=lambda rem: rem.name) - return [remote.sh(**kwargs) for remote in remotes] + return [remote.sh(script, **kwargs) for remote in remotes] def write_file(self, file_name, content, sudo=False, perms=None, owner=None): """