Commit Graph

573 Commits

Author SHA1 Message Date
Pau Espin a8b8990bb8 rfemu_amarisoftctrl: import websocket module on first use
Change-Id: I568af52ffb7ac57222697f5d861a532c0e2a70de
2020-05-05 18:26:31 +02:00
Pau Espin 326091555b powersupply_sispm: import sispm and usb modules on first use
Change-Id: I6045bb739e5c69972014a9d27be3a24b7ad61c9a
2020-05-05 18:26:31 +02:00
Pau Espin a1daa51665 ms_ofono: import pydbus and GLib modules on first use
Change-Id: I754e1290eb5593c0ef168f74747f42db1b50f16c
2020-05-05 18:26:31 +02:00
Pau Espin 45149393e7 esme: import smpplib module on first use
Change-Id: Icc92937fdada9210f788805dbc42b80014e345e8
2020-05-05 18:21:58 +02:00
Pau Espin cc89cd0c5f ms_srs: import numpy module on first use
Change-Id: I2ce974954028bdbc7bc1561c4538b909edee2cb1
2020-05-05 17:49:27 +02:00
Pau Espin 5b9c7b922a testenv: deferr importing obj module class until use is required
Change-Id: Ie073256a03bb2d038ef7f715d534afb1c53bb241
2020-05-05 14:40:58 +02:00
Pau Espin 40c7bc7765 tests: Replace 'suite' with 'tenv'
Change-Id: I777ec59ffd83b861ddc09e85e52d7a8896264b8c
2020-05-05 13:56:01 +02:00
Pau Espin a442cb8e5f Update obj classes in obj/ to use testenv instead of suite_run
Change-Id: Idf41243a497de7bc507b9f1cd1b38640f456f815
2020-05-05 13:56:01 +02:00
Pau Espin f574a46b37 Move trial.py and suite.py to core/
Change-Id: Ic9a4c90c190e9d8e1829fbef83a9243f3c6f655b
2020-05-05 12:23:37 +02:00
Pau Espin aa1cbdc75a Move all obj/ references in suite.py to testenv.py
Change-Id: If4ab39be7a97d33e82c5a34e2a10dfec38613a4e
2020-05-05 12:19:10 +02:00
Pau Espin ee217b0a18 Move test.py and report.py to core/
Change-Id: Ibb7fa5ab40bcf1e59705bdd2c2c5a76025b2b544
2020-05-04 19:23:16 +02:00
Pau Espin 06cb536826 Move resource.py to core/
Change-Id: I0f36a5e61ff0ef14d08165c9c184acdf2d6e6901
2020-05-04 19:12:07 +02:00
Pau Espin 1ee5ec5db2 Move object subclass instance allocation logic out of suite.py/resource.py
This way we get rid of object related content in resource.py and we can
finally move it to core/ in next commit.

Change-Id: Ia5b861115ae3ae1b90149863c4265dcc730b8cd4
2020-05-04 17:22:53 +02:00
Pau Espin ea8c3d4b12 Generate schemas dynamically from pieces provided by each object class
This way we benefit from:
* knowing which attributes are used/required by each object class and
  subclass
* Having validation function definitions near the class going to use them

Change-Id: I8fd6773c51d19405a585977af4ed72cad2b21db1
2020-05-04 16:36:33 +02:00
Andre Puschmann 96b17df282 srsenb_rr.conf.tmpl: extend CQI and SR subframe scheduling
this fixes an issues when allocating CQI resources for multiple carriers
or multiple users

Change-Id: I8b9345502003da2f5b6841a98b77375656e84d8c
2020-04-21 15:05:51 +02:00
Andre Puschmann 333b868492 ms_srs: fix ZMQ radio arguments for CA and MIMO configs
similar to the eNB patches this fixes the CA and MIMO radio
parameters. In pricinple this could also be reused for the
AmarisoftUE but since we currently don't have a means to test
it I left it for a future commit.

Change-Id: I16b00009f97d61a9ab4715e5d727024661d3d0be
2020-04-21 15:05:51 +02:00
Andre Puschmann e2a6da6b48 enb: refactored rf_args handling for ZMQ-based radio
this patch moves the rf_dev_args creation for both eNB types
into the eNB base class, since they are identical.

the patch also fixes the arguments for all CA and MIMO configurations

Change-Id: I8ca3ed83e65dc07927385267e5970bc4f5b120d5
2020-04-21 15:05:51 +02:00
Andre Puschmann bf40f8c8bf amarisoft_enb: use two antenna ports for TM > 1
Change-Id: Ia241f96341780760d482d389097659b0f7b897e8
2020-04-21 15:05:51 +02:00
Pau Espin d6c792536f amarisoftENB: Fix running with num_cells=2
The B200 device being used in the physical setup doesn't support several
RF ports, so let's hardcode it to 0 for now.

Change-Id: Id4c31be2bd0c75f469e2293ade011c7b7ceedb1c
2020-04-20 18:21:11 +02:00
Pau Espin 96d64efdbb srsenb: Support neighbour and secondary cell lists in config file
Change-Id: I8fe0703b7d9db69658c112066404d2da1c3d1e09
2020-04-20 18:21:11 +02:00
Pau Espin 6c77874f46 enb: Introduce support for neighbour cell list
Change-Id: If604f1f2643a73f8c4da6ae3e9d24cd6c7e52d06
2020-04-20 18:21:11 +02:00
Pau Espin 154dc93219 AmarisoftENB: Support setting PCI value
Change-Id: Ibffb95f9b55e145d76ba64119a73ef9f1ed7cdef
2020-04-20 18:21:11 +02:00
Pau Espin a6d6304afc srsue, amarisoft/srsENB: Support setting rx/tx_gain attributes
Change-Id: I4228ba8746a54db4c17443718c01069d431361b9
2020-04-20 16:10:57 +02:00
Pau Espin 491f77cd0f enb: Add attribute to set 'id'
Change-Id: I8ce296c7875d557062dc13e7093ce0400050f2ce
2020-04-20 16:10:57 +02:00
Pau Espin d4404d54c0 enb: Implement initial RF emulation API
Two implementations are provided:
* Amarisoft Ctrl interface (websocket)
* Mini-Circuits Programmable Attenuator (HW, HTTP API) [1]

in Amarisoft ENBs, if no rfemu is configured explicitly, the Ctrl
interface one is used by default, while still being possible to use the
HW one.

[1] https://www.minicircuits.com/pdfs/RC4DAT-6G-60.pdf

Change-Id: Ie98a3fb9bcd2b87b96ecbb5b79e0f53981892a32
2020-04-20 13:30:27 +02:00
Pau Espin ca89bb3924 srsenb_rr.conf.tmpl: Fix whitespace
Change-Id: Ic2b4d8e2468984b096a870c878fa5d032ea4130f
2020-04-20 12:16:53 +02:00
Pau Espin a65b505adc powersupply.py: Fix import module line typo
Recent commit changed the import line so it runs only when required, but
added a typo making tests uing it fail.

Change-Id: Id3e5c16adc763a9b79cc464937c541abd15f98de
Fixes: 2b959580b9
2020-04-19 18:56:43 +02:00
Pau Espin f46ae22b3d enb: Add cell_list attribute
It allows configuring each cell_list up to a maximum of 'num_cells'.

Change-Id: I4fd30a3e37789b76bfaddc2beba1815154daab7f
2020-04-17 20:08:28 +02:00
Pau Espin 045245d5ae check_dependencies: Import modules dynamically and find related debian packages
This way we don't need to manually add new imports here or drop unusued
ones. It also makes sure local imports in all our py files is correct.
For instance, running the script already caught an issue which is added
to this patch (osmo_ms_driver/__main__.py).

This new version of the script also allows specifying subsets of
features to skip when checking for dependencies. This way, for instance
somebody not willing to use a sispm powersupply can stil check all the
needed dependencies are fine.

This new tool will make it easier to slowly make some dependencies only
used by some object test classes optional (for instance, python-smpplib
if user doesn't want to run an ESME node).

It also allows to retrieve the required debian/manually installed
packages when run with "-p" option:
"""
Debian packages:
        libpython3.5-minimal:amd64
        python3-gi
        python3-six
        libpython3.5-stdlib:amd64
        python3-pygments
        python3-yaml
        python3-mako
        python3-numpy
        python3-markupsafe

Modules without debian package (pip or setuptools?):
        usb                  [dpkg-query: no path found matching pattern /usr/local/lib/python3.5/dist-packages/usb/_interop.py]
        pydbus               [dpkg-query: no path found matching pattern /usr/local/lib/python3.5/dist-packages/pydbus/proxy.py]
        smpplib              [dpkg-query: no path found matching pattern /usr/local/lib/python3.5/dist-packages/smpplib/command_codes.py]
        sispm                [dpkg-query: no path found matching pattern /usr/local/lib/python3.5/dist-packages/sispm/__init__.py]
"""

Change-Id: I29ddf8971837754abd930d847bd1036e8e510de6
2020-04-17 19:44:24 +02:00
Pau Espin 2b959580b9 powersupply: Import sublcass module only if used
This way we avoid unconditionally importing all subclass dependencies,
and make them optional based on whether the setup has devices of that
type or not.

Change-Id: I0d2f8b26364b45f0d837cc51078784d1d0fa7ea1
2020-04-17 16:53:17 +02:00
Andre Puschmann 4b5a09a83c enb: add optional gtp_bind_addr paramter to enb class
this allows to optionally specify a the GTP bind_address for a enb object
in the resources.conf

this address is then used for binding the listening socket for gtp connections
which, in turn, allows to run the enb and epc on the same host.

when gtp_bind_addr is not specified, addr is used by default

this is especially useful if eNB and EPC run on the same host
and ZMQ is used for RF between eNB and UE. Two eNB addresses
are needed in this case, one bind address and one "remote-accessable"
address for the UEs ZMQ radio to connect to

Change-Id: I4fe38f31401428ed3e74e1d0b64960f0af122d37
2020-04-16 22:03:09 +02:00
Pau Espin 0e6ab424a4 ms_srs.py: Pass filenames to main cfg file template instead of cmdline args
Change-Id: Id2a6ba17d087d2ff67fe10b1dae6434259e74366
2020-04-16 15:41:31 +02:00
Pau Espin 3373703a72 epc_srs.py: Pass filenames to main cfg file template instead of cmdline args
Change-Id: I1ac3a3cace7ec2b0f85c5d9a5f97d5007d7c65ac
2020-04-16 13:59:57 +02:00
Pau Espin 135c609d29 enb_srs.py: Pass filenames to main cfg file template instead of cmdline args
Change-Id: Ifec6a8a9c29b94634f6ac7ea50aae9b8e18ae3cb
2020-04-16 13:44:37 +02:00
Andre Puschmann e4d5a139e3 enb_amarisoft: fix enb conf template name
issue has been introduced during refactor of enb class names

Change-Id: Ib3ad6451c3979440be28d8811f51ce5d1c103518
2020-04-14 22:23:06 +02:00
Pau Espin fdd8e3aad2 iperf3: Avoid using --logfile arg
Some older iperf3 versions don't support the --logfile arg. Let's
instead parse the json from stdout. Old --logfile behavior is left in
code but disabled since it's a nicer (less hacky) way to get results,
because parsing from stdout means we need to avoid reading some content.

Change-Id: Ia1b7fa4dae074089878963aeddf0006aea68e31f
2020-04-14 12:50:23 +02:00
Pau Espin 0dbd694501 Rename modem.py to ms_ofono.py
Change-Id: I050970986b0b3fbc23b756c5b7c524cb8b7c1327
2020-04-11 19:15:56 +02:00
Pau Espin e1a58bd8dd Move object classes used by tests into obj/ subdir
Change-Id: I0b2963cf00acd1f9036dca2e87aa3b87a0f8066d
2020-04-11 19:15:56 +02:00
Pau Espin e8bbcbf5b8 Create core directory to contain most of code not in object classes used by tests
Change-Id: I9aec6c55ccd71894182057d36e0025b69925d314
2020-04-11 19:15:53 +02:00
Pau Espin 9b486eedb6 Rename object classes to be {obj_class}_{implementation}
Change-Id: Ieafd96d7ee5b4baef08ca767629b93834f6a8c7c
2020-04-10 19:41:06 +02:00
Pau Espin bd552f9786 bts_oc2g: Fix ready_for_pcu() waiting forever
Change-Id: Id33e527591164b87d1e14b7922247b726267ad6e
2020-04-10 02:20:57 +02:00
Pau Espin 19155245a4 bts_oc2g: Fix missing import remote
Change-Id: I318683b8dc6215f5bf863cfb1581e2c3bfa05621
2020-04-10 02:09:22 +02:00
Pau Espin ce82b038c7 pcu_{sysmo,oc2g}: Inherit from pcu abstract class
For some reason these classes were still not inheriting from the base
class (probably because it was added after they existed) and they
started failing after recent changes which presumed they where already
inheriting.

Change-Id: I88217baf490ec45373d0743585377ed2639a8cfd
2020-04-10 01:59:48 +02:00
Pau Espin 23e60e5b37 amarisoft_ue: Implement data plane
Use the ifup script to set up the netns + configure the tun device
created by lteue. Use it also as a hook to know when the UE is attached.
Since tun setup is done by arch-optimized lte-avx(2) binaries, we also
need to give capabilitites to them (instead of allowing inheritance of
caps in general in the setcap script).

Change-Id: I1e228b1296eac8e4cb183c2faa735b0468abe124
2020-04-08 15:16:52 +02:00
Pau Espin 6b8f5ae3d2 srs/amarisoft{ue,enb}: Fix b200 specific rf_dev_args
Commit 12ae6d79a5 switched the rf_dev_type
to be in lowercase but forgot to change these conditions.

Change-Id: I91d3877381b4e6343dc4aa0465e699341ed6648d
2020-04-07 18:51:59 +02:00
Andre Puschmann d97ab42462 amarisoft_ue: fix UHD support
the Amarisoft UE seems to be only working with UHD when the bandwidth
param is provided. It seems the set_bandwidth() API is used.

Change-Id: I3f20a5a8ca80c63374f0ad500fd2794e2dc45479
2020-04-07 18:38:21 +02:00
Pau Espin 29b7132eb8 pcu: Enable 'egprs only' vty option if egprs requested
Change-Id: Idd0b5bf8769d693480268c0a0b89dbfd63779e48
2020-04-07 16:12:47 +00:00
Andre Puschmann a7f1983658 enb: add measurement modifier to scenario files
this commit adds basic support for configuring measurements in the
eNB config. It currently support A1, A2, and A3 events.
By default UE measurements are turned off and need to be enabled by
configuring an event with:

+mod-enb-meas-event@{name},{report_type},{value},{hysterisis},{time to trigger}

For example one can update the a2 and a3 event with:

+mod-enb-meas-event@a2,rsrq,-40,2,480+mod-enb-meas-event@a3,rsrp,6,1,512

Change-Id: Ia7657be2396886840570bc41645450a268b4cfff
2020-04-07 17:23:37 +02:00
Andre Puschmann 9a5be2c8fd amarisoftue.cfg.tmpl: fix UE bandwidth/rate config and power on automatically
Change-Id: I2d63055d0648a1758905fd277c20edaeec8f9b85
2020-04-07 15:09:24 +00:00
Pau Espin 65beb8f324 amarisoftUE: adding basic support for Amarisoft UE
Change-Id: Idda0d3a040663969dd71781814198b47fff7daf3
2020-04-07 15:09:24 +00:00