Add support for authentication VTY param in msc and bsc
Change-Id: Ie1eb76149d4b006631050f8a1e532fbdbdad6a7f
diff --git a/example/defaults.conf b/example/defaults.conf
index 95bd172..082f159 100644
--- a/example/defaults.conf
+++ b/example/defaults.conf
@@ -15,6 +15,7 @@
long_name: osmo-gsm-tester-msc
auth_policy: closed
encryption: a5 0
+ authentication: optional
msc:
net:
@@ -24,6 +25,7 @@
long_name: osmo-gsm-tester-msc
auth_policy: closed
encryption: a5 0
+ authentication: optional
bsc_bts:
location_area_code: 23
diff --git a/src/osmo_gsm_tester/osmo_msc.py b/src/osmo_gsm_tester/osmo_msc.py
index 92a9d61..f023b29 100644
--- a/src/osmo_gsm_tester/osmo_msc.py
+++ b/src/osmo_gsm_tester/osmo_msc.py
@@ -32,6 +32,7 @@
config = None
smsc = None
encryption = None
+ authentication = None
def __init__(self, suite_run, hlr, mgcpgw, ip_address):
super().__init__(log.C_RUN, 'osmo-msc_%s' % ip_address.get('addr'))
@@ -81,6 +82,9 @@
# runtime parameters:
if self.encryption is not None:
config.overlay(values, dict(msc=dict(net=dict(encryption=self.encryption))))
+ if self.authentication is not None:
+ config.overlay(values, dict(msc=dict(net=dict(authentication=self.authentication))))
+
self.config = values
@@ -97,6 +101,12 @@
def set_encryption(self, val):
self.encryption = val
+ def set_authentication(self, val):
+ if val is None:
+ self.authroziation = None
+ return
+ self.authentication = "required" if val else "optional"
+
def mcc(self):
return self.config['msc']['net']['mcc']
diff --git a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
index 0e2f759..57ab8a3 100644
--- a/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-bsc.cfg.tmpl
@@ -29,6 +29,7 @@
auth policy ${bsc.net.auth_policy}
location updating reject cause 13
encryption ${bsc.net.encryption}
+ authentication ${bsc.net.authentication}
neci 1
rrlp mode none
mm info 1
diff --git a/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl b/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl
index 1abaf20..6851ea9 100644
--- a/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl
+++ b/src/osmo_gsm_tester/templates/osmo-msc.cfg.tmpl
@@ -16,6 +16,7 @@
auth policy ${msc.net.auth_policy}
location updating reject cause 13
encryption ${msc.net.encryption}
+ authentication ${msc.net.authentication}
cs7 instance 0
point-code 0.0.1
msc