testTDD2600.py 18.6 KB
Newer Older
Joanne Hugé's avatar
Joanne Hugé committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
##############################################################################
#
# Copyright (c) 2018 Nexedi SA and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
##############################################################################

import os
import yaml
import json
import glob
32
import requests
Joanne Hugé's avatar
Joanne Hugé committed
33 34 35 36 37 38 39

from slapos.testing.testcase import makeModuleSetUpAndTestCaseClass

setUpModule, ORSTestCase = makeModuleSetUpAndTestCaseClass(
    os.path.abspath(
        os.path.join(os.path.dirname(__file__), '..', 'software-tdd2600.cfg')))

Joanne Hugé's avatar
Joanne Hugé committed
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
param_dict = {
    'testing': True,
    "sim_algo": "milenage",
    "imsi": "001010000000331",
    "opc": "000102030405060708090A0B0C0D0E0F",
    "amf": "0x9001",
    "sqn": "000000000000",
    "k": "00112233445566778899AABBCCDDEEFF",
    "impu": "impu331",
    "impi": "impi331@amarisoft.com",
    'tx_gain': 17,
    'rx_gain': 17,
    'dl_earfcn': 325320,
    'n_rb_dl': 50,
    'enb_id': "0x17",
    'pci': 250,
    'mme_list': {
        '10.0.0.1': {'mme_addr': '10.0.0.1'},
        '2001:db8::1': {'mme_addr': '2001:db8::1'},
    },
    'epc_plmn': '00102',
    'dl_nr_arfcn': 325320,
    'nr_band': 99,
    'nr_bandwidth': 50,
    'ssb_nr_arfcn': 377790,
    'rue_addr': "192.168.99.88",
    'n_antenna_dl': 2,
    'n_antenna_ul': 2,
68
    'inactivity_timer': 17,
Joanne Hugé's avatar
Joanne Hugé committed
69
    'gnb_id': "0x17",
70
    'gnb_id_bits': 30,
Joanne Hugé's avatar
Joanne Hugé committed
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
    'ssb_pos_bitmap': "10",
    'amf_list': {
        '10.0.0.1': {'amf_addr': '10.0.0.1'},
        '2001:db8::1': {'amf_addr': '2001:db8::1'},
    },
}
enb_param_dict = {
    'plmn_list': {
        '00101': {'attach_without_pdn': True, 'plmn': '00101', 'reserved': True},
        '00102': {'attach_without_pdn': False, 'plmn': '00102', 'reserved': False},
    },
}
gnb_param_dict1 = {
    'plmn_list': {
        '00101': {'plmn': '00101', 'ranac': 1, 'reserved': True, 'tac': 1},
        '00102': {'plmn': '00102', 'ranac': 2, 'reserved': False, 'tac': 2},
    },
}
gnb_param_dict2 = {
    'nssai': {
        '1': {'sd': 1, 'sst': 10},
        '2': {'sd': 2, 'sst': 20},
    },
}
enb_param_dict.update(param_dict)
gnb_param_dict1.update(param_dict)
gnb_param_dict2.update(param_dict)
Joanne Hugé's avatar
Joanne Hugé committed
98

99
def test_enb_conf(self):
Joanne Hugé's avatar
Joanne Hugé committed
100

101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
    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):
Joanne Hugé's avatar
Joanne Hugé committed
124 125 126 127 128 129

        conf_file = glob.glob(os.path.join(
          self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]

        with open(conf_file, 'r') as f:
            conf = yaml.load(f)
Joanne Hugé's avatar
Joanne Hugé committed
130 131
        self.assertEqual(conf['tx_gain'], gnb_param_dict1['tx_gain'])
        self.assertEqual(conf['rx_gain'], gnb_param_dict1['rx_gain'])
132
        self.assertEqual(conf['nr_cell_default']['inactivity_timer'], gnb_param_dict1['inactivity_timer'])
Joanne Hugé's avatar
Joanne Hugé committed
133 134 135 136 137
        self.assertEqual(conf['nr_cell_list'][0]['dl_nr_arfcn'], gnb_param_dict1['dl_nr_arfcn'])
        self.assertEqual(conf['nr_cell_list'][0]['band'], gnb_param_dict1['nr_band'])
        self.assertEqual(conf['nr_cell_list'][0]['ssb_pos_bitmap'], gnb_param_dict1['ssb_pos_bitmap'])
        self.assertEqual(conf['nr_cell_default']['n_id_cell'], gnb_param_dict1['pci'])
        self.assertEqual(conf['gnb_id'], int(gnb_param_dict1['gnb_id'], 16))
138
        self.assertEqual(conf['gnb_id_bits'], gnb_param_dict1['gnb_id_bits'])
Joanne Hugé's avatar
Joanne Hugé committed
139 140 141 142 143
        for p in conf['nr_cell_default']['plmn_list']:
          for n in "plmn ranac reserved tac".split():
              self.assertEqual(p[n], gnb_param_dict1['plmn_list'][p['plmn']][n])
        for p in conf['amf_list']:
          self.assertEqual(p['amf_addr'], gnb_param_dict1['amf_list'][p['amf_addr']]['amf_addr'])
Joanne Hugé's avatar
Joanne Hugé committed
144

Joanne Hugé's avatar
Joanne Hugé committed
145 146 147 148 149
        with open(conf_file, 'r') as f:
            for l in f:
                if l.startswith('#define NR_BANDWIDTH'):
                    self.assertIn(str(gnb_param_dict1['nr_bandwidth']), l)

150
def test_gnb_conf2(self):
Joanne Hugé's avatar
Joanne Hugé committed
151 152 153 154 155 156 157

        conf_file = glob.glob(os.path.join(
          self.slap.instance_directory, '*', 'etc', 'gnb.cfg'))[0]

        with open(conf_file, 'r') as f:
            conf = yaml.load(f)

Joanne Hugé's avatar
Joanne Hugé committed
158 159 160
        for p in conf['nr_cell_default']['plmn_list'][0]['nssai']:
          for n in "sd sst".split():
              self.assertEqual(p[n], gnb_param_dict2['nssai'][str(p['sd'])][n])
Lu Xu's avatar
Lu Xu committed
161

162
def test_mme_conf(self):
Joanne Hugé's avatar
Joanne Hugé committed
163 164

    conf_file = glob.glob(os.path.join(
165
      self.slap.instance_directory, '*', 'etc', 'mme.cfg'))[0]
Joanne Hugé's avatar
Joanne Hugé committed
166 167 168

    with open(conf_file, 'r') as f:
        conf = yaml.load(f)
169
    self.assertEqual(conf['plmn'], param_dict['epc_plmn'])
Joanne Hugé's avatar
Joanne Hugé committed
170

171
def test_sim_card(self):
Joanne Hugé's avatar
Joanne Hugé committed
172 173

    conf_file = glob.glob(os.path.join(
174
      self.slap.instance_directory, '*', 'ue_db.cfg'))[0]
Joanne Hugé's avatar
Joanne Hugé committed
175 176 177

    with open(conf_file, 'r') as f:
        conf = yaml.load(f)
178 179 180 181
    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))
Joanne Hugé's avatar
Joanne Hugé committed
182

183 184
    self.slap.waitForInstance() # Wait until publish is done
    p = self.requestSlaveInstance().getConnectionParameterDict()
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203
    p = p['_'] if '_' in p else p
    self.assertIn('info', p)

def test_monitor_gadget_url(self):
    parameters = json.loads(self.computer_partition.getConnectionParameterDict()['_'])
    self.assertIn('monitor-gadget-url', parameters)
    monitor_setup_url = parameters['monitor-setup-url']
    monitor_gadget_url = parameters['monitor-gadget-url']
    monitor_base_url = parameters['monitor-base-url']
    public_url = monitor_base_url + '/public'
    response = requests.get(public_url, verify=False)
    self.assertEqual(requests.codes['OK'], response.status_code)
    self.assertIn('software.cfg.html', monitor_gadget_url)
    response = requests.get(monitor_gadget_url, verify=False)
    self.assertEqual(requests.codes['OK'], response.status_code)
    self.assertIn('<script src="rsvp.js"></script>', response.text)
    self.assertIn('<script src="renderjs.js"></script>', response.text)
    self.assertIn('<script src="g-chart.line.js"></script>', response.text)
    self.assertIn('<script src="promise.gadget.js"></script>', response.text)
Joanne Hugé's avatar
Joanne Hugé committed
204

205
class TestENBParameters(ORSTestCase):
Joanne Hugé's avatar
Joanne Hugé committed
206 207 208 209 210 211 212 213 214
    @classmethod
    def getInstanceParameterDict(cls):
        return {'_': json.dumps(enb_param_dict)}
    @classmethod
    def getInstanceSoftwareType(cls):
        return "enb"
    def test_enb_conf(self):
        test_enb_conf(self)

215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233
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)
Joanne Hugé's avatar
Joanne Hugé committed
234

235
class TestEPCParameters(ORSTestCase):
Joanne Hugé's avatar
Joanne Hugé committed
236 237
    @classmethod
    def getInstanceParameterDict(cls):
Joanne Hugé's avatar
Joanne Hugé committed
238
        return {'_': json.dumps(param_dict)}
Joanne Hugé's avatar
Joanne Hugé committed
239 240 241 242
    @classmethod
    def getInstanceSoftwareType(cls):
        return "epc"
    def test_mme_conf(self):
243
        self.slap.waitForInstance() # Wait until publish is done
Joanne Hugé's avatar
Joanne Hugé committed
244 245 246 247 248
        test_mme_conf(self)

class TestENBEPCParameters(ORSTestCase):
    @classmethod
    def getInstanceParameterDict(cls):
249
        return {'_': json.dumps(enb_param_dict)}
Joanne Hugé's avatar
Joanne Hugé committed
250 251 252 253
    @classmethod
    def getInstanceSoftwareType(cls):
        return "enb-epc"
    def test_enb_conf(self):
254
        self.slap.waitForInstance() # Wait until publish is done
Joanne Hugé's avatar
Joanne Hugé committed
255 256
        test_enb_conf(self)
    def test_mme_conf(self):
257
        self.slap.waitForInstance() # Wait until publish is done
Joanne Hugé's avatar
Joanne Hugé committed
258 259
        test_mme_conf(self)

260 261 262 263 264 265 266 267
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):
268
        self.slap.waitForInstance() # Wait until publish is done
269 270
        test_gnb_conf1(self)
    def test_mme_conf(self):
271
        self.slap.waitForInstance() # Wait until publish is done
272
        test_mme_conf(self)
Joanne Hugé's avatar
Joanne Hugé committed
273 274 275 276 277 278

def requestSlaveInstance(cls, software_type):
    software_url = cls.getSoftwareURL()
    return cls.slap.request(
        software_release=software_url,
        partition_reference="SIM-CARD-EPC",
Joanne Hugé's avatar
Joanne Hugé committed
279
        partition_parameter_kw={'_': json.dumps(param_dict)},
Joanne Hugé's avatar
Joanne Hugé committed
280 281 282 283
        shared=True,
        software_type=software_type,
    )

284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387
class TestEPCMonitorGadgetUrl(ORSTestCase):
    @classmethod
    def getInstanceParameterDict(cls):
        return {'_': json.dumps({'testing': True})}

    @classmethod
    def getInstanceSoftwareType(cls):
        return "epc"

    def test_monitor_gadget_url(self):
      self.slap.waitForInstance() # Wait until publish is done
      test_monitor_gadget_url(self)

class TestENBMonitorGadgetUrl(ORSTestCase):
    @classmethod
    def getInstanceParameterDict(cls):
        return {'_': json.dumps(enb_param_dict)}

    @classmethod
    def getInstanceSoftwareType(cls):
        return "enb"

    def test_monitor_gadget_url(self):
      self.slap.waitForInstance() # Wait until publish is done
      test_monitor_gadget_url(self)

class TestENBEPCMonitorGadgetUrl(ORSTestCase):
    @classmethod
    def getInstanceParameterDict(cls):
        return {'_': json.dumps(enb_param_dict)}

    @classmethod
    def getInstanceSoftwareType(cls):
        return "enb-epc"

    def test_monitor_gadget_url(self):
      self.slap.waitForInstance() # Wait until publish is done
      test_monitor_gadget_url(self)

class TestGNBEPCMonitorGadgetUrl(ORSTestCase):
    @classmethod
    def getInstanceParameterDict(cls):
        return {'_': json.dumps(gnb_param_dict1)}

    @classmethod
    def getInstanceSoftwareType(cls):
        return "gnb-epc"

    def test_monitor_gadget_url(self):
      self.slap.waitForInstance() # Wait until publish is done
      test_monitor_gadget_url(self)

class TestGNBMonitorGadgetUrl(ORSTestCase):
    @classmethod
    def getInstanceParameterDict(cls):
        return {'_': json.dumps(gnb_param_dict1)}

    @classmethod
    def getInstanceSoftwareType(cls):
        return "gnb"

    def test_monitor_gadget_url(self):
      self.slap.waitForInstance() # Wait until publish is done
      test_monitor_gadget_url(self)

class TestMMEMonitorGadgetUrl(ORSTestCase):
    @classmethod
    def getInstanceParameterDict(cls):
        return {'_': json.dumps({'testing': True, 'slave-list': []})}

    @classmethod
    def getInstanceSoftwareType(cls):
        return "mme"

    def test_monitor_gadget_url(self):
      self.slap.waitForInstance() # Wait until publish is done
      test_monitor_gadget_url(self)

class TestUELTEMonitorGadgetUrl(ORSTestCase):
    @classmethod
    def getInstanceParameterDict(cls):
        return {'_': json.dumps({'testing': True})}

    @classmethod
    def getInstanceSoftwareType(cls):
        return "ue-lte"

    def test_monitor_gadget_url(self):
      self.slap.waitForInstance() # Wait until publish is done
      test_monitor_gadget_url(self)

class TestUENRMonitorGadgetUrl(ORSTestCase):
    @classmethod
    def getInstanceParameterDict(cls):
        return {'_': json.dumps({'testing': True})}

    @classmethod
    def getInstanceSoftwareType(cls):
        return "ue-nr"

    def test_monitor_gadget_url(self):
      self.slap.waitForInstance() # Wait until publish is done
      test_monitor_gadget_url(self)

Joanne Hugé's avatar
Joanne Hugé committed
388 389 390 391 392 393 394 395 396
class TestEPCSimCard(ORSTestCase):
    @classmethod
    def requestDefaultInstance(cls, state='started'):
        default_instance = super(
            ORSTestCase, cls).requestDefaultInstance(state=state)
        cls.requestSlaveInstance()
        return default_instance
    @classmethod
    def requestSlaveInstance(cls):
397
        return requestSlaveInstance(cls, 'epc')
Joanne Hugé's avatar
Joanne Hugé committed
398 399
    @classmethod
    def getInstanceParameterDict(cls):
400
        return {'_': json.dumps({'testing': True})}
Joanne Hugé's avatar
Joanne Hugé committed
401 402 403 404 405
    @classmethod
    def getInstanceSoftwareType(cls):
        return "epc"
    def test_sim_card(self):
        self.slap.waitForInstance() # Wait until publish is done
406
        test_sim_card(self)
Joanne Hugé's avatar
Joanne Hugé committed
407 408 409 410 411 412 413 414 415 416

class TestENBEPCSimCard(ORSTestCase):
    @classmethod
    def requestDefaultInstance(cls, state='started'):
        default_instance = super(
            ORSTestCase, cls).requestDefaultInstance(state=state)
        cls.requestSlaveInstance()
        return default_instance
    @classmethod
    def requestSlaveInstance(cls):
417
        return requestSlaveInstance(cls, 'enb-epc')
Joanne Hugé's avatar
Joanne Hugé committed
418 419
    @classmethod
    def getInstanceParameterDict(cls):
420
        return {'_': json.dumps({'testing': True})}
Joanne Hugé's avatar
Joanne Hugé committed
421 422 423 424 425
    @classmethod
    def getInstanceSoftwareType(cls):
        return "enb-epc"
    def test_sim_card(self):
        self.slap.waitForInstance() # Wait until publish is done
426
        test_sim_card(self)
Joanne Hugé's avatar
Joanne Hugé committed
427 428 429 430 431 432 433 434 435 436

class TestGNBEPCSimCard(ORSTestCase):
    @classmethod
    def requestDefaultInstance(cls, state='started'):
        default_instance = super(
            ORSTestCase, cls).requestDefaultInstance(state=state)
        cls.requestSlaveInstance()
        return default_instance
    @classmethod
    def requestSlaveInstance(cls):
437
        return requestSlaveInstance(cls, 'gnb-epc')
Joanne Hugé's avatar
Joanne Hugé committed
438 439
    @classmethod
    def getInstanceParameterDict(cls):
440
        return {'_': json.dumps({'testing': True})}
Joanne Hugé's avatar
Joanne Hugé committed
441 442 443 444 445
    @classmethod
    def getInstanceSoftwareType(cls):
        return "gnb-epc"
    def test_sim_card(self):
        self.slap.waitForInstance() # Wait until publish is done
446
        test_sim_card(self)
Lu Xu's avatar
Lu Xu committed
447 448 449 450

class TestUELTEParameters(ORSTestCase):
    @classmethod
    def getInstanceParameterDict(cls):
Joanne Hugé's avatar
Joanne Hugé committed
451
        return {'_': json.dumps(param_dict)}
Lu Xu's avatar
Lu Xu committed
452 453 454 455 456 457 458 459 460
    @classmethod
    def getInstanceSoftwareType(cls):
        return "ue-lte"
    def test_ue_lte_conf(self):
        conf_file = glob.glob(os.path.join(
          self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]

        with open(conf_file, 'r') as f:
          conf = yaml.load(f)
Joanne Hugé's avatar
Joanne Hugé committed
461 462 463 464 465 466 467
        self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_earfcn'], param_dict['dl_earfcn'])
        self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], param_dict['n_rb_dl'])
        self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], param_dict['n_antenna_dl'])
        self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], param_dict['n_antenna_ul'])
        self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
        self.assertEqual(conf['ue_list'][0]['imsi'], param_dict['imsi'])
        self.assertEqual(conf['ue_list'][0]['K'], param_dict['k'])
468 469 470 471 472 473
        self.assertEqual(conf['ue_list'][0]['sim_algo'], param_dict['sim_algo'])
        self.assertEqual(conf['ue_list'][0]['opc'], param_dict['opc'])
        self.assertEqual(conf['ue_list'][0]['amf'], int(param_dict['amf'], 16))
        self.assertEqual(conf['ue_list'][0]['sqn'], param_dict['sqn'])
        self.assertEqual(conf['ue_list'][0]['impu'], param_dict['impu'])
        self.assertEqual(conf['ue_list'][0]['impi'], param_dict['impi'])
Joanne Hugé's avatar
Joanne Hugé committed
474 475
        self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
        self.assertEqual(conf['rx_gain'], param_dict['rx_gain'])
Lu Xu's avatar
Lu Xu committed
476 477 478 479

class TestUENRParameters(ORSTestCase):
    @classmethod
    def getInstanceParameterDict(cls):
Joanne Hugé's avatar
Joanne Hugé committed
480
        return {'_': json.dumps(param_dict)}
Lu Xu's avatar
Lu Xu committed
481 482 483 484 485 486 487 488 489
    @classmethod
    def getInstanceSoftwareType(cls):
        return "ue-nr"
    def test_ue_nr_conf(self):
        conf_file = glob.glob(os.path.join(
          self.slap.instance_directory, '*', 'etc', 'ue.cfg'))[0]

        with open(conf_file, 'r') as f:
          conf = yaml.load(f)
Joanne Hugé's avatar
Joanne Hugé committed
490 491 492 493 494 495 496 497 498
        self.assertEqual(conf['cell_groups'][0]['cells'][0]['ssb_nr_arfcn'], param_dict['ssb_nr_arfcn'])
        self.assertEqual(conf['cell_groups'][0]['cells'][0]['dl_nr_arfcn'], param_dict['dl_nr_arfcn'])
        self.assertEqual(conf['cell_groups'][0]['cells'][0]['bandwidth'], param_dict['nr_bandwidth'])
        self.assertEqual(conf['cell_groups'][0]['cells'][0]['band'], param_dict['nr_band'])
        self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_dl'], param_dict['n_antenna_dl'])
        self.assertEqual(conf['cell_groups'][0]['cells'][0]['n_antenna_ul'], param_dict['n_antenna_ul'])
        self.assertEqual(conf['ue_list'][0]['rue_addr'], param_dict['rue_addr'])
        self.assertEqual(conf['ue_list'][0]['imsi'], param_dict['imsi'])
        self.assertEqual(conf['ue_list'][0]['K'], param_dict['k'])
499 500 501 502 503 504
        self.assertEqual(conf['ue_list'][0]['sim_algo'], param_dict['sim_algo'])
        self.assertEqual(conf['ue_list'][0]['opc'], param_dict['opc'])
        self.assertEqual(conf['ue_list'][0]['amf'], int(param_dict['amf'], 16))
        self.assertEqual(conf['ue_list'][0]['sqn'], param_dict['sqn'])
        self.assertEqual(conf['ue_list'][0]['impu'], param_dict['impu'])
        self.assertEqual(conf['ue_list'][0]['impi'], param_dict['impi'])
Joanne Hugé's avatar
Joanne Hugé committed
505 506
        self.assertEqual(conf['tx_gain'], param_dict['tx_gain'])
        self.assertEqual(conf['rx_gain'], param_dict['rx_gain'])
Lu Xu's avatar
Lu Xu committed
507