blob: 239d60bbfc7013eb2c4d71b5feb3b49680ef92fc [file] [log] [blame]
Wei-Yu Chenad55cb82022-02-15 20:07:01 +08001# SPDX-FileCopyrightText: 2020 The Magma Authors.
2# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
3#
4# SPDX-License-Identifier: BSD-3-Clause
Wei-Yu Chen49950b92021-11-08 19:19:18 +08005
6from typing import Any, List, Optional
7
8from tr069 import models
9
10
11class Tr069MessageBuilder:
12 @classmethod
13 def get_parameter_value_struct(
14 cls,
15 name: str,
16 val_type: str,
17 data: Any,
18 ) -> models.ParameterValueStruct:
19 param_value = models.ParameterValueStruct()
20 param_value.Name = name
21 value = models.anySimpleType()
22 value.type = val_type
23 value.Data = data
24 param_value.Value = value
25 return param_value
26
27 @classmethod
28 def get_fault(cls) -> models.Fault:
29 msg = models.Fault()
30 msg.FaultCode = 0
31 msg.FaultString = 'Some sort of fault'
32 return msg
33
34 @classmethod
35 def get_reboot_inform(cls) -> models.Inform:
36 msg = cls.get_inform()
37 events = []
38
39 event_boot = models.EventStruct()
40 event_boot.EventCode = '1 BOOT'
41 events.append(event_boot)
42
43 event_reboot = models.EventStruct()
44 event_reboot.EventCode = 'M Reboot'
45 events.append(event_reboot)
46
47 msg.Event.EventStruct = events
48 return msg
49
50 @classmethod
51 def get_qafb_inform(
52 cls,
53 oui: str = '48BF74',
54 sw_version: str = 'BaiBS_QAFB_1.6.4',
55 enb_serial: str = '1202000181186TB0006',
56 event_codes: Optional[List[str]] = None,
57 ) -> models.Inform:
58 if event_codes is None:
59 event_codes = []
60 msg = models.Inform()
61
62 # DeviceId
63 device_id = models.DeviceIdStruct()
64 device_id.Manufacturer = 'Unused'
65 device_id.OUI = oui
66 device_id.ProductClass = 'Unused'
67 device_id.SerialNumber = enb_serial
68 msg.DeviceId = device_id
69
70 # Event
71 msg.Event = models.EventList()
72 event_list = []
73 for code in event_codes:
74 event = models.EventStruct()
75 event.EventCode = code
76 event.CommandKey = ''
77 event_list.append(event)
78 msg.Event.EventStruct = event_list
79
80 # ParameterList
81 val_list = []
82 val_list.append(
83 cls.get_parameter_value_struct(
84 name='InternetGatewayDevice.DeviceInfo.HardwareVersion',
85 val_type='string',
86 data='VER.C',
87 ),
88 )
89 val_list.append(
90 cls.get_parameter_value_struct(
91 name='InternetGatewayDevice.DeviceInfo.ManufacturerOUI',
92 val_type='string',
93 data=oui,
94 ),
95 )
96 val_list.append(
97 cls.get_parameter_value_struct(
98 name='InternetGatewayDevice.DeviceInfo.SoftwareVersion',
99 val_type='string',
100 data=sw_version,
101 ),
102 )
103 val_list.append(
104 cls.get_parameter_value_struct(
105 name='InternetGatewayDevice.DeviceInfo.SerialNumber',
106 val_type='string',
107 data=enb_serial,
108 ),
109 )
110 val_list.append(
111 cls.get_parameter_value_struct(
112 name='InternetGatewayDevice.ManagementServer.ConnectionRequestURL',
113 val_type='string',
114 data='http://192.168.60.248:7547/25dbc91d31276f0cb03391160531ecae',
115 ),
116 )
117 msg.ParameterList = models.ParameterValueList()
118 msg.ParameterList.ParameterValueStruct = val_list
119
120 return msg
121
122 pass
123
124 @classmethod
125 def get_inform(
126 cls,
127 oui: str = '48BF74',
128 sw_version: str = 'BaiBS_RTS_3.1.6',
129 enb_serial: str = '120200002618AGP0003',
130 event_codes: Optional[List[str]] = None,
131 ) -> models.Inform:
132 if event_codes is None:
133 event_codes = []
134 msg = models.Inform()
135
136 # DeviceId
137 device_id = models.DeviceIdStruct()
138 device_id.Manufacturer = 'Unused'
139 device_id.OUI = oui
140 device_id.ProductClass = 'Unused'
141 device_id.SerialNumber = enb_serial
142 msg.DeviceId = device_id
143
144 # Event
145 msg.Event = models.EventList()
146 event_list = []
147 for code in event_codes:
148 event = models.EventStruct()
149 event.EventCode = code
150 event.CommandKey = ''
151 event_list.append(event)
152 msg.Event.EventStruct = event_list
153
154 # ParameterList
155 val_list = []
156 val_list.append(
157 cls.get_parameter_value_struct(
158 name='Device.DeviceInfo.HardwareVersion',
159 val_type='string',
160 data='VER.C',
161 ),
162 )
163 val_list.append(
164 cls.get_parameter_value_struct(
165 name='Device.DeviceInfo.ManufacturerOUI',
166 val_type='string',
167 data=oui,
168 ),
169 )
170 val_list.append(
171 cls.get_parameter_value_struct(
172 name='Device.DeviceInfo.SoftwareVersion',
173 val_type='string',
174 data=sw_version,
175 ),
176 )
177 val_list.append(
178 cls.get_parameter_value_struct(
179 name='Device.DeviceInfo.SerialNumber',
180 val_type='string',
181 data=enb_serial,
182 ),
183 )
184 val_list.append(
185 cls.get_parameter_value_struct(
186 name='Device.ManagementServer.ConnectionRequestURL',
187 val_type='string',
188 data='http://192.168.60.248:7547/25dbc91d31276f0cb03391160531ecae',
189 ),
190 )
191 msg.ParameterList = models.ParameterValueList()
192 msg.ParameterList.ParameterValueStruct = val_list
193
194 return msg
195
196 @classmethod
197 def get_qafb_read_only_param_values_response(
198 cls,
199 ) -> models.GetParameterValuesResponse:
200 msg = models.GetParameterValuesResponse()
201 param_val_list = []
202 param_val_list.append(
203 cls.get_parameter_value_struct(
204 name='InternetGatewayDevice.Services.FAPService.1.CellConfig.1.LTE.X_QUALCOMM_FAPControl.OpState',
205 val_type='boolean',
206 data='false',
207 ),
208 )
209 param_val_list.append(
210 cls.get_parameter_value_struct(
211 name='InternetGatewayDevice.Services.FAPService.1.CellConfig.1.LTE.X_QUALCOMM_FAPControl.OpState',
212 val_type='boolean',
213 data='false',
214 ),
215 )
216 param_val_list.append(
217 cls.get_parameter_value_struct(
218 name='InternetGatewayDevice.Services.FAPService.1.CellConfig.1.LTE.X_QUALCOMM_FAPControl.OpState',
219 val_type='boolean',
220 data='false',
221 ),
222 )
223 param_val_list.append(
224 cls.get_parameter_value_struct(
225 name='InternetGatewayDevice.FAP.GPS.latitude',
226 val_type='int',
227 data='0',
228 ),
229 )
230 param_val_list.append(
231 cls.get_parameter_value_struct(
232 name='InternetGatewayDevice.FAP.GPS.longitude',
233 val_type='int',
234 data='0',
235 ),
236 )
237 msg.ParameterList = models.ParameterValueList()
238 msg.ParameterList.ParameterValueStruct = param_val_list
239 return msg
240
241 @classmethod
242 def get_read_only_param_values_response(
243 cls,
244 ) -> models.GetParameterValuesResponse:
245 msg = models.GetParameterValuesResponse()
246 param_val_list = []
247 param_val_list.append(
248 cls.get_parameter_value_struct(
249 name='Device.Services.FAPService.1.FAPControl.LTE.OpState',
250 val_type='boolean',
251 data='false',
252 ),
253 )
254 param_val_list.append(
255 cls.get_parameter_value_struct(
256 name='Device.Services.FAPService.1.FAPControl.LTE.RFTxStatus',
257 val_type='boolean',
258 data='false',
259 ),
260 )
261 param_val_list.append(
262 cls.get_parameter_value_struct(
263 name='Device.DeviceInfo.X_BAICELLS_COM_GPS_Status',
264 val_type='boolean',
265 data='0',
266 ),
267 )
268 param_val_list.append(
269 cls.get_parameter_value_struct(
270 name='Device.DeviceInfo.X_BAICELLS_COM_1588_Status',
271 val_type='boolean',
272 data='0',
273 ),
274 )
275 param_val_list.append(
276 cls.get_parameter_value_struct(
277 name='Device.DeviceInfo.X_BAICELLS_COM_MME_Status',
278 val_type='boolean',
279 data='false',
280 ),
281 )
282 param_val_list.append(
283 cls.get_parameter_value_struct(
284 name='Device.FAP.GPS.LockedLatitude',
285 val_type='int',
286 data='0',
287 ),
288 )
289 param_val_list.append(
290 cls.get_parameter_value_struct(
291 name='Device.FAP.GPS.LockedLongitude',
292 val_type='int',
293 data='0',
294 ),
295 )
296 msg.ParameterList = models.ParameterValueList()
297 msg.ParameterList.ParameterValueStruct = param_val_list
298 return msg
299
300 @classmethod
301 def get_cavium_param_values_response(
302 cls,
303 admin_state: bool = False,
304 earfcndl: int = 2405,
305 num_plmns: int = 0,
306 ) -> models.GetParameterValuesResponse:
307 msg = models.GetParameterValuesResponse()
308 param_val_list = []
309 param_val_list.append(
310 cls.get_parameter_value_struct(
311 name='Device.Services.FAPService.1.CellConfig.LTE.RAN.RF.DLBandwidth',
312 val_type='string',
313 data='20',
314 ),
315 )
316 param_val_list.append(
317 cls.get_parameter_value_struct(
318 name='Device.Services.FAPService.1.CellConfig.LTE.RAN.RF.FreqBandIndicator',
319 val_type='string',
320 data='5',
321 ),
322 )
323 param_val_list.append(
324 cls.get_parameter_value_struct(
325 name='Device.ManagementServer.PeriodicInformInterval',
326 val_type='int',
327 data='5',
328 ),
329 )
330 param_val_list.append(
331 cls.get_parameter_value_struct(
332 name='Device.Services.FAPService.1.CellConfig.LTE.RAN.CellRestriction.CellReservedForOperatorUse',
333 val_type='boolean',
334 data='false',
335 ),
336 )
337 param_val_list.append(
338 cls.get_parameter_value_struct(
339 name='Device.Services.FAPService.1.CellConfig.LTE.RAN.RF.ULBandwidth',
340 val_type='string',
341 data='n100',
342 ),
343 )
344 param_val_list.append(
345 cls.get_parameter_value_struct(
346 name='Device.Services.FAPService.1.CellConfig.LTE.RAN.Common.CellIdentity',
347 val_type='int',
348 data='138777000',
349 ),
350 )
351 # MME IP
352 param_val_list.append(
353 cls.get_parameter_value_struct(
354 name='Device.Services.FAPService.1.FAPControl.LTE.Gateway.S1SigLinkServerList',
355 val_type='string',
356 data='"192.168.60.142"',
357 ),
358 )
359 # perf mgmt enable
360 param_val_list.append(
361 cls.get_parameter_value_struct(
362 name='Device.Services.FAPService.1.PerfMgmt.Config.1.Enable',
363 val_type='boolean',
364 data='true',
365 ),
366 )
367 param_val_list.append(
368 cls.get_parameter_value_struct(
369 name='Device.Services.FAPService.1.CellConfig.LTE.RAN.CellRestriction.CellBarred',
370 val_type='boolean',
371 data='false',
372 ),
373 )
374 param_val_list.append(
375 cls.get_parameter_value_struct(
376 name='Device.Services.FAPService.1.PerfMgmt.Config.1.PeriodicUploadInterval',
377 val_type='int',
378 data='600',
379 ),
380 )
381 param_val_list.append(
382 cls.get_parameter_value_struct(
383 name='Device.Services.FAPService.1.FAPControl.LTE.AdminState',
384 val_type='boolean',
385 data=admin_state,
386 ),
387 )
388 # Perf mgmt upload url
389 param_val_list.append(
390 cls.get_parameter_value_struct(
391 name='Device.Services.FAPService.1.PerfMgmt.Config.1.URL',
392 val_type='string',
393 data='http://192.168.60.142:8081/',
394 ),
395 )
396 param_val_list.append(
397 cls.get_parameter_value_struct(
398 name='Device.Services.FAPService.1.CellConfig.LTE.EPC.TAC',
399 val_type='int',
400 data='1',
401 ),
402 )
403 # PCI
404 param_val_list.append(
405 cls.get_parameter_value_struct(
406 name='Device.Services.FAPService.1.CellConfig.LTE.RAN.RF.PhyCellID',
407 val_type='int',
408 data='260',
409 ),
410 )
411 # MME port
412 param_val_list.append(
413 cls.get_parameter_value_struct(
414 name='Device.Services.FAPService.1.FAPControl.LTE.Gateway.S1SigLinkPort',
415 val_type='int',
416 data='36412',
417 ),
418 )
419 param_val_list.append(
420 cls.get_parameter_value_struct(
421 name='Device.IPsec.Enable',
422 val_type='boolean',
423 data='false',
424 ),
425 )
426 param_val_list.append(
427 cls.get_parameter_value_struct(
428 name='Device.Services.FAPService.1.CellConfig.LTE.RAN.RF.EARFCNDL',
429 val_type='int',
430 data='2405',
431 ),
432 )
433 param_val_list.append(
434 cls.get_parameter_value_struct(
435 name='Device.Services.FAPService.1.CellConfig.LTE.RAN.RF.EARFCNUL',
436 val_type='int',
437 data='20405',
438 ),
439 )
440 param_val_list.append(
441 cls.get_parameter_value_struct(
442 name='Device.Services.FAPService.1.Capabilities.LTE.DuplexMode',
443 val_type='string',
444 data='FDDMode',
445 ),
446 )
447 param_val_list.append(
448 cls.get_parameter_value_struct(
449 name='Device.Services.FAPService.1.Capabilities.LTE.BandsSupported',
450 val_type='string',
451 data='5',
452 ),
453 )
454 param_val_list.append(
455 cls.get_parameter_value_struct(
456 name='Device.ManagementServer.PeriodicInformEnable',
457 val_type='int',
458 data='5',
459 ),
460 )
461 param_val_list.append(
462 cls.get_parameter_value_struct(
463 name='Device.Services.FAPService.1.CellConfig.LTE.EPC.PLMNListNumberOfEntries',
464 val_type='int',
465 data=str(num_plmns),
466 ),
467 )
468 msg.ParameterList = models.ParameterValueList()
469 msg.ParameterList.ParameterValueStruct = param_val_list
470 return msg
471
472 @classmethod
473 def get_regular_param_values_response(
474 cls,
475 admin_state: bool = False,
476 earfcndl: int = 39250,
477 exclude_num_plmns: bool = False,
478 ) -> models.GetParameterValuesResponse:
479 msg = models.GetParameterValuesResponse()
480 param_val_list = []
481 param_val_list.append(
482 cls.get_parameter_value_struct(
483 name='Device.Services.FAPService.1.CellConfig.LTE.RAN.RF.DLBandwidth',
484 val_type='string',
485 data='n100',
486 ),
487 )
488 param_val_list.append(
489 cls.get_parameter_value_struct(
490 name='Device.Services.FAPService.1.CellConfig.LTE.RAN.RF.FreqBandIndicator',
491 val_type='string',
492 data='40',
493 ),
494 )
495 param_val_list.append(
496 cls.get_parameter_value_struct(
497 name='Device.ManagementServer.PeriodicInformInterval',
498 val_type='int',
499 data='5',
500 ),
501 )
502 param_val_list.append(
503 cls.get_parameter_value_struct(
504 name='Device.Services.FAPService.1.CellConfig.LTE.RAN.CellRestriction.CellReservedForOperatorUse',
505 val_type='boolean',
506 data='false',
507 ),
508 )
509 param_val_list.append(
510 cls.get_parameter_value_struct(
511 name='Device.Services.FAPService.1.CellConfig.LTE.RAN.RF.ULBandwidth',
512 val_type='string',
513 data='20',
514 ),
515 )
516 param_val_list.append(
517 cls.get_parameter_value_struct(
518 name='Device.Services.FAPService.1.X_BAICELLS_COM_LTE.EARFCNDLInUse',
519 val_type='string',
520 data=earfcndl,
521 ),
522 )
523 param_val_list.append(
524 cls.get_parameter_value_struct(
525 name='Device.Services.FAPService.1.CellConfig.LTE.RAN.PHY.TDDFrame.SpecialSubframePatterns',
526 val_type='int',
527 data='7',
528 ),
529 )
530 param_val_list.append(
531 cls.get_parameter_value_struct(
532 name='Device.Services.FAPService.1.CellConfig.LTE.RAN.Common.CellIdentity',
533 val_type='int',
534 data='138777000',
535 ),
536 )
537 # MME IP
538 param_val_list.append(
539 cls.get_parameter_value_struct(
540 name='Device.Services.FAPService.1.FAPControl.LTE.Gateway.S1SigLinkServerList',
541 val_type='string',
542 data='"192.168.60.142"',
543 ),
544 )
545 if not exclude_num_plmns:
546 param_val_list.append(
547 cls.get_parameter_value_struct(
548 name='Device.Services.FAPService.1.CellConfig.LTE.EPC.PLMNListNumberOfEntries',
549 val_type='int',
550 data='1',
551 ),
552 )
553 # perf mgmt enable
554 param_val_list.append(
555 cls.get_parameter_value_struct(
556 name='Device.FAP.PerfMgmt.Config.1.Enable',
557 val_type='boolean',
558 data='true',
559 ),
560 )
561 param_val_list.append(
562 cls.get_parameter_value_struct(
563 name='Device.Services.FAPService.1.CellConfig.LTE.RAN.CellRestriction.CellBarred',
564 val_type='boolean',
565 data='false',
566 ),
567 )
568 param_val_list.append(
569 cls.get_parameter_value_struct(
570 name='Device.FAP.PerfMgmt.Config.1.PeriodicUploadInterval',
571 val_type='int',
572 data='300',
573 ),
574 )
575 param_val_list.append(
576 cls.get_parameter_value_struct(
577 name='Device.Services.FAPService.1.FAPControl.LTE.AdminState',
578 val_type='boolean',
579 data=admin_state,
580 ),
581 )
582 # Local gateway enable
583 param_val_list.append(
584 cls.get_parameter_value_struct(
585 name='Device.DeviceInfo.X_BAICELLS_COM_LTE_LGW_Switch',
586 val_type='boolean',
587 data='0',
588 ),
589 )
590 # Perf mgmt upload url
591 param_val_list.append(
592 cls.get_parameter_value_struct(
593 name='Device.FAP.PerfMgmt.Config.1.URL',
594 val_type='string',
595 data='http://192.168.60.142:8081/',
596 ),
597 )
598 param_val_list.append(
599 cls.get_parameter_value_struct(
600 name='Device.Services.FAPService.1.CellConfig.LTE.EPC.TAC',
601 val_type='int',
602 data='1',
603 ),
604 )
605 param_val_list.append(
606 cls.get_parameter_value_struct(
607 name='Device.Services.FAPService.1.FAPControl.LTE.Gateway.X_BAICELLS_COM_MmePool.Enable',
608 val_type='boolean',
609 data='false',
610 ),
611 )
612 param_val_list.append(
613 cls.get_parameter_value_struct(
614 name='Device.Services.FAPService.1.CellConfig.LTE.RAN.PHY.TDDFrame.SubFrameAssignment',
615 val_type='int',
616 data='2',
617 ),
618 )
619 # PCI
620 param_val_list.append(
621 cls.get_parameter_value_struct(
622 name='Device.Services.FAPService.1.CellConfig.LTE.RAN.RF.PhyCellID',
623 val_type='int',
624 data='260',
625 ),
626 )
627 # MME port
628 param_val_list.append(
629 cls.get_parameter_value_struct(
630 name='Device.Services.FAPService.1.FAPControl.LTE.Gateway.S1SigLinkPort',
631 val_type='int',
632 data='36412',
633 ),
634 )
635 param_val_list.append(
636 cls.get_parameter_value_struct(
637 name='Device.Services.FAPService.Ipsec.IPSEC_ENABLE',
638 val_type='boolean',
639 data='false',
640 ),
641 )
642 param_val_list.append(
643 cls.get_parameter_value_struct(
644 name='Device.Services.FAPService.1.X_BAICELLS_COM_LTE.EARFCNULInUse',
645 val_type='int',
646 data='39150',
647 ),
648 )
649 param_val_list.append(
650 cls.get_parameter_value_struct(
651 name='Device.Services.FAPService.1.Capabilities.LTE.DuplexMode',
652 val_type='string',
653 data='TDDMode',
654 ),
655 )
656 param_val_list.append(
657 cls.get_parameter_value_struct(
658 name='Device.Services.FAPService.1.Capabilities.LTE.BandsSupported',
659 val_type='string',
660 data='40',
661 ),
662 )
663 param_val_list.append(
664 cls.get_parameter_value_struct(
665 name='Device.ManagementServer.PeriodicInformEnable',
666 val_type='int',
667 data='5',
668 ),
669 )
670 msg.ParameterList = models.ParameterValueList()
671 msg.ParameterList.ParameterValueStruct = param_val_list
672 return msg
673
674 @classmethod
675 def get_qafb_regular_param_values_response(
676 cls,
677 admin_state: bool = False,
678 earfcndl: int = 39250,
679 ) -> models.GetParameterValuesResponse:
680 msg = models.GetParameterValuesResponse()
681 param_val_list = []
682 param_val_list.append(
683 cls.get_parameter_value_struct(
684 name='InternetGatewayDevice.Services.FAPService.1.CellConfig.LTE.RAN.RF.DLBandwidth',
685 val_type='string',
686 data='20',
687 ),
688 )
689 param_val_list.append(
690 cls.get_parameter_value_struct(
691 name='InternetGatewayDevice.Services.FAPService.1.CellConfig.LTE.RAN.RF.FreqBandIndicator',
692 val_type='string',
693 data='40',
694 ),
695 )
696 param_val_list.append(
697 cls.get_parameter_value_struct(
698 name='InternetGatewayDevice.ManagementServer.PeriodicInformInterval',
699 val_type='int',
700 data='5',
701 ),
702 )
703 param_val_list.append(
704 cls.get_parameter_value_struct(
705 name='InternetGatewayDevice.Services.FAPService.1.CellConfig.LTE.RAN.CellRestriction.CellReservedForOperatorUse',
706 val_type='boolean',
707 data='false',
708 ),
709 )
710 param_val_list.append(
711 cls.get_parameter_value_struct(
712 name='InternetGatewayDevice.Services.FAPService.1.CellConfig.LTE.RAN.RF.ULBandwidth',
713 val_type='string',
714 data='20',
715 ),
716 )
717 param_val_list.append(
718 cls.get_parameter_value_struct(
719 name='InternetGatewayDevice.Services.FAPService.1.CellConfig.LTE.RAN.RF.ULBandwidth',
720 val_type='int',
721 data='1',
722 ),
723 )
724 param_val_list.append(
725 cls.get_parameter_value_struct(
726 name='InternetGatewayDevice.Services.FAPService.1.X_BAICELLS_COM_LTE.EARFCNDLInUse',
727 val_type='string',
728 data=earfcndl,
729 ),
730 )
731 param_val_list.append(
732 cls.get_parameter_value_struct(
733 name='InternetGatewayDevice.Services.FAPService.1.CellConfig.LTE.RAN.PHY.TDDFrame.SpecialSubframePatterns',
734 val_type='int',
735 data='7',
736 ),
737 )
738 # MME IP
739 param_val_list.append(
740 cls.get_parameter_value_struct(
741 name='InternetGatewayDevice.Services.FAPService.1.FAPControl.LTE.Gateway.S1SigLinkServerList',
742 val_type='string',
743 data='"192.168.60.142"',
744 ),
745 )
746 param_val_list.append(
747 cls.get_parameter_value_struct(
748 name='InternetGatewayDevice.Services.FAPService.1.CellConfig.LTE.EPC.PLMNListNumberOfEntries',
749 val_type='int',
750 data='1',
751 ),
752 )
753 # perf mgmt enable
754 param_val_list.append(
755 cls.get_parameter_value_struct(
756 name='InternetGatewayDevice.FAP.PerfMgmt.Config.1.Enable',
757 val_type='boolean',
758 data='true',
759 ),
760 )
761 param_val_list.append(
762 cls.get_parameter_value_struct(
763 name='InternetGatewayDevice.Services.FAPService.1.CellConfig.LTE.RAN.CellRestriction.CellBarred',
764 val_type='boolean',
765 data='false',
766 ),
767 )
768 param_val_list.append(
769 cls.get_parameter_value_struct(
770 name='InternetGatewayDevice.FAP.PerfMgmt.Config.1.PeriodicUploadInterval',
771 val_type='int',
772 data='300',
773 ),
774 )
775 param_val_list.append(
776 cls.get_parameter_value_struct(
777 name='InternetGatewayDevice.Services.FAPService.1.FAPControl.LTE.AdminState',
778 val_type='boolean',
779 data='false',
780 ),
781 )
782 # Local gateway enable
783 param_val_list.append(
784 cls.get_parameter_value_struct(
785 name='InternetGatewayDevice.DeviceInfo.X_BAICELLS_COM_LTE_LGW_Switch',
786 val_type='boolean',
787 data='0',
788 ),
789 )
790 # Perf mgmt upload url
791 param_val_list.append(
792 cls.get_parameter_value_struct(
793 name='InternetGatewayDevice.FAP.PerfMgmt.Config.1.URL',
794 val_type='string',
795 data='http://192.168.60.142:8081/',
796 ),
797 )
798 param_val_list.append(
799 cls.get_parameter_value_struct(
800 name='InternetGatewayDevice.Services.FAPService.1.CellConfig.LTE.EPC.TAC',
801 val_type='int',
802 data='1',
803 ),
804 )
805 param_val_list.append(
806 cls.get_parameter_value_struct(
807 name='InternetGatewayDevice.Services.FAPService.1.FAPControl.LTE.Gateway.X_BAICELLS_COM_MmePool.Enable',
808 val_type='boolean',
809 data='false',
810 ),
811 )
812 param_val_list.append(
813 cls.get_parameter_value_struct(
814 name='InternetGatewayDevice.Services.FAPService.1.CellConfig.LTE.RAN.PHY.TDDFrame.SubFrameAssignment',
815 val_type='int',
816 data='2',
817 ),
818 )
819 # PCI
820 param_val_list.append(
821 cls.get_parameter_value_struct(
822 name='InternetGatewayDevice.Services.FAPService.1.CellConfig.LTE.RAN.RF.PhyCellID',
823 val_type='int',
824 data='260',
825 ),
826 )
827 # MME port
828 param_val_list.append(
829 cls.get_parameter_value_struct(
830 name='InternetGatewayDevice.Services.FAPService.1.FAPControl.LTE.Gateway.S1SigLinkPort',
831 val_type='int',
832 data='36412',
833 ),
834 )
835 param_val_list.append(
836 cls.get_parameter_value_struct(
837 name='boardconf.ipsec.ipsecConfig.onBoot',
838 val_type='boolean',
839 data='false',
840 ),
841 )
842 param_val_list.append(
843 cls.get_parameter_value_struct(
844 name='InternetGatewayDevice.Services.FAPService.1.X_BAICELLS_COM_LTE.EARFCNULInUse',
845 val_type='int',
846 data='9212',
847 ),
848 )
849 param_val_list.append(
850 cls.get_parameter_value_struct(
851 name='boardconf.status.eepromInfo.div_multiple',
852 val_type='string',
853 data='02',
854 ),
855 )
856 param_val_list.append(
857 cls.get_parameter_value_struct(
858 name='boardconf.status.eepromInfo.work_mode',
859 val_type='string',
860 data='1C000400',
861 ),
862 )
863 param_val_list.append(
864 cls.get_parameter_value_struct(
865 name='InternetGatewayDevice.ManagementServer.PeriodicInformEnable',
866 val_type='int',
867 data='5',
868 ),
869 )
870 msg.ParameterList = models.ParameterValueList()
871 msg.ParameterList.ParameterValueStruct = param_val_list
872 return msg
873
874 @classmethod
875 def get_cavium_object_param_values_response(
876 cls,
877 num_plmns: int,
878 ) -> models.GetParameterValuesResponse:
879 msg = models.GetParameterValuesResponse()
880 param_val_list = []
881 for i in range(1, num_plmns + 1):
882 param_val_list.append(
883 cls.get_parameter_value_struct(
884 name='Device.Services.FAPService.1.CellConfig.LTE.EPC.PLMNList.%d.IsPrimary' % i,
885 val_type='boolean',
886 data='true',
887 ),
888 )
889 param_val_list.append(
890 cls.get_parameter_value_struct(
891 name='Device.Services.FAPService.1.CellConfig.LTE.EPC.PLMNList.%d.CellReservedForOperatorUse' % i,
892 val_type='boolean',
893 data='false',
894 ),
895 )
896 param_val_list.append(
897 cls.get_parameter_value_struct(
898 name='Device.Services.FAPService.1.CellConfig.LTE.EPC.PLMNList.%d.PLMNID' % i,
899 val_type='string',
900 data='00101',
901 ),
902 )
903 param_val_list.append(
904 cls.get_parameter_value_struct(
905 name='Device.Services.FAPService.1.CellConfig.LTE.EPC.PLMNList.%d.Enable' % i,
906 val_type='boolean',
907 data='true',
908 ),
909 )
910 msg.ParameterList = models.ParameterValueList()
911 msg.ParameterList.ParameterValueStruct = param_val_list
912 return msg
913
914 @classmethod
915 def get_object_param_values_response(
916 cls,
917 ) -> models.GetParameterValuesResponse:
918 msg = models.GetParameterValuesResponse()
919 param_val_list = []
920 param_val_list.append(
921 cls.get_parameter_value_struct(
922 name='Device.Services.FAPService.1.CellConfig.LTE.EPC.PLMNList.1.IsPrimary',
923 val_type='boolean',
924 data='true',
925 ),
926 )
927 param_val_list.append(
928 cls.get_parameter_value_struct(
929 name='Device.Services.FAPService.1.CellConfig.LTE.EPC.PLMNList.1.CellReservedForOperatorUse',
930 val_type='boolean',
931 data='false',
932 ),
933 )
934 param_val_list.append(
935 cls.get_parameter_value_struct(
936 name='Device.Services.FAPService.1.CellConfig.LTE.EPC.PLMNList.1.PLMNID',
937 val_type='string',
938 data='00101',
939 ),
940 )
941 param_val_list.append(
942 cls.get_parameter_value_struct(
943 name='Device.Services.FAPService.1.CellConfig.LTE.EPC.PLMNList.1.Enable',
944 val_type='boolean',
945 data='true',
946 ),
947 )
948 msg.ParameterList = models.ParameterValueList()
949 msg.ParameterList.ParameterValueStruct = param_val_list
950 return msg
951
952 @classmethod
953 def get_qafb_object_param_values_response(
954 cls,
955 ) -> models.GetParameterValuesResponse:
956 msg = models.GetParameterValuesResponse()
957 param_val_list = []
958 param_val_list.append(
959 cls.get_parameter_value_struct(
960 name='InternetGatewayDevice.Services.FAPService.1.CellConfig.LTE.EPC.PLMNList.1.IsPrimary',
961 val_type='boolean',
962 data='true',
963 ),
964 )
965 param_val_list.append(
966 cls.get_parameter_value_struct(
967 name='InternetGatewayDevice.Services.FAPService.1.CellConfig.LTE.EPC.PLMNList.1.CellReservedForOperatorUse',
968 val_type='boolean',
969 data='false',
970 ),
971 )
972 param_val_list.append(
973 cls.get_parameter_value_struct(
974 name='InternetGatewayDevice.Services.FAPService.1.CellConfig.LTE.EPC.PLMNList.1.PLMNID',
975 val_type='string',
976 data='00101',
977 ),
978 )
979 param_val_list.append(
980 cls.get_parameter_value_struct(
981 name='InternetGatewayDevice.Services.FAPService.1.CellConfig.LTE.EPC.PLMNList.1.Enable',
982 val_type='boolean',
983 data='true',
984 ),
985 )
986 msg.ParameterList = models.ParameterValueList()
987 msg.ParameterList.ParameterValueStruct = param_val_list
988 return msg
989
990 @classmethod
991 def get_reboot_response(cls) -> models.RebootResponse:
992 return models.RebootResponse()