bts_osmotrx: Support configuring bts addr, trx_remote_ip and launch_trx

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
diff --git a/src/osmo_gsm_tester/util.py b/src/osmo_gsm_tester/util.py
index 602ae45..af6a2f0 100644
--- a/src/osmo_gsm_tester/util.py
+++ b/src/osmo_gsm_tester/util.py
@@ -305,4 +305,13 @@
     input_thread.join()
     return input_thread.result
 
+def str2bool(val):
+    if val is None or not val:
+        return False
+    if val.upper() in ['FALSE', 'NO', 'OFF']:
+        return False
+    if val.upper() in ['TRUE','YES', 'ON']:
+        return True
+    raise ValueError('Invalid BOOL field: %r' % val)
+
 # vim: expandtab tabstop=4 shiftwidth=4