Commit 1b8b0902 authored by Joanne Hugé's avatar Joanne Hugé

ors-amarisoft: clean-up tests and add sim card info test

parent d1f350f3
Pipeline #24432 passed with stage
in 0 seconds
......@@ -20,7 +20,7 @@ md5sum = 6e5c63c35b13f8920ea13e24c27d7b50
[template-lte-enb-epc]
_update_hash_filename_ = instance-enb-epc.jinja2.cfg
md5sum = 43a445c5c8d068da3dda96df48ae5bd4
md5sum = 7f8f92ff218c40c843a102953c7695f8
[template-lte-enb]
_update_hash_filename_ = instance-enb.jinja2.cfg
......@@ -28,11 +28,11 @@ md5sum = 04dbc8396cb112e86d5d1564df033b82
[template-lte-gnb-epc]
_update_hash_filename_ = instance-gnb-epc.jinja2.cfg
md5sum = b4d3bba128f17841558d48e5bbb0222f
md5sum = d83b5569e258770774cb6028d93a4a70
[template-lte-epc]
_update_hash_filename_ = instance-epc.jinja2.cfg
md5sum = 025b309dc6860e7b681f5c0e7bf864e3
md5sum = d310dee0de054e10d77f036199297b3f
[template-lte-gnb]
_update_hash_filename_ = instance-gnb.jinja2.cfg
......
{% set part_list = [] -%}
{%- set filtered_slave_instance_list = [] %}
{%- for slave_instance in slave_instance_list %}
{%- if slave_instance.get('_', '') != '' %}
{%- set slave = json_module.loads(slave_instance.pop('_')) %}
{%- else %}
{%- set slave = slave_instance %}
{%- endif %}
{%- if slave.get('imsi', '') != '' %}
{%- do filtered_slave_instance_list.append(slave_instance) %}
{%- endif %}
{%- endfor -%}
{%- for i, slave in enumerate(filtered_slave_instance_list) %}
{%- for i, slave in enumerate(slave_instance_list) %}
{% set slave_reference = slave.get('slave_reference', '') %}
{% set publish_section_title = 'publish-%s' % slave_reference %}
{% do part_list.append(publish_section_title) %}
......
{% set part_list = [] -%}
{%- set filtered_slave_instance_list = [] %}
{%- for slave_instance in slave_instance_list %}
{%- if slave_instance.get('_', '') != '' %}
{%- set slave = json_module.loads(slave_instance.pop('_')) %}
{%- else %}
{%- set slave = slave_instance %}
{%- endif %}
{%- if slave.get('imsi', '') != '' %}
{%- do filtered_slave_instance_list.append(slave_instance) %}
{%- endif %}
{%- endfor -%}
{%- for i, slave in enumerate(filtered_slave_instance_list) %}
{%- for i, slave in enumerate(slave_instance_list) %}
{% set slave_reference = slave.get('slave_reference', '') %}
{% set publish_section_title = 'publish-%s' % slave_reference %}
{% do part_list.append(publish_section_title) %}
......
{% set part_list = [] -%}
{%- set filtered_slave_instance_list = [] %}
{%- for slave_instance in slave_instance_list %}
{%- if slave_instance.get('_', '') != '' %}
{%- set slave = json_module.loads(slave_instance.pop('_')) %}
{%- else %}
{%- set slave = slave_instance %}
{%- endif %}
{%- if slave.get('imsi', '') != '' %}
{%- do filtered_slave_instance_list.append(slave_instance) %}
{%- endif %}
{%- endfor -%}
{%- for i, slave in enumerate(filtered_slave_instance_list) %}
{%- for i, slave in enumerate(slave_instance_list) %}
{% set slave_reference = slave.get('slave_reference', '') %}
{% set publish_section_title = 'publish-%s' % slave_reference %}
{% do part_list.append(publish_section_title) %}
......
......@@ -94,15 +94,31 @@ enb_param_dict.update(param_dict)
gnb_param_dict1.update(param_dict)
gnb_param_dict2.update(param_dict)
class TestGNBParameters1(ORSTestCase):
def test_enb_conf(self):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain'])
self.assertEqual(conf['cell_default']['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn'])
self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16))
self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci'])
for p in conf['cell_list'][0]['plmn_list']:
for n in "plmn attach_without_pdn reserved".split():
self.assertEqual(p[n], enb_param_dict['plmn_list'][p['plmn']][n])
for p in conf['mme_list']:
self.assertEqual(p['mme_addr'], enb_param_dict['mme_list'][p['mme_addr']]['mme_addr'])
with open(conf_file, 'r') as f:
for l in f:
if l.startswith('#define N_RB_DL'):
self.assertIn(str(enb_param_dict['n_rb_dl']), l)
def test_gnb_conf1(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
......@@ -128,15 +144,7 @@ class TestGNBParameters1(ORSTestCase):
if l.startswith('#define NR_BANDWIDTH'):
self.assertIn(str(gnb_param_dict1['nr_bandwidth']), l)
class TestGNBParameters2(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict2)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
def test_gnb_conf2(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
......@@ -148,40 +156,33 @@ class TestGNBParameters2(ORSTestCase):
for n in "sd sst".split():
self.assertEqual(p[n], gnb_param_dict2['nssai'][str(p['sd'])][n])
def test_enb_conf(self):
def test_mme_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain'])
self.assertEqual(conf['cell_default']['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn'])
self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16))
self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci'])
for p in conf['cell_list'][0]['plmn_list']:
for n in "plmn attach_without_pdn reserved".split():
self.assertEqual(p[n], enb_param_dict['plmn_list'][p['plmn']][n])
for p in conf['mme_list']:
self.assertEqual(p['mme_addr'], enb_param_dict['mme_list'][p['mme_addr']]['mme_addr'])
self.assertEqual(conf['plmn'], param_dict['epc_plmn'])
with open(conf_file, 'r') as f:
for l in f:
if l.startswith('#define N_RB_DL'):
self.assertIn(str(enb_param_dict['n_rb_dl']), l)
def test_mme_conf(self):
def test_sim_card(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
self.slap.instance_directory, '*', 'ue_db.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['plmn'], param_dict['epc_plmn'])
for n in "sim_algo imsi opc sqn impu impi".split():
self.assertEqual(conf['ue_db'][0][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
self.assertEqual(conf['ue_db'][0]['amf'], int(param_dict['amf'], 16))
class TestENBParameters(ORSTestCase):
self.slap.waitForInstance() # Wait until publish is done
p = self.requestSlaveInstance().getConnectionParameterDict()
p = p['_'] if '_' in p else p
self.assertIn('info', p)
class TestENBParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(enb_param_dict)}
......@@ -191,8 +192,27 @@ class TestENBParameters(ORSTestCase):
def test_enb_conf(self):
test_enb_conf(self)
class TestEPCParameters(ORSTestCase):
class TestGNBParameters1(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
test_gnb_conf1(self)
class TestGNBParameters2(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict2)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
test_gnb_conf2(self)
class TestEPCParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(param_dict)}
......@@ -203,12 +223,9 @@ class TestEPCParameters(ORSTestCase):
test_mme_conf(self)
class TestENBEPCParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps(enb_param_dict),
}
return {'_': json.dumps(enb_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "enb-epc"
......@@ -217,17 +234,17 @@ class TestENBEPCParameters(ORSTestCase):
def test_mme_conf(self):
test_mme_conf(self)
def test_ue_db(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'ue_db.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
for n in "sim_algo imsi opc sqn impu impi".split():
self.assertEqual(conf['ue_db'][0][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
self.assertEqual(conf['ue_db'][0]['amf'], int(param_dict['amf'], 16))
class TestGNBEPCParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb-epc"
def test_gnb_conf(self):
test_gnb_conf1(self)
def test_mme_conf(self):
test_mme_conf(self)
def requestSlaveInstance(cls, software_type):
software_url = cls.getSoftwareURL()
......@@ -248,19 +265,16 @@ class TestEPCSimCard(ORSTestCase):
return default_instance
@classmethod
def requestSlaveInstance(cls):
requestSlaveInstance(cls, 'epc')
return requestSlaveInstance(cls, 'epc')
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps({'testing': True})
}
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "epc"
def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self)
test_sim_card(self)
class TestENBEPCSimCard(ORSTestCase):
@classmethod
......@@ -271,19 +285,16 @@ class TestENBEPCSimCard(ORSTestCase):
return default_instance
@classmethod
def requestSlaveInstance(cls):
requestSlaveInstance(cls, 'enb-epc')
return requestSlaveInstance(cls, 'enb-epc')
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps({'testing': True})
}
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "enb-epc"
def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self)
test_sim_card(self)
class TestGNBEPCSimCard(ORSTestCase):
@classmethod
......@@ -294,19 +305,16 @@ class TestGNBEPCSimCard(ORSTestCase):
return default_instance
@classmethod
def requestSlaveInstance(cls):
requestSlaveInstance(cls, 'gnb-epc')
return requestSlaveInstance(cls, 'gnb-epc')
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps({'testing': True})
}
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb-epc"
def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self)
test_sim_card(self)
class TestUELTEParameters(ORSTestCase):
@classmethod
......
......@@ -94,15 +94,31 @@ enb_param_dict.update(param_dict)
gnb_param_dict1.update(param_dict)
gnb_param_dict2.update(param_dict)
class TestGNBParameters1(ORSTestCase):
def test_enb_conf(self):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain'])
self.assertEqual(conf['cell_default']['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn'])
self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16))
self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci'])
for p in conf['cell_list'][0]['plmn_list']:
for n in "plmn attach_without_pdn reserved".split():
self.assertEqual(p[n], enb_param_dict['plmn_list'][p['plmn']][n])
for p in conf['mme_list']:
self.assertEqual(p['mme_addr'], enb_param_dict['mme_list'][p['mme_addr']]['mme_addr'])
with open(conf_file, 'r') as f:
for l in f:
if l.startswith('#define N_RB_DL'):
self.assertIn(str(enb_param_dict['n_rb_dl']), l)
def test_gnb_conf1(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
......@@ -128,15 +144,7 @@ class TestGNBParameters1(ORSTestCase):
if l.startswith('#define NR_BANDWIDTH'):
self.assertIn(str(gnb_param_dict1['nr_bandwidth']), l)
class TestGNBParameters2(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict2)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
def test_gnb_conf2(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
......@@ -148,40 +156,33 @@ class TestGNBParameters2(ORSTestCase):
for n in "sd sst".split():
self.assertEqual(p[n], gnb_param_dict2['nssai'][str(p['sd'])][n])
def test_enb_conf(self):
def test_mme_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain'])
self.assertEqual(conf['cell_default']['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn'])
self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16))
self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci'])
for p in conf['cell_list'][0]['plmn_list']:
for n in "plmn attach_without_pdn reserved".split():
self.assertEqual(p[n], enb_param_dict['plmn_list'][p['plmn']][n])
for p in conf['mme_list']:
self.assertEqual(p['mme_addr'], enb_param_dict['mme_list'][p['mme_addr']]['mme_addr'])
self.assertEqual(conf['plmn'], param_dict['epc_plmn'])
with open(conf_file, 'r') as f:
for l in f:
if l.startswith('#define N_RB_DL'):
self.assertIn(str(enb_param_dict['n_rb_dl']), l)
def test_mme_conf(self):
def test_sim_card(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
self.slap.instance_directory, '*', 'ue_db.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['plmn'], param_dict['epc_plmn'])
for n in "sim_algo imsi opc sqn impu impi".split():
self.assertEqual(conf['ue_db'][0][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
self.assertEqual(conf['ue_db'][0]['amf'], int(param_dict['amf'], 16))
class TestENBParameters(ORSTestCase):
self.slap.waitForInstance() # Wait until publish is done
p = self.requestSlaveInstance().getConnectionParameterDict()
p = p['_'] if '_' in p else p
self.assertIn('info', p)
class TestENBParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(enb_param_dict)}
......@@ -191,8 +192,27 @@ class TestENBParameters(ORSTestCase):
def test_enb_conf(self):
test_enb_conf(self)
class TestEPCParameters(ORSTestCase):
class TestGNBParameters1(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
test_gnb_conf1(self)
class TestGNBParameters2(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict2)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
test_gnb_conf2(self)
class TestEPCParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(param_dict)}
......@@ -203,12 +223,9 @@ class TestEPCParameters(ORSTestCase):
test_mme_conf(self)
class TestENBEPCParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps(enb_param_dict),
}
return {'_': json.dumps(enb_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "enb-epc"
......@@ -217,17 +234,17 @@ class TestENBEPCParameters(ORSTestCase):
def test_mme_conf(self):
test_mme_conf(self)
def test_ue_db(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'ue_db.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
for n in "sim_algo imsi opc sqn impu impi".split():
self.assertEqual(conf['ue_db'][0][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
self.assertEqual(conf['ue_db'][0]['amf'], int(param_dict['amf'], 16))
class TestGNBEPCParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb-epc"
def test_gnb_conf(self):
test_gnb_conf1(self)
def test_mme_conf(self):
test_mme_conf(self)
def requestSlaveInstance(cls, software_type):
software_url = cls.getSoftwareURL()
......@@ -248,19 +265,16 @@ class TestEPCSimCard(ORSTestCase):
return default_instance
@classmethod
def requestSlaveInstance(cls):
requestSlaveInstance(cls, 'epc')
return requestSlaveInstance(cls, 'epc')
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps({'testing': True})
}
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "epc"
def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self)
test_sim_card(self)
class TestENBEPCSimCard(ORSTestCase):
@classmethod
......@@ -271,19 +285,16 @@ class TestENBEPCSimCard(ORSTestCase):
return default_instance
@classmethod
def requestSlaveInstance(cls):
requestSlaveInstance(cls, 'enb-epc')
return requestSlaveInstance(cls, 'enb-epc')
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps({'testing': True})
}
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "enb-epc"
def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self)
test_sim_card(self)
class TestGNBEPCSimCard(ORSTestCase):
@classmethod
......@@ -294,19 +305,16 @@ class TestGNBEPCSimCard(ORSTestCase):
return default_instance
@classmethod
def requestSlaveInstance(cls):
requestSlaveInstance(cls, 'gnb-epc')
return requestSlaveInstance(cls, 'gnb-epc')
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps({'testing': True})
}
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb-epc"
def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self)
test_sim_card(self)
class TestUELTEParameters(ORSTestCase):
@classmethod
......
......@@ -94,15 +94,31 @@ enb_param_dict.update(param_dict)
gnb_param_dict1.update(param_dict)
gnb_param_dict2.update(param_dict)
class TestGNBParameters1(ORSTestCase):
def test_enb_conf(self):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain'])
self.assertEqual(conf['cell_default']['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn'])
self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16))
self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci'])
for p in conf['cell_list'][0]['plmn_list']:
for n in "plmn attach_without_pdn reserved".split():
self.assertEqual(p[n], enb_param_dict['plmn_list'][p['plmn']][n])
for p in conf['mme_list']:
self.assertEqual(p['mme_addr'], enb_param_dict['mme_list'][p['mme_addr']]['mme_addr'])
with open(conf_file, 'r') as f:
for l in f:
if l.startswith('#define N_RB_DL'):
self.assertIn(str(enb_param_dict['n_rb_dl']), l)
def test_gnb_conf1(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
......@@ -128,15 +144,7 @@ class TestGNBParameters1(ORSTestCase):
if l.startswith('#define NR_BANDWIDTH'):
self.assertIn(str(gnb_param_dict1['nr_bandwidth']), l)
class TestGNBParameters2(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict2)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
def test_gnb_conf2(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
......@@ -148,40 +156,33 @@ class TestGNBParameters2(ORSTestCase):
for n in "sd sst".split():
self.assertEqual(p[n], gnb_param_dict2['nssai'][str(p['sd'])][n])
def test_enb_conf(self):
def test_mme_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain'])
self.assertEqual(conf['cell_default']['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn'])
self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16))
self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci'])
for p in conf['cell_list'][0]['plmn_list']:
for n in "plmn attach_without_pdn reserved".split():
self.assertEqual(p[n], enb_param_dict['plmn_list'][p['plmn']][n])
for p in conf['mme_list']:
self.assertEqual(p['mme_addr'], enb_param_dict['mme_list'][p['mme_addr']]['mme_addr'])
self.assertEqual(conf['plmn'], param_dict['epc_plmn'])
with open(conf_file, 'r') as f:
for l in f:
if l.startswith('#define N_RB_DL'):
self.assertIn(str(enb_param_dict['n_rb_dl']), l)
def test_mme_conf(self):
def test_sim_card(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
self.slap.instance_directory, '*', 'ue_db.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['plmn'], param_dict['epc_plmn'])
for n in "sim_algo imsi opc sqn impu impi".split():
self.assertEqual(conf['ue_db'][0][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
self.assertEqual(conf['ue_db'][0]['amf'], int(param_dict['amf'], 16))
class TestENBParameters(ORSTestCase):
self.slap.waitForInstance() # Wait until publish is done
p = self.requestSlaveInstance().getConnectionParameterDict()
p = p['_'] if '_' in p else p
self.assertIn('info', p)
class TestENBParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(enb_param_dict)}
......@@ -191,8 +192,27 @@ class TestENBParameters(ORSTestCase):
def test_enb_conf(self):
test_enb_conf(self)
class TestEPCParameters(ORSTestCase):
class TestGNBParameters1(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
test_gnb_conf1(self)
class TestGNBParameters2(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict2)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
test_gnb_conf2(self)
class TestEPCParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(param_dict)}
......@@ -203,12 +223,9 @@ class TestEPCParameters(ORSTestCase):
test_mme_conf(self)
class TestENBEPCParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps(enb_param_dict),
}
return {'_': json.dumps(enb_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "enb-epc"
......@@ -217,17 +234,17 @@ class TestENBEPCParameters(ORSTestCase):
def test_mme_conf(self):
test_mme_conf(self)
def test_ue_db(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'ue_db.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
for n in "sim_algo imsi opc sqn impu impi".split():
self.assertEqual(conf['ue_db'][0][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
self.assertEqual(conf['ue_db'][0]['amf'], int(param_dict['amf'], 16))
class TestGNBEPCParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb-epc"
def test_gnb_conf(self):
test_gnb_conf1(self)
def test_mme_conf(self):
test_mme_conf(self)
def requestSlaveInstance(cls, software_type):
software_url = cls.getSoftwareURL()
......@@ -248,19 +265,16 @@ class TestEPCSimCard(ORSTestCase):
return default_instance
@classmethod
def requestSlaveInstance(cls):
requestSlaveInstance(cls, 'epc')
return requestSlaveInstance(cls, 'epc')
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps({'testing': True})
}
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "epc"
def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self)
test_sim_card(self)
class TestENBEPCSimCard(ORSTestCase):
@classmethod
......@@ -271,19 +285,16 @@ class TestENBEPCSimCard(ORSTestCase):
return default_instance
@classmethod
def requestSlaveInstance(cls):
requestSlaveInstance(cls, 'enb-epc')
return requestSlaveInstance(cls, 'enb-epc')
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps({'testing': True})
}
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "enb-epc"
def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self)
test_sim_card(self)
class TestGNBEPCSimCard(ORSTestCase):
@classmethod
......@@ -294,19 +305,16 @@ class TestGNBEPCSimCard(ORSTestCase):
return default_instance
@classmethod
def requestSlaveInstance(cls):
requestSlaveInstance(cls, 'gnb-epc')
return requestSlaveInstance(cls, 'gnb-epc')
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps({'testing': True})
}
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb-epc"
def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self)
test_sim_card(self)
class TestUELTEParameters(ORSTestCase):
@classmethod
......
......@@ -94,15 +94,31 @@ enb_param_dict.update(param_dict)
gnb_param_dict1.update(param_dict)
gnb_param_dict2.update(param_dict)
class TestGNBParameters1(ORSTestCase):
def test_enb_conf(self):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain'])
self.assertEqual(conf['cell_default']['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn'])
self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16))
self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci'])
for p in conf['cell_list'][0]['plmn_list']:
for n in "plmn attach_without_pdn reserved".split():
self.assertEqual(p[n], enb_param_dict['plmn_list'][p['plmn']][n])
for p in conf['mme_list']:
self.assertEqual(p['mme_addr'], enb_param_dict['mme_list'][p['mme_addr']]['mme_addr'])
with open(conf_file, 'r') as f:
for l in f:
if l.startswith('#define N_RB_DL'):
self.assertIn(str(enb_param_dict['n_rb_dl']), l)
def test_gnb_conf1(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
......@@ -128,15 +144,7 @@ class TestGNBParameters1(ORSTestCase):
if l.startswith('#define NR_BANDWIDTH'):
self.assertIn(str(gnb_param_dict1['nr_bandwidth']), l)
class TestGNBParameters2(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict2)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
def test_gnb_conf2(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
......@@ -148,40 +156,33 @@ class TestGNBParameters2(ORSTestCase):
for n in "sd sst".split():
self.assertEqual(p[n], gnb_param_dict2['nssai'][str(p['sd'])][n])
def test_enb_conf(self):
def test_mme_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain'])
self.assertEqual(conf['cell_default']['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn'])
self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16))
self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci'])
for p in conf['cell_list'][0]['plmn_list']:
for n in "plmn attach_without_pdn reserved".split():
self.assertEqual(p[n], enb_param_dict['plmn_list'][p['plmn']][n])
for p in conf['mme_list']:
self.assertEqual(p['mme_addr'], enb_param_dict['mme_list'][p['mme_addr']]['mme_addr'])
self.assertEqual(conf['plmn'], param_dict['epc_plmn'])
with open(conf_file, 'r') as f:
for l in f:
if l.startswith('#define N_RB_DL'):
self.assertIn(str(enb_param_dict['n_rb_dl']), l)
def test_mme_conf(self):
def test_sim_card(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
self.slap.instance_directory, '*', 'ue_db.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['plmn'], param_dict['epc_plmn'])
for n in "sim_algo imsi opc sqn impu impi".split():
self.assertEqual(conf['ue_db'][0][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
self.assertEqual(conf['ue_db'][0]['amf'], int(param_dict['amf'], 16))
class TestENBParameters(ORSTestCase):
self.slap.waitForInstance() # Wait until publish is done
p = self.requestSlaveInstance().getConnectionParameterDict()
p = p['_'] if '_' in p else p
self.assertIn('info', p)
class TestENBParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(enb_param_dict)}
......@@ -191,8 +192,27 @@ class TestENBParameters(ORSTestCase):
def test_enb_conf(self):
test_enb_conf(self)
class TestEPCParameters(ORSTestCase):
class TestGNBParameters1(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
test_gnb_conf1(self)
class TestGNBParameters2(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict2)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
test_gnb_conf2(self)
class TestEPCParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(param_dict)}
......@@ -203,12 +223,9 @@ class TestEPCParameters(ORSTestCase):
test_mme_conf(self)
class TestENBEPCParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps(enb_param_dict),
}
return {'_': json.dumps(enb_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "enb-epc"
......@@ -217,17 +234,17 @@ class TestENBEPCParameters(ORSTestCase):
def test_mme_conf(self):
test_mme_conf(self)
def test_ue_db(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'ue_db.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
for n in "sim_algo imsi opc sqn impu impi".split():
self.assertEqual(conf['ue_db'][0][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
self.assertEqual(conf['ue_db'][0]['amf'], int(param_dict['amf'], 16))
class TestGNBEPCParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb-epc"
def test_gnb_conf(self):
test_gnb_conf1(self)
def test_mme_conf(self):
test_mme_conf(self)
def requestSlaveInstance(cls, software_type):
software_url = cls.getSoftwareURL()
......@@ -248,19 +265,16 @@ class TestEPCSimCard(ORSTestCase):
return default_instance
@classmethod
def requestSlaveInstance(cls):
requestSlaveInstance(cls, 'epc')
return requestSlaveInstance(cls, 'epc')
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps({'testing': True})
}
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "epc"
def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self)
test_sim_card(self)
class TestENBEPCSimCard(ORSTestCase):
@classmethod
......@@ -271,19 +285,16 @@ class TestENBEPCSimCard(ORSTestCase):
return default_instance
@classmethod
def requestSlaveInstance(cls):
requestSlaveInstance(cls, 'enb-epc')
return requestSlaveInstance(cls, 'enb-epc')
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps({'testing': True})
}
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "enb-epc"
def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self)
test_sim_card(self)
class TestGNBEPCSimCard(ORSTestCase):
@classmethod
......@@ -294,19 +305,16 @@ class TestGNBEPCSimCard(ORSTestCase):
return default_instance
@classmethod
def requestSlaveInstance(cls):
requestSlaveInstance(cls, 'gnb-epc')
return requestSlaveInstance(cls, 'gnb-epc')
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps({'testing': True})
}
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb-epc"
def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self)
test_sim_card(self)
class TestUELTEParameters(ORSTestCase):
@classmethod
......
......@@ -94,15 +94,31 @@ enb_param_dict.update(param_dict)
gnb_param_dict1.update(param_dict)
gnb_param_dict2.update(param_dict)
class TestGNBParameters1(ORSTestCase):
def test_enb_conf(self):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain'])
self.assertEqual(conf['cell_default']['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn'])
self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16))
self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci'])
for p in conf['cell_list'][0]['plmn_list']:
for n in "plmn attach_without_pdn reserved".split():
self.assertEqual(p[n], enb_param_dict['plmn_list'][p['plmn']][n])
for p in conf['mme_list']:
self.assertEqual(p['mme_addr'], enb_param_dict['mme_list'][p['mme_addr']]['mme_addr'])
with open(conf_file, 'r') as f:
for l in f:
if l.startswith('#define N_RB_DL'):
self.assertIn(str(enb_param_dict['n_rb_dl']), l)
def test_gnb_conf1(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
......@@ -128,15 +144,7 @@ class TestGNBParameters1(ORSTestCase):
if l.startswith('#define NR_BANDWIDTH'):
self.assertIn(str(gnb_param_dict1['nr_bandwidth']), l)
class TestGNBParameters2(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict2)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
def test_gnb_conf2(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]
......@@ -148,40 +156,33 @@ class TestGNBParameters2(ORSTestCase):
for n in "sd sst".split():
self.assertEqual(p[n], gnb_param_dict2['nssai'][str(p['sd'])][n])
def test_enb_conf(self):
def test_mme_conf(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'enb.cfg'))[0]
self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['tx_gain'], enb_param_dict['tx_gain'])
self.assertEqual(conf['rx_gain'], enb_param_dict['rx_gain'])
self.assertEqual(conf['cell_default']['inactivity_timer'], enb_param_dict['inactivity_timer'])
self.assertEqual(conf['cell_list'][0]['dl_earfcn'], enb_param_dict['dl_earfcn'])
self.assertEqual(conf['enb_id'], int(enb_param_dict['enb_id'], 16))
self.assertEqual(conf['cell_list'][0]['n_id_cell'], enb_param_dict['pci'])
for p in conf['cell_list'][0]['plmn_list']:
for n in "plmn attach_without_pdn reserved".split():
self.assertEqual(p[n], enb_param_dict['plmn_list'][p['plmn']][n])
for p in conf['mme_list']:
self.assertEqual(p['mme_addr'], enb_param_dict['mme_list'][p['mme_addr']]['mme_addr'])
self.assertEqual(conf['plmn'], param_dict['epc_plmn'])
with open(conf_file, 'r') as f:
for l in f:
if l.startswith('#define N_RB_DL'):
self.assertIn(str(enb_param_dict['n_rb_dl']), l)
def test_mme_conf(self):
def test_sim_card(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
self.slap.instance_directory, '*', 'ue_db.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
self.assertEqual(conf['plmn'], param_dict['epc_plmn'])
for n in "sim_algo imsi opc sqn impu impi".split():
self.assertEqual(conf['ue_db'][0][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
self.assertEqual(conf['ue_db'][0]['amf'], int(param_dict['amf'], 16))
class TestENBParameters(ORSTestCase):
self.slap.waitForInstance() # Wait until publish is done
p = self.requestSlaveInstance().getConnectionParameterDict()
p = p['_'] if '_' in p else p
self.assertIn('info', p)
class TestENBParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(enb_param_dict)}
......@@ -191,8 +192,27 @@ class TestENBParameters(ORSTestCase):
def test_enb_conf(self):
test_enb_conf(self)
class TestEPCParameters(ORSTestCase):
class TestGNBParameters1(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
test_gnb_conf1(self)
class TestGNBParameters2(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict2)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb"
def test_gnb_conf(self):
test_gnb_conf2(self)
class TestEPCParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(param_dict)}
......@@ -203,12 +223,9 @@ class TestEPCParameters(ORSTestCase):
test_mme_conf(self)
class TestENBEPCParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps(enb_param_dict),
}
return {'_': json.dumps(enb_param_dict)}
@classmethod
def getInstanceSoftwareType(cls):
return "enb-epc"
......@@ -217,17 +234,17 @@ class TestENBEPCParameters(ORSTestCase):
def test_mme_conf(self):
test_mme_conf(self)
def test_ue_db(self):
conf_file = glob.glob(os.path.join(
self.slap.instance_directory, '*', 'ue_db.cfg'))[0]
with open(conf_file, 'r') as f:
conf = yaml.load(f)
for n in "sim_algo imsi opc sqn impu impi".split():
self.assertEqual(conf['ue_db'][0][n], param_dict[n])
self.assertEqual(conf['ue_db'][0]['K'], param_dict['k'])
self.assertEqual(conf['ue_db'][0]['amf'], int(param_dict['amf'], 16))
class TestGNBEPCParameters(ORSTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {'_': json.dumps(gnb_param_dict1)}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb-epc"
def test_gnb_conf(self):
test_gnb_conf1(self)
def test_mme_conf(self):
test_mme_conf(self)
def requestSlaveInstance(cls, software_type):
software_url = cls.getSoftwareURL()
......@@ -248,19 +265,16 @@ class TestEPCSimCard(ORSTestCase):
return default_instance
@classmethod
def requestSlaveInstance(cls):
requestSlaveInstance(cls, 'epc')
return requestSlaveInstance(cls, 'epc')
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps({'testing': True})
}
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "epc"
def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self)
test_sim_card(self)
class TestENBEPCSimCard(ORSTestCase):
@classmethod
......@@ -271,19 +285,16 @@ class TestENBEPCSimCard(ORSTestCase):
return default_instance
@classmethod
def requestSlaveInstance(cls):
requestSlaveInstance(cls, 'enb-epc')
return requestSlaveInstance(cls, 'enb-epc')
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps({'testing': True})
}
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "enb-epc"
def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self)
test_sim_card(self)
class TestGNBEPCSimCard(ORSTestCase):
@classmethod
......@@ -294,19 +305,16 @@ class TestGNBEPCSimCard(ORSTestCase):
return default_instance
@classmethod
def requestSlaveInstance(cls):
requestSlaveInstance(cls, 'gnb-epc')
return requestSlaveInstance(cls, 'gnb-epc')
@classmethod
def getInstanceParameterDict(cls):
return {
'_': json.dumps({'testing': True})
}
return {'_': json.dumps({'testing': True})}
@classmethod
def getInstanceSoftwareType(cls):
return "gnb-epc"
def test_sim_card(self):
self.slap.waitForInstance() # Wait until publish is done
test_ue_db(self)
test_sim_card(self)
class TestUELTEParameters(ORSTestCase):
@classmethod
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment