Move object classes used by tests into obj/ subdir

Change-Id: I0b2963cf00acd1f9036dca2e87aa3b87a0f8066d
This commit is contained in:
Pau Espin 2020-04-10 20:46:07 +02:00
parent e8bbcbf5b8
commit e1a58bd8dd
48 changed files with 60 additions and 59 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env python3
import _prep
from osmo_gsm_tester import sms
from osmo_gsm_tester.obj import sms
print(sms.Sms())
print(sms.Sms())

View File

@ -21,7 +21,7 @@ import os
import re
import pprint
from .core import log, util, config, template, process
from ..core import log, util, config, template, process
from . import osmo_ctrl, pcap_recorder
class OsmoBsc(log.Origin):

View File

@ -19,7 +19,7 @@
import copy
from abc import ABCMeta, abstractmethod
from .core import log, config, schema
from ..core import log, config, schema
class Bts(log.Origin, metaclass=ABCMeta):

View File

@ -20,8 +20,8 @@
import os
import re
import json
from .core import log, config, util, process
from .core.event_loop import MainLoop
from ..core import log, config, util, process
from ..core.event_loop import MainLoop
from . import pcap_recorder, bts, pcu
from . import powersupply

View File

@ -19,7 +19,7 @@
import os
import pprint
from .core import log, config, util, template, process, remote
from ..core import log, config, util, template, process, remote
from . import pcu_oc2g, bts_osmo
class OsmoBtsOC2G(bts_osmo.OsmoBts):

View File

@ -19,7 +19,7 @@
import os
import pprint
from .core import log, config, util, template, process
from ..core import log, config, util, template, process
from . import bts_osmo
class OsmoBtsOctphy(bts_osmo.OsmoBtsMainUnit):

View File

@ -20,7 +20,7 @@
import os
import tempfile
from abc import ABCMeta, abstractmethod
from .core import log
from ..core import log
from . import bts, pcu_osmo
class OsmoBts(bts.Bts, metaclass=ABCMeta):

View File

@ -20,8 +20,8 @@
import os
import pprint
from abc import ABCMeta, abstractmethod
from .core import log, config, util, template, process, remote
from .core.event_loop import MainLoop
from ..core import log, config, util, template, process, remote
from ..core.event_loop import MainLoop
from . import powersupply, bts_osmo
class OsmoBtsTrx(bts_osmo.OsmoBtsMainUnit):

View File

@ -20,7 +20,7 @@
import os
import pprint
from .core import config, util, template, process
from ..core import config, util, template, process
from . import bts_osmo
class OsmoBtsVirtual(bts_osmo.OsmoBtsMainUnit):

View File

@ -19,7 +19,7 @@
import os
import pprint
from .core import log, config, util, template, process, remote
from ..core import log, config, util, template, process, remote
from . import pcu_sysmo, bts_osmo
class SysmoBts(bts_osmo.OsmoBts):

View File

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from abc import ABCMeta, abstractmethod
from .core import log, config
from ..core import log, config
class eNodeB(log.Origin, metaclass=ABCMeta):

View File

@ -20,7 +20,7 @@
import os
import pprint
from .core import log, util, config, template, process, remote
from ..core import log, util, config, template, process, remote
from . import enb
def rf_type_valid(rf_type_str):

View File

@ -20,7 +20,7 @@
import os
import pprint
from .core import log, util, config, template, process, remote
from ..core import log, util, config, template, process, remote
from . import enb
def rf_type_valid(rf_type_str):

View File

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from abc import ABCMeta, abstractmethod
from .core import log, config
from ..core import log, config
class EPC(log.Origin, metaclass=ABCMeta):

View File

@ -20,7 +20,7 @@
import os
import pprint
from .core import log, util, config, template, process, remote
from ..core import log, util, config, template, process, remote
from . import epc
class AmarisoftEPC(epc.EPC):

View File

@ -20,7 +20,7 @@
import os
import pprint
from .core import log, util, config, template, process, remote
from ..core import log, util, config, template, process, remote
from . import epc
class srsEPC(epc.EPC):

View File

@ -23,8 +23,8 @@ import smpplib.command
import smpplib.consts
import smpplib.exceptions
from .core import log
from .core.event_loop import MainLoop
from ..core import log
from ..core.event_loop import MainLoop
# if you want to know what's happening inside python-smpplib
#import logging

View File

@ -20,7 +20,7 @@
import os
import pprint
from .core import log, util, config, template, process
from ..core import log, util, config, template, process
from . import pcap_recorder
class OsmoGgsn(log.Origin):

View File

@ -21,7 +21,7 @@ import os
import pprint
import sqlite3
from .core import log, util, config, template, process
from ..core import log, util, config, template, process
from . import pcap_recorder
class OsmoHlr(log.Origin):

View File

@ -20,7 +20,7 @@
import os
import json
from .core import log, util, config, process, remote
from ..core import log, util, config, process, remote
from . import pcap_recorder, run_node
def iperf3_result_to_json(file):

View File

@ -20,7 +20,7 @@
import os
import pprint
from .core import log, util, config, template, process
from ..core import log, util, config, template, process
from . import pcap_recorder
class OsmoMgcpgw(log.Origin):

View File

@ -20,7 +20,7 @@
import os
import pprint
from .core import log, util, config, template, process
from ..core import log, util, config, template, process
from . import pcap_recorder
class OsmoMgw(log.Origin):

View File

@ -17,8 +17,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from .core import log, util, process
from .core.event_loop import MainLoop
from ..core import log, util, process
from ..core.event_loop import MainLoop
from .ms import MS
from . import sms

View File

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from abc import ABCMeta, abstractmethod
from .core import log
from ..core import log
class MS(log.Origin, metaclass=ABCMeta):
"""Base for everything about mobile/modem and SIMs."""

View File

@ -20,8 +20,8 @@
import os
import pprint
from .core import log, util, config, template, process, remote
from .core.event_loop import MainLoop
from ..core import log, util, config, template, process, remote
from ..core.event_loop import MainLoop
from .run_node import RunNode
from .ms import MS

View File

@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from datetime import timedelta
from .core import log, util
from ..core import log, util
from osmo_ms_driver.cdf import cdfs
from osmo_ms_driver.event_server import EventServer
from osmo_ms_driver.simple_loop import SimpleLoop

View File

@ -20,9 +20,9 @@
import os
import pprint
from .core import log, util, config, template, process, remote
from ..core import log, util, config, template, process, remote
from .run_node import RunNode
from .core.event_loop import MainLoop
from ..core.event_loop import MainLoop
from .ms import MS
def rf_type_valid(rf_type_str):

View File

@ -20,7 +20,7 @@
import os
import pprint
from .core import log, util, config, template, process
from ..core import log, util, config, template, process
from . import osmo_ctrl, pcap_recorder, smsc
class OsmoMsc(log.Origin):

View File

@ -21,7 +21,7 @@ import os
import re
import pprint
from .core import log, util, config, template, process
from ..core import log, util, config, template, process
from . import osmo_ctrl, pcap_recorder, smsc
class OsmoNitb(log.Origin):

View File

@ -21,7 +21,7 @@
import socket
import struct
from .core import log
from ..core import log
class CtrlInterfaceExn(Exception):
pass

View File

@ -20,8 +20,8 @@
import os
import tempfile
from .core import log, util, process
from .core.event_loop import MainLoop
from ..core import log, util, process
from ..core.event_loop import MainLoop
class Osmocon(log.Origin):

View File

@ -19,7 +19,7 @@
import os
from .core import log, process
from ..core import log, process
class PcapRecorder(log.Origin):

View File

@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from abc import ABCMeta, abstractmethod
from .core import log
from ..core import log
class Pcu(log.Origin, metaclass=ABCMeta):
"""PCU Abstract Base Class."""

View File

@ -19,7 +19,7 @@
import os
import pprint
from .core import log, config, util, template, process
from ..core import log, config, util, template, process
from . import pcu
class OsmoPcuOC2G(pcu.Pcu):

View File

@ -19,7 +19,7 @@
import os
import pprint
from .core import config, util, template, process
from ..core import config, util, template, process
from . import pcu
class OsmoPcu(pcu.Pcu):

View File

@ -19,7 +19,7 @@
import os
import pprint
from .core import log, config, util, template, process
from ..core import log, config, util, template, process
from . import pcu
class OsmoPcuSysmo(pcu.Pcu):

View File

@ -18,8 +18,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from abc import ABCMeta, abstractmethod
from .core import log
from .core.event_loop import MainLoop
from ..core import log
from ..core.event_loop import MainLoop
class PowerSupply(log.Origin, metaclass=ABCMeta):

View File

@ -20,7 +20,7 @@
import urllib.request
import xml.etree.ElementTree as ET
from .core import log
from ..core import log
from .powersupply import PowerSupply
class PowerSupplyIntellinet(PowerSupply):

View File

@ -20,8 +20,8 @@
import sispm
from usb.core import USBError
from .core import log
from .core.event_loop import MainLoop
from ..core import log
from ..core.event_loop import MainLoop
from .powersupply import PowerSupply
class PowerSupplySispm(PowerSupply):

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from .core import log
from ..core import log
class RunNode(log.Origin):

View File

@ -20,7 +20,7 @@
import os
import pprint
from .core import log, util, config, template, process
from ..core import log, util, config, template, process
from . import pcap_recorder
class OsmoSgsn(log.Origin):

View File

@ -17,7 +17,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from .core import log, config
from ..core import log, config
class Smsc:

View File

@ -20,7 +20,7 @@
import os
import pprint
from .core import log, util, config, template, process
from ..core import log, util, config, template, process
from . import pcap_recorder
class OsmoStp(log.Origin):

View File

@ -26,10 +26,10 @@ from .core import log
from .core import config
from .core import util
from .core import schema
from . import bts_sysmo, bts_osmotrx, bts_osmovirtual, bts_octphy, bts_nanobts, bts_oc2g
from . import modem
from . import ms_osmo_mobile
from . import ms_srs, ms_amarisoft, enb_srs, enb_amarisoft, epc_srs, epc_amarisoft
from .obj import bts_sysmo, bts_osmotrx, bts_osmovirtual, bts_octphy, bts_nanobts, bts_oc2g
from .obj import modem
from .obj import ms_osmo_mobile
from .obj import ms_srs, ms_amarisoft, enb_srs, enb_amarisoft, epc_srs, epc_amarisoft
from .core.util import is_dict, is_list

View File

@ -23,9 +23,9 @@ import time
import pprint
from .core import config, log, util, process
from .core.event_loop import MainLoop
from .obj import nitb_osmo, hlr_osmo, mgcpgw_osmo, mgw_osmo, msc_osmo, bsc_osmo, stp_osmo, ggsn_osmo, sgsn_osmo, esme, osmocon, ms_driver, iperf3
from .obj import run_node
from . import resource, test
from . import nitb_osmo, hlr_osmo, mgcpgw_osmo, mgw_osmo, msc_osmo, bsc_osmo, stp_osmo, ggsn_osmo, sgsn_osmo, esme, osmocon, ms_driver, iperf3
from . import run_node
class Timeout(Exception):
pass

View File

@ -59,7 +59,8 @@ class Test(log.Origin):
self.start_timestamp = time.time()
from .core import process
from .core.event_loop import MainLoop
from . import suite, sms
from .obj import sms
from . import suite
testenv.setup(self.suite_run, self, suite, MainLoop, sms, process)
with self.redirect_stdout():
util.run_python_file('%s.%s' % (self.suite_run.definition.name(), self.basename),