Add Kumu yang file for full duplex (self backhaul) relay
[scp/oam/modeling.git] / data-model / yang / published / kumu / fd-relay.yang
1 module fd-relay {
2     yang-version 1.1;
3     namespace "urn:rdns:com:kumunetworks:yang:fd-relay";
4     prefix "fdr";
5
6     import "ietf-inet-types" {
7         prefix "inet";
8     }
9
10     import ietf-yang-types {
11       prefix yang;
12     }
13
14     import "ietf-interfaces" {
15         prefix "if";
16     }
17
18     organization "Kumu Networks";
19     contact "Brad Davis";
20
21     description "Full-duplex relay data model";
22
23 /* ***********************************************
24                 REVISIONS
25    *********************************************** */
26
27    revision "2020-10-13" {
28         description "Replace custom relay-interfaces with standard ietf-interfaces";
29         reference "redmine 34169";
30    }
31    revision "2020-10-01" {
32          description "Change SINR to type dB to include fractional portion, and PLMN_ID to string";
33          reference "redmine 32899";
34    }
35     revision "2020-09-14" {
36           description "Add additional parameters reboot, state_machine_state, alarm details and convert pci-lock and pci-blacklist to lists";
37           reference "redmine 34005, 33787, 32899";
38     }
39     revision "2019-09-09" {
40         description "Updated to resolve bugs";
41         reference "Relay SoW";
42     }
43     revision "2019-09-02" {
44          description "Initial revision.";
45          reference "N/A";
46     }
47
48 /* ***********************************************
49                 TYPE DEFINITIONS
50    *********************************************** */
51
52     typedef lte-pci {
53         type uint16 {
54             range 0..503;
55         }
56         description  "LTE Physical Cell ID";
57     }
58
59     typedef lte-band {
60         type uint8 {
61             range "2 | 4 | 12 | 13 | 17";
62         }
63         description "LTE Band";
64     }
65
66     typedef lte-bw {
67         type uint8 {
68             range "5 | 10 | 15 | 20";
69         }
70         description  "LTE Bandwidth";
71     }
72
73     typedef dBm {
74         type decimal64 {
75             fraction-digits 2;
76         }
77         description "decibels mW";
78     }
79
80     typedef dB {
81         type decimal64 {
82             fraction-digits 2;
83         }
84         description "decibels";
85     }
86
87 /* ***********************************************
88                 TYPE DEFINITIONS
89    *********************************************** */
90
91     grouping canx-module {
92         description 'cancellation module config and state';
93         container state {
94             config false;
95             description 'cancellation module state information';
96             leaf calibrated {
97                 type boolean;
98                 description 'cancellation module calibration state';
99             }
100
101             container mimo_mode {
102                 description 'mimo configuration';
103                 leaf-list tx_mode {
104                     type uint8 {
105                         range 0..1;
106                     }
107                     description 'configured number of transmitters';
108                 }
109                 leaf-list rx_mode {
110                     type uint8 {
111                         range 0..1;
112                     }
113                     description 'configured number of receivers';
114                 }
115             }
116
117             leaf num_active_alarms {
118                 type uint8;
119                 description 'number of active alarms on module';
120             }
121
122             list active_alarms {
123                 key name;
124                 description 'list of active alarms on module';
125
126                 leaf name {
127                   type string;
128                   description "name of alarm";
129                 }
130
131                 leaf state {
132                   type boolean;
133                   description "true if alarm is currently active";
134                 }
135
136                 leaf description {
137                     type string;
138                     description 'description of module alarm';
139                 }
140
141                 leaf severity {
142                     type uint8;
143                     description 'module alarm severity';
144                 }
145             }
146
147             container powers {
148                 description 'current power readings';
149                 leaf t0_power {
150                     type dBm;
151                     description 'tx0 path power (module-referred)';
152                 }
153                 leaf t1_power {
154                     type dBm;
155                     description 'tx1 path power (module-referred)';
156                 }
157                 leaf r0_power {
158                     type dBm;
159                     description 'rx0 path power (module-input referred)';
160                 }
161                 leaf r1_power {
162                     type dBm;
163                     description 'rx1 path power (module-input referred)';
164                 }
165             }
166
167             leaf-list installed-versions {
168                 type string;
169                 description "list of installed software and versioning";
170             }
171
172             leaf center-frequency {
173                 type decimal64 {
174                     fraction-digits 1;
175                 }
176                 description 'cancellation module configured center frequency';
177             }
178             leaf bandwidth {
179                 type uint8 {
180                     range "5 | 10 | 15 | 20";
181                 }
182                 description 'cancellation module configured bandwidth';
183             }
184             leaf tx_sample_power {
185                 type int8 {
186                     range -5..24;
187                 }
188                 description 'cancellation module configured input-referred tx power';
189             }
190             leaf rx_gain {
191                 type string;
192                 description 'cancellation module configured rx gain';
193             }
194
195             leaf local_ip_addr {
196                 type inet:ip-address;
197                 description 'cancellation module local configuration IP addr';
198             }
199         }
200     }    // grouping canx-module
201
202     grouping band-info {
203         description "The current state within one band";
204         leaf band {
205             type lte-band;
206             description "active primary band";
207         }
208
209         leaf dl-earfcn {
210             type uint16;
211             description "DL EARFCN";
212         }
213
214         leaf bw {
215           type lte-bw;
216           description "LTE Channel bandwidth in MHz";
217         }
218
219         leaf output-power {
220             type dBm;
221             description 'TX Output power in PUSCH';
222         }
223
224         leaf pci {
225             type lte-pci;
226             description 'Connected PCI';
227         }
228
229         leaf RSSI {
230             type dBm;
231             description "Backhaul link RSSI in dBm";
232         }
233
234         leaf RSRQ {
235             type int16;
236             description "RSRQ";
237         }
238
239         leaf-list rsrp {
240             type dBm;
241             description "per-antenna RSRP";
242         }
243
244         leaf-list sinr {
245             type dB;
246             description "per-antenna SINR";
247         }
248
249         list neighboring-cell-measurements {
250             key "pci";
251
252             leaf pci {
253                 type lte-pci;
254                 description "PCI";
255             }
256
257             leaf dlearfcn {
258                 type uint16;
259                 description "DLEARFCN for neighboring cell";
260             }
261
262             leaf rsrp {
263                 type dBm;
264                 description "RSRP";
265             }
266             description "neighboring cell measurements list";
267         }   // list neighboring-cell-measurements
268     }   // grouping band-info
269
270     grouping relay-top {
271         description "Top level grouping for relay data (configuration & state)";
272
273
274         container networking {
275             description "networking state & config data";
276             container config {
277                 description "networking configuration data";
278
279                 container force-mtu {
280                     description 'MTU Forced on system for all UE and ethernet interfaces, to avoid fragmentation';
281                     leaf enabled {
282                         type boolean;
283                         description 'is force MTU enabled for all interfaces (eth and ue)';
284                     }
285                     leaf mtu {
286                         type uint16;
287                         description 'MTU to force on all interfaces';
288                     }
289                 }
290             }
291             container state {
292                 config false;
293                 description "networking state data";
294
295                 leaf-list interfaces {
296                     type if:interface-ref;
297                     description 'list of all system network interfaces,
298                         including traffic counters, etc.';
299
300                 }
301             }
302         }
303
304         container dhcp-server {
305             description 'container for dhcp-server';
306             container state {
307                 config false;
308                 description 'DHCP server state';
309
310                 list leases {
311                     key "ip";
312                     unique "mac-address";
313
314                     leaf ip {
315                         type inet:ip-address;
316                         description "IP Address";
317                     }
318
319                     leaf mac-address {
320                         type yang:phys-address;
321                         description "Lease MAC Address";
322                     }
323                     description "DHCP lease information";
324                 }
325             }
326         }
327
328         container software {
329             config false;
330             description "Software information";
331             leaf version {
332                 type string;
333                 description "Relay software version";
334             }
335         }
336
337         container cancellation {
338             description "container for cancellation modules' state and config data";
339             container ul-module {
340                 description 'uplink module state and config';
341                 uses canx-module;
342             }
343             container dl-module {
344                 description 'downlink module state and config';
345                 uses canx-module;
346             }
347         }
348
349         container sys-health {
350             description 'relay system health status';
351             container state {
352                 config false;
353                 description 'relay system health status';
354
355                 leaf system-uptime {
356                     type uint32;
357                     description "time since system reboot in seconds";
358                 }
359
360                 leaf temperature {
361                     type int16;
362                     description "temperature in deg C";
363                 }
364
365                 leaf num_active_alarms {
366                     type uint8;
367                     description 'number of active alarms on relay';
368                 }
369
370                 list active_alarms {
371                     key name;
372                     description 'list of active alarms on relay';
373
374                     leaf name {
375                       type string;
376                       description "name of alarm";
377                     }
378
379                     leaf state {
380                       type boolean;
381                       description "true if alarm is currently active";
382                     }
383
384                     leaf description {
385                         type string;
386                         description 'description of relay alarm';
387                     }
388
389                     leaf severity {
390                         type uint8;
391                         description 'relay alarm severity';
392                     }
393                 }
394
395                 leaf state_machine_state {
396                   type string;
397                   description "Current state of the state machine";
398                 }
399             }
400             container control {
401               description 'relay remote control';
402               leaf reboot {
403                 type boolean;
404                 description "Reboot relay";
405               }
406             }
407         }
408
409         container ue {
410             description 'cellular modem status & configuration';
411
412             container config {
413                 description 'cellular modem configuration';
414                 list pci-lock {
415                     key pci;
416                     description 'pci lock configuration';
417
418                     leaf enabled {
419                         type boolean;
420                         description 'pci lock enabled/disabled';
421                     }
422                     leaf pci {
423                         type lte-pci;
424                         description 'pci to lock';
425                     }
426                     leaf earfcn {
427                         type uint32;
428                         description 'earfcn to lock';
429                     }
430                 }
431                 list pci-blacklist {
432                     key lte-pci;
433                     description 'List of PCIs that will never be attached too';
434
435                     leaf lte-pci {
436                         type lte-pci;
437                         description 'PCI which will never be attached too';
438                     }
439                 }
440                 container sim-config {
441                     description 'SIM Card configuration';
442                     leaf sim-cpin {
443                         type string;
444                         description "SIM Card PIN";
445                     }
446                 }
447
448                 container heartbeat {
449                     description 'heartbeat ip configuration';
450                     leaf enabled {
451                         type boolean;
452                         description "Enable/disable heartbeat functionality";
453                     }
454
455                     leaf heartbeat-server-ip {
456                         type inet:ip-address;
457                         description "Heartbeat server IP to check latency";
458                     }
459
460                     leaf heartbeat-interval {
461                         type uint16;
462                         description "Interval at which to check heartbeat";
463                     }
464                 }
465
466                 container rf-config {
467                     description 'rf configuration for ue';
468                     leaf enable-band-2 {
469                         type boolean;
470                         description "enable band 2";
471                     }
472                     leaf enable-band-4 {
473                         type boolean;
474                         description "enable band 4";
475                     }
476                     leaf enable-band-12 {
477                         type boolean;
478                         description "enable band 12";
479                     }
480                     leaf enable-band-13 {
481                         type boolean;
482                         description "enable band 13";
483                     }
484                     leaf enable-band-17 {
485                         type boolean;
486                         description "enable band 17";
487                     }
488                     leaf disable-carrier-aggregration {
489                       type boolean;
490                       description "Enable/disable carrier aggregation";
491                     }
492                 }
493
494             }
495             container state {
496                 config false;
497                 description 'cellular modem state';
498
499                 list ip-address {
500                     key "apn";
501                     unique "ip";
502                     leaf apn {
503                         type string;
504                         description 'APN associated with IP address';
505                     }
506
507                     leaf ip {
508                         type inet:ip-address;
509                         description "IP Address";
510                     }
511
512                     leaf subnet {
513                         type inet:ip-address;
514                         description "Subnet Address";
515                     }
516                     description "ip address and apn information";
517                 }
518
519                 leaf versions {
520                     type string;
521                     description "UE firmware version";
522                 }
523
524                 leaf latency {
525                     type uint16;
526                     description "last reported heartbeat latency";
527                 }
528
529                 leaf attached {
530                     type boolean;
531                     description "true if ue is attached to network";
532                 }
533                 leaf conn-uptime {
534                     type uint32;
535                     description "connection uptime in seconds";
536                 }
537
538                 leaf ECI {
539                     type string;
540                     description "ECI";
541                 }
542
543                 leaf PLMN_ID {
544                     type string;
545                     description "PLMN ID";
546                 }
547
548                 leaf dl-data-rate {
549                     type uint32;
550                     description "Current DL Data Rate in bits/second";
551                 }
552
553                 leaf ul-data-rate {
554                     type uint32;
555                     description "Current UL Data Rate in bits/second";
556                 }
557
558                 leaf dl-mcs {
559                     type uint8;
560                     description "DL MCS Index";
561                 }
562
563                 container sim-info {
564                     description 'SIM Card and subscription related information';
565                     leaf sim-card-present {
566                         type boolean;
567                         description "SIM Card present in unit";
568                     }
569
570                     leaf imei {
571                         type string;
572                         description "IMEI Number as ASCII string base 10";
573                     }
574
575                     leaf imsi {
576                         type string;
577                         description "ISMI Number as ASCII string base 10";
578                     }
579                 }
580
581                 container heartbeat-status {
582                     description 'heartbeat status';
583                     leaf reachable {
584                         type boolean;
585                         description "True if heartbeat IP is reachable";
586                     }
587                 }
588                 container primary-band-info {
589                     description 'LTE primary carrier information';
590                     uses band-info;
591                 }
592
593                 container ca-band-info {
594                     description 'Secondary CA band information';
595                     uses band-info;
596                 }
597
598                 leaf lan_mac {
599                     type yang:phys-address;
600                     description 'MAC address for UE LAN port';
601                 }
602
603                 leaf serial_number {
604                     type string;
605                     description "UE serial number";
606                 }
607
608             }    // container state
609         }    // container ue
610
611         container enb-info {
612             description 'eNB Information - Config & State';
613             container config {
614                 description "Relevant eNB Information for relay small cell";
615
616                 leaf bandwidth {
617                     type lte-bw;
618                     description 'eNB Bandwidth in active bands';
619                 }
620                 leaf tx-power-per-antenna_0 {
621                     type dBm;
622                     description 'TX Output power per antenna 0';
623                 }
624                 leaf tx-power-per-antenna_1 {
625                     type dBm;
626                     description 'TX Output power per antenna 1';
627                 }
628                 leaf dlearfcn {
629                     type uint32;
630                     description 'eNB DLEARFCN';
631                 }
632                 leaf ulearfcn {
633                     type uint32;
634                     description 'eNB ULEARFCN';
635                 }
636             }
637         }
638
639         container update {
640             description 'firmware upgrade';
641             container config {
642                 description "Configuration for pushing firmware upgrade";
643
644                 leaf URL {
645                     type string;
646                     description 'URL to find the firmware ugprade';
647                 }
648                 leaf username {
649                     type string;
650                     description 'username for the file server';
651                 }
652                 leaf password {
653                     type string;
654                     description 'password for the file server';
655                 }
656                 leaf enable {
657                     type boolean;
658                     description 'if true, trigger upgrade';
659                 }
660             }
661         }
662
663     }
664
665 /* ***********************************************
666                 INSTANTIATION
667    *********************************************** */
668
669     uses relay-top;
670
671
672 }