path: root/src/osmo_gsm_tester/
AgeCommit message (Collapse)AuthorFilesLines
2018-10-25First round of clean-ups of imports and unused variablesHolger Hans Peter Freyther1-2/+1
Run pyflakes src/osmo_gsm_tester and then address the first round of problems. Change-Id: I02f1d89078dfdf37d53e2e20811bf36fb14ec3b0
2018-08-13Cleanup of class scoped variablesPau Espin Pedrol1-4/+2
After bug described in OS#3456 and fixed in last commit, let's categorize and place variables in its correct plac to avoid similar issus. We leave under the class keyword (class scoped variables) the attributes which are to be used as static class attributes. All other ones are initialized during __init__(). This way w avoid scenarios in which while using an object from an instance attribute we end up reading a class scoped variable which is shared among all instances. Change-Id: I5ad4cac34a9f49eaf42966c01c9c5a4d3f3e9dc8
2018-05-08bts: Allow setting amount of TRX and timeslot in cfg and from test at runtimePau Espin Pedrol1-3/+0
The num_trx attribute for a given BTS states the number of TRX to be used by that BTS. If more than num_trx are configured in trx_list in the cfg file, then only up to num_trx are taken into account. If a num_trx value higher than max_trx is specified throuygh config file or at runtime by the test, an exception is raised explaining the issue. The num/max_trx attributes are overlayed along the config levels (generic -> bsc_bts -> specific bts-type -> specific resource object). This way we can specify a long list of trx+timeslot config in the generic config (bsc_bts), and tune for each model and specific BTS which is the desired default number of TRX, as well as the maximum supported per type. Change-Id: I7f46eaf7a16f03268653299c93600c0443f691ac
2018-05-07bts: Pass defaults config name at construct timePau Espin Pedrol1-2/+2
It will be needed later at construction time when resolving the num of trx. Change-Id: I2c6a46ead14010f714897ea178917327215823e7
2018-05-07bts: Refactor conf_for_bsc_osmoPau Espin Pedrol1-15/+1
Move duplicated code into a method in the superclass. Change-Id: Ie27932f94142f667c3fb8c054b77e04afa0d5cbb
2018-04-04Drop event_loop global functions and import MainLoopPau Espin Pedrol1-1/+1
Take the chance to identify and drop modules importing event_loop but not using it. Change-Id: Ifa1940cd00138ebc72fbcfd45a0e28246f7a5ed9
2017-12-14cosmetic: bts_octphy: Sort members according to scopePau Espin Pedrol1-27/+37
Change-Id: I42c19bf6f5a2f9d13d60e6ce8f1bbc1cad159b4b
2017-12-14Create bts abstract classes to avoid code duplication and ease developmentPau Espin Pedrol1-61/+3
A lot of code can be shared by all osmocom related BTS we currently use (sysmo, octphy, trx). This commits moves all this easily shareable code to an abstract class OsmoBts which all (osmocom) BTS use. Some bits of code do not apply for osmo-bts-sysmo but it's still shared by BTS running in the main unit (octphy, trx), for instance the pcu socket handling. Those are put together in OsmoBtsMainUnit. This way we have: log.Origin<-OsmoBts<-OsmoBtsMainUnit<-OsmoBtsOctphy log.Origin<-OsmoBts<-OsmoBtsMainUnit<-OsmoBtsTrx log.Origin<-OsmoBts<-OsmoBtsSysmo Also take the chance to categorize the different APIs in the new abstract class based on their use and scope. Some code changes while moving which were required: - A new protected abstract API "create_pcu", which returns an object of "pcu" interface. Subclasses implement this API returning either a PcySysmo or a PcuOsmo object. This is needed to abstract the pcu() getter into the base class. - For BTS running in the main unit, pcu_sk_tmp_dir object is allocated when first used (API pcu_socket_path()) instead of doing it in the constructor. This is moved into OsmoBtsMainUnit Change-Id: I86db35a7f2497d37360b2c56affa8bf6bf704ee2
2017-12-05bts_octphy: Use OsmoPcu instead of OsmoPcuSysmoPau Espin Pedrol1-1/+1
Change-Id: I81751d774ec1f61b01ccef6c21c9d38807d5d1fc
2017-12-05bts_*: Add incrementing bvci and rac valuesPau Espin Pedrol1-0/+12
Change-Id: Ie65d7d33322c775a1040b5c81f367d882a7c2c5b
2017-12-05OsmoBtsOctphy: Integrate with OsmoPcu and OsmoSgsnPau Espin Pedrol1-1/+15
Change-Id: I54780971d711d47b23976dd044a4a53134dd4299
2017-12-05bts_*: Add ready_for_pcu APIPau Espin Pedrol1-2/+7
This is required to start osmo-pcu after osmo-bts is already setup and activated. Otherwise osmo-pcu ends after connecting to socket with: "pcu_l1_if.cpp:416 BTS not available" Change-Id: I7209589f60bda63094336e417638906be5e273c4
2017-11-08Use unique incrementing value for BTS CellIdPau Espin Pedrol1-0/+6
Change-Id: If4559b945a3e71f3a36fd7ac760cb094278f6b39
2017-11-08Use unique incrementing value for BTS LACPau Espin Pedrol1-0/+6
Change-Id: I9f864bac05e39ec2fc305f774194799c3d8fe1b0
2017-11-06Add support for osmo-bts-octphyPau Espin Pedrol1-0/+168
Specific parts for this class: - Runs osmo-bts-octphy binary, that requires CAP_NET_RAW capability because it uses an AF_PACKET socket. - As a consequence, it must use the previously added APIs to set the capability and modify the RPATH of the binary before launching it. These APIs require extra host setup and installed dependencies that will be documented soon in osmo-gsm-tester manual. - A num_trx() helper method is added because the binary requires that parameter. - A allocate_phy_instances() is added to help build/fill the conf dictionary to be used in the tmpl to be able to easily set up trx, phy and insances. A config to use a osmo-bts-octphy at full power is used (4 trx) is added in this commit to show how can it be configured. However our current license only has support to use 1 TRX, and so next commit drops most configurations to simplify the setup to use only 1 TRX. Change-Id: Ia350964fa539083bb68d439cad0caa8fdf85d297
2017-05-25remove bts_ocpthy.pyNeels Hofmeyr1-98/+0
We're not currently paying attention to the octphy in osmo-gsm-tester. So instead of maintaining dead code, remove the; we can re-add when the octphy is implemented properly. Change-Id: Ia5d5750d440ae7019634b51fa1efe7bbb2a1d1e2
2017-05-15Enable GSMTAP on BTS and record it on the main unit NITBPau Espin Pedrol1-1/+3
Change-Id: I057a83bc20c5e664ac1778812452f189166919ba
2017-05-08Prepend LD_LIBRARY_PATH instead of overwritting itPau Espin Pedrol1-1/+1
My current distribution ships a newer libcrypto and libssl which are not ABI compatible with the ones generated by Jenkins. I had to copy those libraries locally and use LD_LIBRARY_PATH to be able to run binaries compiled coming from the jenkins slave. Without this patch I am not able to run it because it is overwriting the previous variable. Change-Id: Id9b16d13d343616cbf87b9da8a99e3fae48da6bd
2017-04-13fix octphy, fix conf, improve loggingYour Name1-3/+1
Clearly separate the kinds of BTS hardware the GSM tester knows ('type') from the NITB's bts/type config item ('osmobsc_bts_type' -- not 'osmonitb_...' to stay in tune with future developments: it is the libbsc that needs this). For BTS hardware kinds, use the full name of the binary for osmo driven models: osmo-bts-sysmo, osmo-bts-trx, osmo-bts-octphy. Change-Id: I1aa9b48e74013a93f9db1a34730f17717fb3b36c
2017-04-12octphy (untested); fix regression test expectationsNeels Hofmeyr1-0/+98
Change-Id: Ie9986e0fe49171fb616ce92c3d8652002318f94f