Add support for authentication VTY param in msc and bsc

Change-Id: Ie1eb76149d4b006631050f8a1e532fbdbdad6a7f
This commit is contained in:
Pau Espin 2017-08-23 17:39:54 +02:00
parent 0755cdb138
commit b5a8614933
4 changed files with 14 additions and 0 deletions

View File

@ -15,6 +15,7 @@ bsc:
long_name: osmo-gsm-tester-msc
auth_policy: closed
encryption: a5 0
authentication: optional
msc:
net:
@ -24,6 +25,7 @@ msc:
long_name: osmo-gsm-tester-msc
auth_policy: closed
encryption: a5 0
authentication: optional
bsc_bts:
location_area_code: 23

View File

@ -32,6 +32,7 @@ class OsmoMsc(log.Origin):
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 @@ class OsmoMsc(log.Origin):
# 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 @@ class OsmoMsc(log.Origin):
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']

View File

@ -29,6 +29,7 @@ network
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

View File

@ -16,6 +16,7 @@ network
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