summaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester/config.py
AgeCommit message (Collapse)AuthorFilesLines
2017-09-12config: replicate_times: insert replicates in placePau Espin Pedrol1-7/+7
In the following suite.conf, position matters when matching against scenarios: [suite.conf] resources: bts: - type: sysmo times: 2 - type: osmo-bts-trx times: 1 [scenario] resources: bts: - - ip_addr: 1.2.3.4 In this case, for instance, we make it clear that we want the second sysmo bts which has IP 1.2.3.4. With old behaviour, the replicated sysmo would have been created at the end (3rd position), and the ip_addr would match against the osmo-bts-trx BTS. Change-Id: Id78e2326db964d5efb6648854b57d8addce4deb0
2017-09-12Move code to replicate dicts based on times attr to its own functionPau Espin Pedrol1-0/+15
Change-Id: I26ddae2124813bfb63a7c97c466e056cd2ef991a
2017-08-23bts_osmotrx: Support configuring bts addr, trx_remote_ip and launch_trxPau Espin Pedrol1-1/+0
We may want to support running a device which runs its own TRX (osmo-trx or different implementation). Furthermore, this TRX may be available in some specific hwardare rather than on the main unit. This makes it easy to configure OsmoBtsTrx to launch it's own osmo-trx or not. In case it is launched, all IPs are configured correctly to ensure connection can be established. Before this commit, osmo-trx was binding to 127.0.0.1. Now we can support multiple osmo-trx being launched on the main unit. Change-Id: I825ed1fc0c3fe75d196db90c1508283fbd04acf8
2017-06-13fix and refactor logging: drop 'with', simplifyNeels Hofmeyr1-29/+28
With the recent fix of the junit report related issues, another issue arose: the 'with log.Origin' was changed to disallow __enter__ing an object twice to fix problems, now still code would fail because it tries to do 'with' on the same object twice. The only reason is to ensure that logging is associated with a given object. Instead of complicating even more, implement differently. Refactor logging to simplify use: drop the 'with Origin' style completely, and instead use the python stack to determine which objects are created by which, and which object to associate a log statement with. The new way: we rely on the convention that each class instance has a local 'self' referencing the object instance. If we need to find an origin as a new object's parent, or to associate a log message with, we traverse each stack frame, fetching the first local 'self' object that is a log.Origin class instance. How to use: Simply call log.log() anywhere, and it finds an Origin object to log for, from the stack. Alternatively call self.log() for any Origin() object to skip the lookup. Create classes as child class of log.Origin and make sure to call super().__init__(category, name). This constructor will magically find a parent Origin on the stack. When an exception happens, we first escalate the exception up through call scopes to where ever it is handled by log.log_exn(). This then finds an Origin object in the traceback's stack frames, no need to nest in 'with' scopes. Hence the 'with log.Origin' now "happens implicitly", we can write pure natural python code, no more hassles with scope ordering. Furthermore, any frame can place additional logging information in a frame by calling log.ctx(). This is automatically inserted in the ancestry associated with a log statement / exception. Change-Id: I5f9b53150f2bb6fa9d63ce27f0806f0ca6a45e90
2017-06-06add cmdline arg to set conf dirNeels Hofmeyr1-1/+5
Add -c cmdline option to do the same as / in addition to the OSMO_GSM_TESTER_CONF var, because setting the var is cumbersome in daily development. Change-Id: I4c3b482f31f638047ab3f3d785d294b28d244b80
2017-06-03Re-License under GPLv3-or-later instead of AGPLv3-or-laterHarald Welte1-3/+3
The "Affero" nature makes sense for the Osmocom network components like BSC, SGSN, etc. as they are typically operated to provide a network service. For testing, this doesn't make so much sense as it is difficult to imagine people creating a business out of offering to run test cases on an end-to-end Osmocom GSM network. So let's drop the 'Affero' here. All code is so far developed by sysmocom staff, so as Managing Director of sysmocom I can effect such a license change unilaterally. Change-Id: I8959c2d605854ffdc21cb29c0fe0e715685c4c05
2017-05-04config: resolve real paths from symlinks, add paths debug loggingNeels Hofmeyr1-5/+13
Tweak test expectations to include the new debug logging. Go through the paths in alphabetical order to get deterministic logging output, so the test expectations always match. Change-Id: I11a905b2467cda691d9ccea30ae436bac96476c9
2017-04-14rename default.conf to defaults.confNeels Hofmeyr1-1/+1
Change-Id: I0928ed306b0ca9b173dac092c77a9c6986714803
2017-04-13fix octphy, fix conf, improve loggingYour Name1-1/+9
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-08various fixes from first test runsYour Name1-7/+16
Change-Id: Ifa5a780dc0123aa84273c57c726c8c1bea563495
2017-04-08review jenkins scriptsNeels Hofmeyr1-0/+1
Change-Id: I420910bd2d30e96605ecf3acb779ce726c75d912
2017-04-08core implementationNeels Hofmeyr1-95/+180
code bomb implementing the bulk of the osmo-gsm-tester Change-Id: I53610becbf643ed51b90cfd9debc6992fe211ec9
2017-03-28initial import0.1Neels Hofmeyr1-0/+161
The original osmo-gsm-tester was an internal development at sysmocom, mostly by D. Laszlo Sitzer <dlsitzer@sysmocom.de>, of which this public osmo-gsm-tester is a refactoring / rewrite. This imports an early state of the refactoring and is not functional yet. Bits from the earlier osmo-gsm-tester will be added as needed. The earlier commit history is not imported.