From 19d12dd0760ce512d730c1f8aacb7005073f3430 Mon Sep 17 00:00:00 2001 From: Luc Provoost Date: Mon, 25 Nov 2024 11:45:40 +0100 Subject: add current path for python modules Added a dot in front of the python files that are imported, so the code can also be called from other directories Signed-off-by: Luc Provoost Change-Id: I18d4925fcf68c27c91d5e489178bac79edfcf5f4 --- .../helper-scripts/rapid/createrapidk8s.py | 2 +- VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py | 4 ++-- .../helper-scripts/rapid/rapid_corestatstest.py | 4 ++-- .../helper-scripts/rapid/rapid_flowsizetest.py | 6 +++--- .../rapid/rapid_generator_machine.py | 4 ++-- .../helper-scripts/rapid/rapid_impairtest.py | 6 +++--- .../helper-scripts/rapid/rapid_irqtest.py | 4 ++-- .../helper-scripts/rapid/rapid_k8s_deployment.py | 2 +- .../helper-scripts/rapid/rapid_k8s_pod.py | 2 +- .../helper-scripts/rapid/rapid_machine.py | 4 ++-- .../DPPD-PROX/helper-scripts/rapid/rapid_parser.py | 2 +- .../helper-scripts/rapid/rapid_portstatstest.py | 4 ++-- VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py | 4 ++-- .../helper-scripts/rapid/rapid_warmuptest.py | 4 ++-- VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py | 24 +++++++++++----------- 15 files changed, 38 insertions(+), 38 deletions(-) (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid') diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/createrapidk8s.py b/VNFs/DPPD-PROX/helper-scripts/rapid/createrapidk8s.py index c4667f1f..8b0e4a6f 100755 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/createrapidk8s.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/createrapidk8s.py @@ -17,7 +17,7 @@ ## import argparse -from rapid_k8s_deployment import K8sDeployment +from .rapid_k8s_deployment import K8sDeployment # Config file name for deployment creation CREATE_CONFIG_FILE_NAME = "rapid.pods" diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py b/VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py index e2a634f3..acb2d0e3 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/prox_ctrl.py @@ -25,8 +25,8 @@ import os import time import subprocess import socket -from rapid_log import RapidLog -from rapid_sshclient import SSHClient +from .rapid_log import RapidLog +from .rapid_sshclient import SSHClient class prox_ctrl(object): def __init__(self, ip, key=None, user=None, password = None, \ diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_corestatstest.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_corestatstest.py index e6a7f517..ab8cc44d 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_corestatstest.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_corestatstest.py @@ -20,8 +20,8 @@ import sys import time import requests -from rapid_log import RapidLog -from rapid_test import RapidTest +from .rapid_log import RapidLog +from .rapid_test import RapidTest class CoreStatsTest(RapidTest): """ diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py index ea42fc9a..c9c323e3 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py @@ -22,9 +22,9 @@ import copy from math import ceil from statistics import mean from past.utils import old_div -from rapid_log import RapidLog -from rapid_log import bcolors -from rapid_test import RapidTest +from .rapid_log import RapidLog +from .rapid_log import bcolors +from .rapid_test import RapidTest inf = float("inf") class FlowSizeTest(RapidTest): diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py index fc2d86d9..f588e9ae 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py @@ -16,8 +16,8 @@ ## limitations under the License. ## -from rapid_log import RapidLog -from rapid_machine import RapidMachine +from .rapid_log import RapidLog +from .rapid_machine import RapidMachine from math import ceil, log2 diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_impairtest.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_impairtest.py index 3945cd8e..95dfbc5d 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_impairtest.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_impairtest.py @@ -20,9 +20,9 @@ import sys import time import requests -from rapid_log import RapidLog -from rapid_log import bcolors -from rapid_test import RapidTest +from .rapid_log import RapidLog +from .rapid_log import bcolors +from .rapid_test import RapidTest from statistics import mean class ImpairTest(RapidTest): diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_irqtest.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_irqtest.py index de7e6ae3..e9398ee6 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_irqtest.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_irqtest.py @@ -21,8 +21,8 @@ from past.utils import old_div import sys import time import requests -from rapid_log import RapidLog -from rapid_test import RapidTest +from .rapid_log import RapidLog +from .rapid_test import RapidTest class IrqTest(RapidTest): """ diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_deployment.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_deployment.py index 056eb254..c9aca3c8 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_deployment.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_deployment.py @@ -24,7 +24,7 @@ except ImportError: import logging from logging import handlers -from rapid_k8s_pod import Pod +from .rapid_k8s_pod import Pod class K8sDeployment: """Deployment class to create containers for test execution in Kubernetes diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_pod.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_pod.py index 1bf715aa..c91d096c 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_pod.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_k8s_pod.py @@ -19,7 +19,7 @@ import time, yaml import logging from kubernetes import client, config -from rapid_sshclient import SSHClient +from .rapid_sshclient import SSHClient class Pod: """Class which represents test pods. diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py index 63019e44..3692a53c 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py @@ -16,8 +16,8 @@ ## limitations under the License. ## -from rapid_log import RapidLog -from prox_ctrl import prox_ctrl +from .rapid_log import RapidLog +from .prox_ctrl import prox_ctrl import os import re import uuid diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py index 637740a0..d4a593e0 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_parser.py @@ -16,7 +16,7 @@ ## limitations under the License. ## -from rapid_log import RapidLog +from .rapid_log import RapidLog from past.utils import old_div try: import configparser diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_portstatstest.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_portstatstest.py index 8157ddf2..89ed5f1c 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_portstatstest.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_portstatstest.py @@ -20,8 +20,8 @@ import sys import time import requests -from rapid_log import RapidLog -from rapid_test import RapidTest +from .rapid_log import RapidLog +from .rapid_test import RapidTest class PortStatsTest(RapidTest): """ diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py index 37540b2e..b5b7568f 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_test.py @@ -23,8 +23,8 @@ import time import os import copy from past.utils import old_div -from rapid_log import RapidLog -from rapid_log import bcolors +from .rapid_log import RapidLog +from .rapid_log import bcolors inf = float("inf") from datetime import datetime as dt diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_warmuptest.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_warmuptest.py index a86ce806..a950fd4f 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_warmuptest.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_warmuptest.py @@ -19,8 +19,8 @@ import sys import time -from rapid_log import RapidLog -from rapid_test import RapidTest +from .rapid_log import RapidLog +from .rapid_test import RapidTest class WarmupTest(RapidTest): """ diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py b/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py index 7ec270a1..cf421162 100755 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py @@ -26,18 +26,18 @@ import os import sys import concurrent.futures from concurrent.futures import ALL_COMPLETED -from rapid_cli import RapidCli -from rapid_log import RapidLog -from rapid_parser import RapidConfigParser -from rapid_defaults import RapidDefaults -from rapid_machine import RapidMachine -from rapid_generator_machine import RapidGeneratorMachine -from rapid_flowsizetest import FlowSizeTest -from rapid_corestatstest import CoreStatsTest -from rapid_portstatstest import PortStatsTest -from rapid_impairtest import ImpairTest -from rapid_irqtest import IrqTest -from rapid_warmuptest import WarmupTest +from .rapid_cli import RapidCli +from .rapid_log import RapidLog +from .rapid_parser import RapidConfigParser +from .rapid_defaults import RapidDefaults +from .rapid_machine import RapidMachine +from .rapid_generator_machine import RapidGeneratorMachine +from .rapid_flowsizetest import FlowSizeTest +from .rapid_corestatstest import CoreStatsTest +from .rapid_portstatstest import PortStatsTest +from .rapid_impairtest import ImpairTest +from .rapid_irqtest import IrqTest +from .rapid_warmuptest import WarmupTest class RapidTestManager(object): """ -- cgit 1.2.3-korg