]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/salt_manager: Change Salt master role
authorGeorgios Kyratsas <gkyratsas@suse.com>
Tue, 9 Jun 2020 10:50:51 +0000 (12:50 +0200)
committerStefen Allen <sallen@suse.com>
Thu, 9 Dec 2021 19:29:46 +0000 (12:29 -0700)
Adding as optional  parameter in the constructor the teuthology role that will be
used as the salt master.

Signed-off-by: Georgios Kyratsas <gkyratsas@suse.com>
qa/tasks/salt_manager.py

index 28bf6eae3e23e8662856eb732d08185a2a16416d..653d44b93e3febac7884a2c0a93ac818cabd1144 100644 (file)
@@ -47,10 +47,13 @@ def systemctl_remote(remote, subcommand, service_name):
 
 
 class SaltManager(object):
-
-    def __init__(self, ctx):
+    """
+    :param ctx:     Context from the main task
+    :param role:    role that will be used as Salt Master (default 'client.salt_master')
+    """
+    def __init__(self, ctx, role=master_role):
         self.ctx = ctx
-        self.master_remote = get_remote_for_role(self.ctx, master_role)
+        self.master_remote = get_remote_for_role(self.ctx, role)
 
     def __cat_file_cluster(self, filename=None):
         """