forked from Seagate/cortx-rgw-integration
-
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.
Signed-off-by: Sachitanand Shelake <[email protected]>
- Loading branch information
1 parent
e9fe71a
commit 4cac866
Showing
4 changed files
with
81 additions
and
25 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 |
---|---|---|
|
@@ -15,3 +15,6 @@ | |
# For any questions about this software or licensing, | ||
# please email [email protected] or [email protected]. | ||
|
||
""" | ||
init class for rgw | ||
""" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/env python3 | ||
#!/usr/bin/python3 | ||
|
||
# Copyright (c) 2021 Seagate Technology LLC and/or its Affiliates | ||
# This program is free software: you can redistribute it and/or modify | ||
|
@@ -14,30 +14,39 @@ | |
# For any questions about this software or licensing, | ||
# please email [email protected] or [email protected]. | ||
|
||
import os | ||
import sys | ||
import errno | ||
import inspect | ||
import argparse | ||
import traceback | ||
|
||
from cortx.utils.log import Log | ||
from cortx.utils.cmd_framework import Cmd | ||
from cortx.rgw.setup import Rgw | ||
from setup import Rgw | ||
from error import SetupError | ||
|
||
class SetupCmdBase(cmd): | ||
""" | ||
Setup cmd base class. | ||
""" | ||
|
||
def __init__(self, *args): | ||
""" | ||
Initialize super class members | ||
""" | ||
super().__init__(*args) | ||
|
||
def add_args(parser): | ||
parser.add_argument('--services', default='services', help='services') | ||
parser.add_argument('--config', default='config_url', help='config') | ||
|
||
class PostInstallCmd(SetupCmdBase): | ||
""" PostInstall Setup Cmd """ | ||
""" | ||
PostInstall Setup Cmd | ||
""" | ||
|
||
name = 'post_install' | ||
|
||
def __init__(self, args: dict): | ||
"""Initialize super class members""" | ||
super().__init__(args) | ||
|
||
def process(self): | ||
|
@@ -47,21 +56,27 @@ def process(self): | |
|
||
|
||
class PrepareCmd(SetupCmdBase): | ||
""" Prepare Setup Cmd """ | ||
""" | ||
Prepare Setup Cmd | ||
""" | ||
name = 'prepare' | ||
|
||
def __init__(self, args: dict): | ||
"""Initialize super class members""" | ||
super().__init__(args) | ||
|
||
def process(self): | ||
return 0 | ||
|
||
|
||
class ConfigCmd(SetupCmdBase): | ||
""" Setup Config Cmd """ | ||
""" | ||
Setup Config Cmd | ||
""" | ||
name = 'config' | ||
|
||
def __init__(self, args): | ||
"""Initialize super class members""" | ||
super().__init__(args) | ||
|
||
def process(self): | ||
|
@@ -71,10 +86,13 @@ def process(self): | |
|
||
|
||
class InitCmd(SetupCmdBase): | ||
""" Init Setup Cmd """ | ||
""" | ||
Init Setup Cmd | ||
""" | ||
name = 'init' | ||
|
||
def __init__(self, args): | ||
"""Initialize super class members""" | ||
super().__init__(args) | ||
self.config_path = args.config | ||
|
||
|
@@ -85,10 +103,13 @@ def process(self): | |
|
||
|
||
class TestCmd(SetupCmdBase): | ||
""" Test Setup Cmd """ | ||
""" | ||
Test Setup Cmd | ||
""" | ||
name = 'test' | ||
|
||
def __init__(self, args): | ||
"""Initialize super class members""" | ||
super().__init__(args) | ||
self.config_path = args.config | ||
# Default test_plan is 'sanity' | ||
|
@@ -101,10 +122,13 @@ def process(self): | |
|
||
|
||
class ResetCmd(SetupCmdBase): | ||
""" Reset Setup Cmd """ | ||
""" | ||
Reset Setup Cmd | ||
""" | ||
name = 'reset' | ||
|
||
def __init__(self, args): | ||
""" Initialize super class members """ | ||
super().__init__(args) | ||
self.config_path = args.config | ||
|
||
|
@@ -115,10 +139,13 @@ def process(self): | |
|
||
|
||
class CleanupCmd(SetupCmdBase): | ||
""" Cleanup Setup Cmd """ | ||
""" | ||
Cleanup Setup Cmd | ||
""" | ||
name = 'cleanup' | ||
|
||
def __init__(self, args: dict): | ||
"""Initialize super class members""" | ||
super().__init__(args) | ||
|
||
def process(self): | ||
|
@@ -128,10 +155,13 @@ def process(self): | |
|
||
|
||
class UpgradeCmd(SetupCmdBase): | ||
"""Upgrade Setup Cmd.""" | ||
""" | ||
Upgrade Setup Cmd | ||
""" | ||
name = 'upgrade' | ||
|
||
def __init__(self, args: dict): | ||
"""Initialize super class members""" | ||
super().__init__(args) | ||
|
||
def process(self): | ||
|
@@ -141,7 +171,6 @@ def process(self): | |
|
||
|
||
def main(): | ||
from cortx.utils.conf_store import Conf | ||
argv = sys.argv | ||
|
||
Log.init() # TODO | ||
|