Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rebuild project structure #503

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions common/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
from common.obdiag_exception import OBDIAGShellCmdException
from common.tool import StringUtils
from common.tool import TimeUtils
from stdio import SafeStdio
from err import EC_SSH_CONNECT
from obdiag.stdio import SafeStdio
from obdiag.err import EC_SSH_CONNECT
from subprocess32 import Popen, PIPE

warnings.filterwarnings("ignore")
Expand Down
2 changes: 1 addition & 1 deletion common/ssh_client/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"""
import sys

from stdio import SafeStdio
from obdiag.stdio import SafeStdio


class SsherClient(SafeStdio):
Expand Down
2 changes: 1 addition & 1 deletion common/ssh_client/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from common.ssh_client.kubernetes_client import KubernetesClient
from common.ssh_client.local_client import LocalClient
from common.ssh_client.remote_client import RemoteClient
from stdio import SafeStdio
from obdiag.stdio import SafeStdio


class SshClient(SafeStdio):
Expand Down
4 changes: 2 additions & 2 deletions common/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
import copy
from colorama import Fore, Style
from ruamel.yaml import YAML
from err import EC_SQL_EXECUTE_FAILED
from stdio import SafeStdio
from obdiag.err import EC_SQL_EXECUTE_FAILED
from obdiag.stdio import SafeStdio

_open = open
encoding_open = open
Expand Down
2 changes: 1 addition & 1 deletion handler/analyzer/analyze_flt_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from common.tool import Util
from common.tool import DirectoryUtil
from common.tool import FileUtil
from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


class AnalyzeFltTraceHandler(object):
Expand Down
2 changes: 1 addition & 1 deletion handler/analyzer/analyze_index_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from common.tool import StringUtils, Util
from common.ob_connector import OBConnector
from common.command import get_observer_version
from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


def translate_byte(B):
Expand Down
2 changes: 1 addition & 1 deletion handler/analyzer/analyze_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from common.tool import FileUtil
from common.tool import TimeUtils
import common.ssh_client.local_client as ssh_client_local_client
from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


class AnalyzeLogHandler(BaseShellHandler):
Expand Down
2 changes: 1 addition & 1 deletion handler/analyzer/analyze_parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import datetime
from colorama import Fore, Style

from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


class AnalyzeParameterHandler(object):
Expand Down
2 changes: 1 addition & 1 deletion handler/analyzer/analyze_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from common.tool import FileUtil
from common.tool import TimeUtils
import common.ssh_client.local_client as ssh_client_local_client
from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult

from common.ob_connector import OBConnector
import re
Expand Down
2 changes: 1 addition & 1 deletion handler/analyzer/analyze_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from handler.analyzer.sql.meta.sys_tenant_meta import SysTenantMeta
from handler.gather.gather_scenes import GatherSceneHandler
from common.command import get_observer_version
from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


class AnalyzeSQLHandler(object):
Expand Down
2 changes: 1 addition & 1 deletion handler/analyzer/analyze_variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import datetime
from colorama import Fore, Style

from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


class AnalyzeVariableHandler(object):
Expand Down
2 changes: 1 addition & 1 deletion handler/checker/check_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import yaml

from common.tool import Util
from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


class CheckListHandler:
Expand Down
4 changes: 2 additions & 2 deletions handler/display/display_scenes.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

import os
import re
from result_type import ObdiagResult
from stdio import SafeStdio
from obdiag.result_type import ObdiagResult
from obdiag.stdio import SafeStdio
import datetime
from handler.display.scenes.base import SceneBase
from common.obdiag_exception import OBDIAGFormatException
Expand Down
2 changes: 1 addition & 1 deletion handler/display/scenes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@file: base.py
@desc:
"""
from stdio import SafeStdio
from obdiag.stdio import SafeStdio
from common.scene import filter_by_version
from handler.display.step.base import Base
from common.tool import StringUtils
Expand Down
4 changes: 2 additions & 2 deletions handler/display/scenes/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

import os

from result_type import ObdiagResult
from stdio import SafeStdio
from obdiag.result_type import ObdiagResult
from obdiag.stdio import SafeStdio
from common.tool import YamlUtils
from handler.display.scenes.register import hardcode_scene_list
from common.tool import Util
Expand Down
2 changes: 1 addition & 1 deletion handler/display/step/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@desc:
"""
from common.ssh_client.ssh import SshClient
from stdio import SafeStdio
from obdiag.stdio import SafeStdio
from handler.display.step.ssh import SshHandler
from handler.display.step.sql import StepSQLHandler

Expand Down
2 changes: 1 addition & 1 deletion handler/display/step/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@desc:
"""
import os
from stdio import SafeStdio
from obdiag.stdio import SafeStdio
from common.ob_connector import OBConnector
from tabulate import tabulate
from common.tool import StringUtils
Expand Down
2 changes: 1 addition & 1 deletion handler/display/step/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import os

from common.ssh_client.ssh import SshClient
from stdio import SafeStdio
from obdiag.stdio import SafeStdio
from common.tool import StringUtils


Expand Down
4 changes: 2 additions & 2 deletions handler/gather/gather_ash_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
from common.ob_connector import OBConnector
from common.obdiag_exception import OBDIAGFormatException, OBDIAGException
from common.tool import DirectoryUtil, TimeUtils, Util, StringUtils
from result_type import ObdiagResult
from stdio import SafeStdio
from obdiag.result_type import ObdiagResult
from obdiag.stdio import SafeStdio
from colorama import Fore, Style


Expand Down
2 changes: 1 addition & 1 deletion handler/gather/gather_awr.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from common.tool import Util
from common.tool import TimeUtils
from common.ocp import ocp_task, ocp_api
from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


class GatherAwrHandler(object):
Expand Down
2 changes: 1 addition & 1 deletion handler/gather/gather_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from common.tool import FileUtil
from common.tool import NetUtils
from handler.gather.plugins.redact import Redact
from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


class GatherLogHandler(BaseShellHandler):
Expand Down
2 changes: 1 addition & 1 deletion handler/gather/gather_obadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from common.tool import DirectoryUtil
from common.tool import FileUtil
from common.tool import NetUtils
from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


class GatherObAdminHandler(BaseShellHandler):
Expand Down
2 changes: 1 addition & 1 deletion handler/gather/gather_obproxy_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from common.tool import FileUtil
from common.tool import NetUtils
from common.tool import TimeUtils
from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


class GatherObProxyLogHandler(BaseShellHandler):
Expand Down
2 changes: 1 addition & 1 deletion handler/gather/gather_obstack2.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from common.tool import FileUtil
from common.tool import NetUtils
from common.tool import StringUtils
from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


class GatherObstack2Handler(BaseShellHandler):
Expand Down
2 changes: 1 addition & 1 deletion handler/gather/gather_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import csv
from colorama import Fore, Style

from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


class GatherParametersHandler(object):
Expand Down
2 changes: 1 addition & 1 deletion handler/gather/gather_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from common.tool import FileUtil
from common.tool import NetUtils
from common.tool import TimeUtils
from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


class GatherPerfHandler(BaseShellHandler):
Expand Down
2 changes: 1 addition & 1 deletion handler/gather/gather_plan_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from common.tool import FileUtil
from common.tool import TimeUtils
from handler.gather.gather_tabledump import GatherTableDumpHandler
from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


class GatherPlanMonitorHandler(object):
Expand Down
4 changes: 2 additions & 2 deletions handler/gather/gather_scenes.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

import os
import re
from result_type import ObdiagResult
from stdio import SafeStdio
from obdiag.result_type import ObdiagResult
from obdiag.stdio import SafeStdio
import datetime
from handler.gather.scenes.base import SceneBase
from common.obdiag_exception import OBDIAGFormatException
Expand Down
2 changes: 1 addition & 1 deletion handler/gather/gather_sysstat.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
from common.tool import FileUtil
from common.tool import NetUtils
from common.tool import TimeUtils
from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


class GatherOsInfoHandler(BaseShellHandler):
Expand Down
4 changes: 2 additions & 2 deletions handler/gather/gather_tabledump.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import os
import time

from result_type import ObdiagResult
from stdio import SafeStdio
from obdiag.result_type import ObdiagResult
from obdiag.stdio import SafeStdio
from common.ob_connector import OBConnector
from common.tool import StringUtils
from common.command import get_observer_version
Expand Down
2 changes: 1 addition & 1 deletion handler/gather/gather_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import csv
from colorama import Fore, Style

from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


class GatherVariablesHandler(object):
Expand Down
2 changes: 1 addition & 1 deletion handler/gather/scenes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@file: base.py
@desc:
"""
from stdio import SafeStdio
from obdiag.stdio import SafeStdio
from common.scene import filter_by_version
from handler.gather.step.base import Base
from common.tool import StringUtils
Expand Down
2 changes: 1 addition & 1 deletion handler/gather/scenes/cpu_high.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import os

from common.ssh_client.ssh import SshClient
from stdio import SafeStdio
from obdiag.stdio import SafeStdio
from handler.gather.gather_obstack2 import GatherObstack2Handler
from handler.gather.gather_perf import GatherPerfHandler
from handler.gather.gather_log import GatherLogHandler
Expand Down
4 changes: 2 additions & 2 deletions handler/gather/scenes/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

import os

from result_type import ObdiagResult
from stdio import SafeStdio
from obdiag.result_type import ObdiagResult
from obdiag.stdio import SafeStdio
from common.tool import YamlUtils
from handler.gather.scenes.register import hardcode_scene_list
from common.tool import Util
Expand Down
2 changes: 1 addition & 1 deletion handler/gather/scenes/sql_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@desc:
"""

from stdio import SafeStdio
from obdiag.stdio import SafeStdio
from handler.gather.gather_log import GatherLogHandler
from handler.gather.gather_obproxy_log import GatherObProxyLogHandler
from handler.gather.gather_plan_monitor import GatherPlanMonitorHandler
Expand Down
2 changes: 1 addition & 1 deletion handler/gather/step/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@desc:
"""
from common.ssh_client.ssh import SshClient
from stdio import SafeStdio
from obdiag.stdio import SafeStdio
from handler.gather.step.ssh import SshHandler
from handler.gather.step.sql import StepSQLHandler
from handler.gather.gather_log import GatherLogHandler
Expand Down
2 changes: 1 addition & 1 deletion handler/gather/step/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@desc:
"""
import os
from stdio import SafeStdio
from obdiag.stdio import SafeStdio
from common.ob_connector import OBConnector
from tabulate import tabulate
from common.tool import StringUtils
Expand Down
2 changes: 1 addition & 1 deletion handler/gather/step/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import os

from common.ssh_client.ssh import SshClient
from stdio import SafeStdio
from obdiag.stdio import SafeStdio
from common.tool import StringUtils


Expand Down
2 changes: 1 addition & 1 deletion handler/rca/rca_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from common.tool import StringUtils
from colorama import Fore, Style

from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


class RCAHandler:
Expand Down
2 changes: 1 addition & 1 deletion handler/rca/rca_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from common.constant import const
from common.tool import DynamicLoading
from common.tool import Util
from result_type import ObdiagResult
from obdiag.result_type import ObdiagResult


class RcaScenesListHandler:
Expand Down
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"""

import sys
from diag_cmd import MainCommand
from stdio import IO
from obdiag.diag_cmd import MainCommand
from obdiag.stdio import IO

ROOT_IO = IO(1)

Expand Down
Loading
Loading