osmo-gsm-tester/src/osmo_gsm_tester/obj
Neels Hofmeyr 5b04ef213e OsmoCtrl cleanup: get_var(), set_var(), get_trap()
CTRL interface interaction was mostly inherited from the first legacy
implementation of osmo-gsm-tester, and it was a pain to look at from the
start. Now, while I'm close to the topic, I want this to improve:

Properly match a GET_REPLY/SET_REPLY to a sent GET/SET by the message
ID.

Completely drop the do_get() and do_set(), which were not useful for
correct handling of the CTRL request and response messaging. The API to
use by callers is set_var(), get_var()/get_int_var() and get_trap().
These call the internal _sendrecv() (or for TRAP only _recv())
functions. Make it so that tese work both on an already connected
OsmoCtrl, as well as one that needs to establish a (short) connection,
so that both are trivially possible:

    # one CTRL connection stays open
    with OsmoCtrl(...) as ctrl:
  	ctrl.get_var('var1')
  	ctrl.get_var('var2')
  	ctrl.get_var('var3')

and

  # get_var() opens a connection, does the GET and closes again
  OsmoCtrl(...).get_var('var1')

Do away with doubling the instances OsmoCtrl and e.g. OsmoBscCtrl.
Rather make OsmoBscCtrl a child class of OsmoCtrl, which means that we
no longer have bsc.ctrl().ctrl(), just bsc.ctrl().

Have VERB_* constants instead of dup'd strings.

Apply to / simplify all callers of OsmoCtrl.

Some of these changes are similar to recently added OsmoVty.

Change-Id: Id561e5a55d8057a997a8ec9e7fa6f94840194df1
2020-12-11 00:30:38 +01:00
..
bsc_osmo.py OsmoCtrl cleanup: get_var(), set_var(), get_trap() 2020-12-11 00:30:38 +01:00
bts.py bts: allow configuring ARFCN and BSIC: add to schema 2020-12-11 00:19:13 +01:00
bts_nanobts.py configure fixed ARFCN per bts 2020-12-11 00:19:13 +01:00
bts_oc2g.py configure fixed ARFCN per bts 2020-12-11 00:19:13 +01:00
bts_octphy.py obj: Fix objects placing their content in suite rundir instead of test rundir 2020-05-11 10:56:52 +02:00
bts_osmo.py Update obj classes in obj/ to use testenv instead of suite_run 2020-05-05 13:56:01 +02:00
bts_osmotrx.py EventLoop: Fix log error "Origin parent loop" during wait() 2020-06-10 19:50:12 +02:00
bts_osmovirtual.py obj: Fix objects placing their content in suite rundir instead of test rundir 2020-05-11 10:56:52 +02:00
bts_sysmo.py obj: Fix objects placing their content in suite rundir instead of test rundir 2020-05-11 10:56:52 +02:00
enb.py enb: Support cells from different ENBs in ncell_list 2020-11-09 18:54:26 +01:00
enb_amarisoft.py enb: add basic TDD config option 2020-10-16 14:17:36 +00:00
enb_srs.py enb: add QAM64 support for UL 2020-11-20 11:50:43 +01:00
epc.py epc: refactor run_wait() method and rename to prepare_proc() 2020-06-15 15:09:37 +00:00
epc_amarisoft.py ms: Allocate default msisdn internally 2020-10-15 15:50:48 +00:00
epc_srs.py epc_srs.py: Fixed reference in local execution 2020-11-11 12:47:47 +01:00
esme.py EventLoop: Fix log error "Origin parent loop" during wait() 2020-06-10 19:50:12 +02:00
ggsn_osmo.py obj: Fix objects placing their content in suite rundir instead of test rundir 2020-05-11 10:56:52 +02:00
gnuradio_zmq_broker.py enb: Fix non-1st ENB gnubreaker remote address 2020-10-23 14:29:03 +02:00
hlr_osmo.py ms: Allocate default msisdn internally 2020-10-15 15:50:48 +00:00
iperf3.py iperf3: increase additional wait time for iperf client 2020-07-15 11:48:23 +02:00
mgcpgw_osmo.py obj: Fix objects placing their content in suite rundir instead of test rundir 2020-05-11 10:56:52 +02:00
mgw_osmo.py obj: Fix objects placing their content in suite rundir instead of test rundir 2020-05-11 10:56:52 +02:00
ms.py ms_amarisoft: fix various regressions 2020-11-23 12:33:52 +01:00
ms_amarisoft.py ms_amarisoft: fix various regressions 2020-11-23 12:33:52 +01:00
ms_driver.py ms_driver: Fix typos after recent refactorings 2020-05-07 17:10:51 +02:00
ms_ofono.py sysmocom: emergency_preemptive_call.py: Avoid test failure if 2nd call not fully established 2020-10-21 18:02:07 +02:00
ms_osmo_mobile.py ms: Allocate default msisdn internally 2020-10-15 15:50:48 +00:00
ms_srs.py {enb,ms}_srs: Add DL QAM-256 support 2020-11-11 12:47:47 +01:00
msc_osmo.py OsmoCtrl cleanup: get_var(), set_var(), get_trap() 2020-12-11 00:30:38 +01:00
nitb_osmo.py OsmoCtrl cleanup: get_var(), set_var(), get_trap() 2020-12-11 00:30:38 +01:00
osmo_ctrl.py OsmoCtrl cleanup: get_var(), set_var(), get_trap() 2020-12-11 00:30:38 +01:00
osmo_vty.py add bsc.vty: always keep a BSC VTY connection ready 2020-12-11 00:19:13 +01:00
osmocon.py EventLoop: Fix log error "Origin parent loop" during wait() 2020-06-10 19:50:12 +02:00
pcap_recorder.py Update obj classes in obj/ to use testenv instead of suite_run 2020-05-05 13:56:01 +02:00
pcu.py Update obj classes in obj/ to use testenv instead of suite_run 2020-05-05 13:56:01 +02:00
pcu_oc2g.py obj: Fix objects placing their content in suite rundir instead of test rundir 2020-05-11 10:56:52 +02:00
pcu_osmo.py obj: Fix objects placing their content in suite rundir instead of test rundir 2020-05-11 10:56:52 +02:00
pcu_sysmo.py obj: Fix objects placing their content in suite rundir instead of test rundir 2020-05-11 10:56:52 +02:00
powersupply.py EventLoop: Fix log error "Origin parent loop" during wait() 2020-06-10 19:50:12 +02:00
powersupply_intellinet.py Move object classes used by tests into obj/ subdir 2020-04-11 19:15:56 +02:00
powersupply_sispm.py EventLoop: Fix log error "Origin parent loop" during wait() 2020-06-10 19:50:12 +02:00
rfemu.py 4g: Introduce ZMQ GnuRadio stream broker 2020-10-15 12:34:36 +00:00
rfemu_amarisoftctrl.py rfemu_amarisoft: handle exception and log event if WS is closed 2020-08-27 15:37:54 +02:00
rfemu_gnuradio_zmq.py gnuradio zmq broker refactoring 2020-10-16 18:23:58 +02:00
rfemu_minicircuits.py rfemu_minicircuits: reset attenuation to zero in dtor 2020-07-09 13:43:00 +00:00
rfemu_srsenb_stdin.py rfemu_srsenb_stdin: use negative dB value to set attenuation 2020-10-13 18:05:28 +02:00
run_node.py Process: Add remote_port as new parameter 2020-11-30 16:32:51 +00:00
sgsn_osmo.py obj: Fix objects placing their content in suite rundir instead of test rundir 2020-05-11 10:56:52 +02:00
sms.py Move object classes used by tests into obj/ subdir 2020-04-11 19:15:56 +02:00
smsc.py Move object classes used by tests into obj/ subdir 2020-04-11 19:15:56 +02:00
srslte_common.py srslte_common: fix indent in whole file 2020-10-05 20:03:13 +02:00
stp_osmo.py testenv: Support test overlaying a directory to look for templates 2020-06-04 20:03:07 +02:00
stress.py Introduce stress tool object 2020-07-02 13:22:48 +02:00