diff --git a/common/ssh.py b/common/ssh.py index ccd8a40c..fc58afaf 100644 --- a/common/ssh.py +++ b/common/ssh.py @@ -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") diff --git a/common/ssh_client/base.py b/common/ssh_client/base.py index 3d235863..5fe8a006 100644 --- a/common/ssh_client/base.py +++ b/common/ssh_client/base.py @@ -17,7 +17,7 @@ """ import sys -from stdio import SafeStdio +from obdiag.stdio import SafeStdio class SsherClient(SafeStdio): diff --git a/common/ssh_client/ssh.py b/common/ssh_client/ssh.py index 8333039a..44500f94 100644 --- a/common/ssh_client/ssh.py +++ b/common/ssh_client/ssh.py @@ -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): diff --git a/common/tool.py b/common/tool.py index efb17eab..e1e5a118 100644 --- a/common/tool.py +++ b/common/tool.py @@ -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 diff --git a/handler/analyzer/analyze_flt_trace.py b/handler/analyzer/analyze_flt_trace.py index c8eb25d3..01050bd3 100644 --- a/handler/analyzer/analyze_flt_trace.py +++ b/handler/analyzer/analyze_flt_trace.py @@ -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): diff --git a/handler/analyzer/analyze_index_space.py b/handler/analyzer/analyze_index_space.py index ba2b2419..b2e52b5d 100644 --- a/handler/analyzer/analyze_index_space.py +++ b/handler/analyzer/analyze_index_space.py @@ -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): diff --git a/handler/analyzer/analyze_log.py b/handler/analyzer/analyze_log.py index f85eabc3..8c0631d7 100644 --- a/handler/analyzer/analyze_log.py +++ b/handler/analyzer/analyze_log.py @@ -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): diff --git a/handler/analyzer/analyze_parameter.py b/handler/analyzer/analyze_parameter.py index 40e5c012..1da8da26 100644 --- a/handler/analyzer/analyze_parameter.py +++ b/handler/analyzer/analyze_parameter.py @@ -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): diff --git a/handler/analyzer/analyze_queue.py b/handler/analyzer/analyze_queue.py index 62cf11cb..c2feac07 100644 --- a/handler/analyzer/analyze_queue.py +++ b/handler/analyzer/analyze_queue.py @@ -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 diff --git a/handler/analyzer/analyze_sql.py b/handler/analyzer/analyze_sql.py index ded4f21b..2467aa44 100644 --- a/handler/analyzer/analyze_sql.py +++ b/handler/analyzer/analyze_sql.py @@ -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): diff --git a/handler/analyzer/analyze_variable.py b/handler/analyzer/analyze_variable.py index 9199e77a..4431a05f 100644 --- a/handler/analyzer/analyze_variable.py +++ b/handler/analyzer/analyze_variable.py @@ -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): diff --git a/handler/checker/check_list.py b/handler/checker/check_list.py index 8a5d6451..cd794c3e 100644 --- a/handler/checker/check_list.py +++ b/handler/checker/check_list.py @@ -20,7 +20,7 @@ import yaml from common.tool import Util -from result_type import ObdiagResult +from obdiag.result_type import ObdiagResult class CheckListHandler: diff --git a/handler/display/display_scenes.py b/handler/display/display_scenes.py index 3e67b662..0a297606 100644 --- a/handler/display/display_scenes.py +++ b/handler/display/display_scenes.py @@ -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 diff --git a/handler/display/scenes/base.py b/handler/display/scenes/base.py index a15b546b..c44fca4a 100644 --- a/handler/display/scenes/base.py +++ b/handler/display/scenes/base.py @@ -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 diff --git a/handler/display/scenes/list.py b/handler/display/scenes/list.py index a31ee784..04e4a400 100644 --- a/handler/display/scenes/list.py +++ b/handler/display/scenes/list.py @@ -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 diff --git a/handler/display/step/base.py b/handler/display/step/base.py index 9642a721..47bcfead 100644 --- a/handler/display/step/base.py +++ b/handler/display/step/base.py @@ -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 diff --git a/handler/display/step/sql.py b/handler/display/step/sql.py index 2b166598..002c249b 100644 --- a/handler/display/step/sql.py +++ b/handler/display/step/sql.py @@ -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 diff --git a/handler/display/step/ssh.py b/handler/display/step/ssh.py index d0620f85..6a6f8fdb 100644 --- a/handler/display/step/ssh.py +++ b/handler/display/step/ssh.py @@ -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 diff --git a/handler/gather/gather_ash_report.py b/handler/gather/gather_ash_report.py index 6cd91510..9f07c7e7 100644 --- a/handler/gather/gather_ash_report.py +++ b/handler/gather/gather_ash_report.py @@ -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 diff --git a/handler/gather/gather_awr.py b/handler/gather/gather_awr.py index ae6b60f5..357c1df6 100644 --- a/handler/gather/gather_awr.py +++ b/handler/gather/gather_awr.py @@ -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): diff --git a/handler/gather/gather_log.py b/handler/gather/gather_log.py index e48c752c..822116cf 100644 --- a/handler/gather/gather_log.py +++ b/handler/gather/gather_log.py @@ -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): diff --git a/handler/gather/gather_obadmin.py b/handler/gather/gather_obadmin.py index 47e0d271..9a6a3dd6 100644 --- a/handler/gather/gather_obadmin.py +++ b/handler/gather/gather_obadmin.py @@ -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): diff --git a/handler/gather/gather_obproxy_log.py b/handler/gather/gather_obproxy_log.py index e512518f..839c2a2c 100644 --- a/handler/gather/gather_obproxy_log.py +++ b/handler/gather/gather_obproxy_log.py @@ -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): diff --git a/handler/gather/gather_obstack2.py b/handler/gather/gather_obstack2.py index b57e6f60..2bd78cb2 100644 --- a/handler/gather/gather_obstack2.py +++ b/handler/gather/gather_obstack2.py @@ -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): diff --git a/handler/gather/gather_parameters.py b/handler/gather/gather_parameters.py index 359ff423..28725604 100644 --- a/handler/gather/gather_parameters.py +++ b/handler/gather/gather_parameters.py @@ -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): diff --git a/handler/gather/gather_perf.py b/handler/gather/gather_perf.py index 84b217ce..2b0fb897 100644 --- a/handler/gather/gather_perf.py +++ b/handler/gather/gather_perf.py @@ -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): diff --git a/handler/gather/gather_plan_monitor.py b/handler/gather/gather_plan_monitor.py index 7ab0ba73..26f05b11 100644 --- a/handler/gather/gather_plan_monitor.py +++ b/handler/gather/gather_plan_monitor.py @@ -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): diff --git a/handler/gather/gather_scenes.py b/handler/gather/gather_scenes.py index a0ad5ee0..870400b8 100644 --- a/handler/gather/gather_scenes.py +++ b/handler/gather/gather_scenes.py @@ -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 diff --git a/handler/gather/gather_sysstat.py b/handler/gather/gather_sysstat.py index f78d0af8..6cfe1ea9 100644 --- a/handler/gather/gather_sysstat.py +++ b/handler/gather/gather_sysstat.py @@ -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): diff --git a/handler/gather/gather_tabledump.py b/handler/gather/gather_tabledump.py index 88ac6078..d41f81ed 100644 --- a/handler/gather/gather_tabledump.py +++ b/handler/gather/gather_tabledump.py @@ -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 diff --git a/handler/gather/gather_variables.py b/handler/gather/gather_variables.py index 970e5ad2..d0868154 100644 --- a/handler/gather/gather_variables.py +++ b/handler/gather/gather_variables.py @@ -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): diff --git a/handler/gather/scenes/base.py b/handler/gather/scenes/base.py index 69bc7ea2..06372110 100644 --- a/handler/gather/scenes/base.py +++ b/handler/gather/scenes/base.py @@ -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 diff --git a/handler/gather/scenes/cpu_high.py b/handler/gather/scenes/cpu_high.py index abf52d2e..c1e0ff82 100644 --- a/handler/gather/scenes/cpu_high.py +++ b/handler/gather/scenes/cpu_high.py @@ -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 diff --git a/handler/gather/scenes/list.py b/handler/gather/scenes/list.py index 099e13a8..1bcc567d 100644 --- a/handler/gather/scenes/list.py +++ b/handler/gather/scenes/list.py @@ -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 diff --git a/handler/gather/scenes/sql_problem.py b/handler/gather/scenes/sql_problem.py index 8d9c43b2..d6955474 100644 --- a/handler/gather/scenes/sql_problem.py +++ b/handler/gather/scenes/sql_problem.py @@ -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 diff --git a/handler/gather/step/base.py b/handler/gather/step/base.py index ee1bb9c2..b8427ae4 100644 --- a/handler/gather/step/base.py +++ b/handler/gather/step/base.py @@ -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 diff --git a/handler/gather/step/sql.py b/handler/gather/step/sql.py index 2691daf9..645f2b5e 100644 --- a/handler/gather/step/sql.py +++ b/handler/gather/step/sql.py @@ -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 diff --git a/handler/gather/step/ssh.py b/handler/gather/step/ssh.py index cdc1511b..a538356c 100644 --- a/handler/gather/step/ssh.py +++ b/handler/gather/step/ssh.py @@ -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 diff --git a/handler/rca/rca_handler.py b/handler/rca/rca_handler.py index 569a134c..49c3d06c 100644 --- a/handler/rca/rca_handler.py +++ b/handler/rca/rca_handler.py @@ -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: diff --git a/handler/rca/rca_list.py b/handler/rca/rca_list.py index bd6c3914..a042a76f 100644 --- a/handler/rca/rca_list.py +++ b/handler/rca/rca_list.py @@ -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: diff --git a/main.py b/main.py index f3434a45..1d3c5d2b 100644 --- a/main.py +++ b/main.py @@ -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) diff --git a/obdiag/__init__.py b/obdiag/__init__.py new file mode 100644 index 00000000..614ceaff --- /dev/null +++ b/obdiag/__init__.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +# -*- coding: UTF-8 -* +# Copyright (c) 2022 OceanBase +# OceanBase Diagnostic Tool is licensed under Mulan PSL v2. +# You can use this software according to the terms and conditions of the Mulan PSL v2. +# You may obtain a copy of Mulan PSL v2 at: +# http://license.coscl.org.cn/MulanPSL2 +# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +# See the Mulan PSL v2 for more details. + +""" +@time: 2024/10/28 +@file: __init__.py +@desc: +""" diff --git a/conf/inner_config.yml b/obdiag/conf/inner_config.yml similarity index 100% rename from conf/inner_config.yml rename to obdiag/conf/inner_config.yml diff --git a/config.py b/obdiag/config.py similarity index 99% rename from config.py rename to obdiag/config.py index b1809f28..4fcd972d 100644 --- a/config.py +++ b/obdiag/config.py @@ -18,7 +18,7 @@ from __future__ import absolute_import, division, print_function import os from common.tool import ConfigOptionsParserUtil, DirectoryUtil -from stdio import SafeStdio +from obdiag.stdio import SafeStdio import oyaml as yaml import pathlib import sys diff --git a/context.py b/obdiag/context.py similarity index 100% rename from context.py rename to obdiag/context.py diff --git a/core.py b/obdiag/core.py similarity index 99% rename from core.py rename to obdiag/core.py index 6549c5e9..9e4f307d 100644 --- a/core.py +++ b/obdiag/core.py @@ -27,9 +27,9 @@ from handler.rca.rca_handler import RCAHandler from handler.rca.rca_list import RcaScenesListHandler from common.ssh import SshClient, SshConfig -from context import HandlerContextNamespace, HandlerContext -from config import ConfigManager, InnerConfigManager -from err import CheckStatus, SUG_SSH_FAILED +from obdiag.context import HandlerContextNamespace, HandlerContext +from obdiag.config import ConfigManager, InnerConfigManager +from obdiag.err import CheckStatus, SUG_SSH_FAILED from handler.analyzer.analyze_flt_trace import AnalyzeFltTraceHandler from handler.analyzer.analyze_log import AnalyzeLogHandler from handler.analyzer.analyze_sql import AnalyzeSQLHandler @@ -54,7 +54,7 @@ from handler.gather.gather_variables import GatherVariablesHandler from handler.display.display_scenes import DisplaySceneHandler from handler.display.scenes.list import DisplayScenesListHandler -from result_type import ObdiagResult +from obdiag.result_type import ObdiagResult from telemetry.telemetry import telemetry from update.update import UpdateHandler from colorama import Fore, Style diff --git a/diag_cmd.py b/obdiag/diag_cmd.py similarity index 99% rename from diag_cmd.py rename to obdiag/diag_cmd.py index b2d5f725..cc5d460b 100644 --- a/diag_cmd.py +++ b/obdiag/diag_cmd.py @@ -25,9 +25,9 @@ import json from uuid import uuid1 as uuid, UUID from optparse import OptionParser, BadOptionError, Option, IndentedHelpFormatter -from core import ObdiagHome -from result_type import ObdiagResult -from stdio import IO +from obdiag.core import ObdiagHome +from obdiag.result_type import ObdiagResult +from obdiag.stdio import IO from common.version import get_obdiag_version from telemetry.telemetry import telemetry from common.version import OBDIAG_VERSION diff --git a/err.py b/obdiag/err.py similarity index 100% rename from err.py rename to obdiag/err.py diff --git a/result_type.py b/obdiag/result_type.py similarity index 100% rename from result_type.py rename to obdiag/result_type.py diff --git a/stdio.py b/obdiag/stdio.py similarity index 100% rename from stdio.py rename to obdiag/stdio.py diff --git a/rpm/oceanbase-diagnostic-tool.spec b/rpm/oceanbase-diagnostic-tool.spec index 2dda99bf..0ea971fa 100644 --- a/rpm/oceanbase-diagnostic-tool.spec +++ b/rpm/oceanbase-diagnostic-tool.spec @@ -52,7 +52,7 @@ rm -f obdiag.py oceanbase-diagnostic-tool.spec \cp -rf $SRC_DIR/handler/gather/plugins/redact/*.py $BUILD_DIR/SOURCES/gather/redact \cp -rf $SRC_DIR/init.sh $BUILD_DIR/SOURCES/init.sh \cp -rf $SRC_DIR/init_obdiag_cmd.sh $BUILD_DIR/SOURCES/init_obdiag_cmd.sh -\cp -rf $SRC_DIR/conf $BUILD_DIR/SOURCES/conf +\cp -rf $SRC_DIR/obdiag/conf $BUILD_DIR/SOURCES/conf mkdir -p ${RPM_BUILD_ROOT}/usr/local/oceanbase-diagnostic-tool/lib/ mkdir -p ${RPM_BUILD_ROOT}/usr/local/oceanbase-diagnostic-tool/dependencies/bin mkdir -p ${RPM_BUILD_ROOT}/usr/local/oceanbase-diagnostic-tool/gather diff --git a/telemetry/telemetry.py b/telemetry/telemetry.py index 5c9e2f68..4c56c316 100644 --- a/telemetry/telemetry.py +++ b/telemetry/telemetry.py @@ -28,7 +28,7 @@ from common.tool import DateTimeEncoder from common.version import get_obdiag_version import ssl -from stdio import IO +from obdiag.stdio import IO ssl._create_default_https_context = ssl._create_unverified_context diff --git a/test/common/ssh_client/test_docker_client.py b/test/common/ssh_client/test_docker_client.py index f261f25c..6f7bab90 100644 --- a/test/common/ssh_client/test_docker_client.py +++ b/test/common/ssh_client/test_docker_client.py @@ -20,7 +20,7 @@ from unittest.mock import patch, MagicMock, call from docker import DockerClient as DockerClientSDK from common.ssh_client.docker_client import DockerClient -from context import HandlerContext +from obdiag.context import HandlerContext from common.obdiag_exception import OBDIAGShellCmdException diff --git a/test/common/ssh_client/test_kubernetes_client.py b/test/common/ssh_client/test_kubernetes_client.py index d6a80168..8dd67c83 100644 --- a/test/common/ssh_client/test_kubernetes_client.py +++ b/test/common/ssh_client/test_kubernetes_client.py @@ -21,7 +21,7 @@ from unittest.mock import MagicMock, mock_open, patch from kubernetes import config from kubernetes.stream import stream -from context import HandlerContext +from obdiag.context import HandlerContext from common.ssh_client.kubernetes_client import KubernetesClient from kubernetes.client.api.core_v1_api import CoreV1Api from tempfile import NamedTemporaryFile diff --git a/test/common/ssh_client/test_local_client.py b/test/common/ssh_client/test_local_client.py index b946c50e..074a96a0 100644 --- a/test/common/ssh_client/test_local_client.py +++ b/test/common/ssh_client/test_local_client.py @@ -20,7 +20,7 @@ import subprocess32 as subprocess from unittest.mock import patch, MagicMock from common.ssh_client.local_client import LocalClient -from context import HandlerContext +from obdiag.context import HandlerContext class TestLocalClient(unittest.TestCase): diff --git a/update/update.py b/update/update.py index c9b73ae6..9734d3e9 100644 --- a/update/update.py +++ b/update/update.py @@ -26,7 +26,7 @@ from common.version import OBDIAG_VERSION import yaml -from result_type import ObdiagResult +from obdiag.result_type import ObdiagResult # for update obdiag files without obdiag