From 76d8103bfbaadc7a848f1f76bef4625199542916 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Thu, 18 May 2017 18:35:32 +0200 Subject: 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 --- src/osmo_gsm_tester/osmo_nitb.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/osmo_gsm_tester/osmo_nitb.py') 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) -- cgit v1.2.3