add bsc.vty: always keep a BSC VTY connection ready
The BSC's VTY port will be used to trigger manual handover, and to
retrieve a list of active lchans from the BSC, in the upcoming
handover_2G test suite, I0b2671304165a1aaae2b386af46fbd8b098e3bd8.
Change-Id: I06652db04fc9e48748f3c2196334f5352e9cc48a
diff --git a/src/osmo_gsm_tester/testenv.py b/src/osmo_gsm_tester/testenv.py
index a74891d..ebc8f91 100644
--- a/src/osmo_gsm_tester/testenv.py
+++ b/src/osmo_gsm_tester/testenv.py
@@ -235,7 +235,9 @@
from .obj.bsc_osmo import OsmoBsc
if ip_address is None:
ip_address = self.ip_address()
- return OsmoBsc(self, msc, mgw, stp, ip_address)
+ bsc_obj = OsmoBsc(self, msc, mgw, stp, ip_address)
+ self.register_for_cleanup(bsc_obj)
+ return bsc_obj
def stp(self, ip_address=None):
from .obj.stp_osmo import OsmoStp