aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester/osmo_nitb.py
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-05-18 18:35:32 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-05-29 00:18:43 +0200
commit76d8103bfbaadc7a848f1f76bef4625199542916 (patch)
tree64d9fb2bbfa92ff0f775400fdddfc2252d59312a /src/osmo_gsm_tester/osmo_nitb.py
parent943c81d8785b10c533fd04e5fbb7340166b2466c (diff)
rename resource nitb_iface to ip_address
I would like to use the IP addresses also for OsmoBSC processes, so it is more than clear now that 'nitb_iface' was the wrong naming choice. The only distinction we may need in the future is public versus loopback interface. To add that, we may add a trait to the 'ip_address' resource like: ip_address: - addr: 10.42.42.1 type: public - addr: 127.0.0.1 type: loopback This way we can substitute public vs loopback addresses flexibly (e.g. using scenarios). Change-Id: I3ad583ae7a33f7a7bb56fe78a125f73c56a0e860
Diffstat (limited to 'src/osmo_gsm_tester/osmo_nitb.py')
-rw-r--r--src/osmo_gsm_tester/osmo_nitb.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/osmo_gsm_tester/osmo_nitb.py b/src/osmo_gsm_tester/osmo_nitb.py
index 50ce5ae..4596007 100644
--- a/src/osmo_gsm_tester/osmo_nitb.py
+++ b/src/osmo_gsm_tester/osmo_nitb.py
@@ -25,17 +25,17 @@ from . import log, util, config, template, process, osmo_ctrl, pcap_recorder
class OsmoNitb(log.Origin):
suite_run = None
- nitb_iface = None
+ ip_address = None
run_dir = None
config_file = None
process = None
bts = None
- def __init__(self, suite_run, nitb_iface):
+ def __init__(self, suite_run, ip_address):
self.suite_run = suite_run
- self.nitb_iface = nitb_iface
+ self.ip_address = ip_address
self.set_log_category(log.C_RUN)
- self.set_name('osmo-nitb_%s' % nitb_iface.get('addr'))
+ self.set_name('osmo-nitb_%s' % ip_address.get('addr'))
self.bts = []
def start(self):
@@ -70,7 +70,7 @@ class OsmoNitb(log.Origin):
values = dict(nitb=config.get_defaults('nitb'))
config.overlay(values, self.suite_run.config())
- config.overlay(values, dict(nitb_iface=self.nitb_iface))
+ config.overlay(values, dict(ip_address=self.ip_address))
bts_list = []
for bts in self.bts:
@@ -85,7 +85,7 @@ class OsmoNitb(log.Origin):
f.write(r)
def addr(self):
- return self.nitb_iface.get('addr')
+ return self.ip_address.get('addr')
def bts_add(self, bts):
self.bts.append(bts)