forked from gluster/redant
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cluster creation and glusterd start in framework
The handling of cluster start and glusterd start will be done at the main level. If it is nonDisruptive TCs, then the cluster or glusterd working won't be tampered with unless and until there's some serious issue or a new bug. It is only for the disruptive cases wherein the cluster recreation and glusterd startup will come handy. Fixes: gluster#220 Signed-off-by: srijan-sivakumar <[email protected]>
- Loading branch information
srijan-sivakumar
committed
Apr 22, 2021
1 parent
a828794
commit ca587b0
Showing
5 changed files
with
50 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import sys | ||
sys.path.insert(1, ".") | ||
from common.mixin import RedantMixin | ||
|
||
class environ: | ||
""" | ||
Framework level control on the gluster environment. Controlling both | ||
the setup and the complete cleanup. | ||
""" | ||
|
||
def __init__(self, config_hashm : dict, log_path : str, log_level : str): | ||
""" | ||
Redant mixin obj to be used for server setup and teardown operations | ||
has to be created. | ||
""" | ||
self.server_details = config_hashm['servers_info'] | ||
machine_details = {**self.server_details} | ||
self.redant = RedantMixin(machine_details) | ||
self.redant.init_logger("environ", log_path, log_level) | ||
self.redant.establish_connection() | ||
|
||
def setup_env(self): | ||
""" | ||
Setting up of the environment before the TC execution begins. | ||
""" | ||
self.redant.start_glusterd() | ||
self.redant.create_cluster(list(self.server_details.keys())) | ||
|
||
def teardown_env(self): | ||
""" | ||
The teardown of the complete environment once the test framework | ||
ends. | ||
""" | ||
pass | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters