aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-isis-lsp.yang
blob: 02f8b7962a807d367c22d1f699bf7017f5298b1d (plain)
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
32
33
34
35
36
37
38
39
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
68
69
70
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
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
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
submodule openconfig-isis-lsp {

  belongs-to openconfig-isis {
    prefix oc-isis;
  }
  import openconfig-extensions { prefix "oc-ext"; }
  import openconfig-inet-types { prefix "inet"; }
  import openconfig-isis-types { prefix "oc-isis-types"; }
  import openconfig-isis-lsdb-types { prefix "oc-isis-lsdb-types"; }
  import openconfig-types { prefix "oc-types"; }
  import openconfig-mpls-types { prefix "oc-mpls-types"; }
  // meta
  organization
    "OpenConfig working group";

  contact
    "OpenConfig working group
    www.openconfig.net ";

  description
    "This sub-module describes a YANG model for the IS-IS Link State
    Database (LSDB).

    Portions of this code were derived from IETF RFCs relating to the
    IS-IS protocol.
    Please reproduce this note if possible.
    IETF code is subject to the following copyright and license:
    Copyright (c) IETF Trust and the persons identified as authors of
    the code.
    All rights reserved.
    Redistribution and use in source and binary forms, with or without
    modification, is permitted pursuant to, and subject to the license
    terms contained in, the Simplified BSD License set forth in
    Section 4.c of the IETF Trust's Legal Provisions Relating
    to IETF Documents (http://trustee.ietf.org/license-info).";

  oc-ext:openconfig-version "0.4.0";

  revision "2018-05-14" {
    description
      "Update LSDB model to correct Extended IS reach TLV
      bug. This change is backwards incompatible due to
      adding an additional level of hierarchy to support
      multiple instances of the TLV.";
    reference "0.4.0";
  }

  revision "2017-07-26" {
    description
      "Update LSDB and fix bugs.";
    reference "0.3.2";
  }

  revision "2017-05-15" {
    description
      "Refactor LSDB.";
    reference "0.3.0";
  }

  revision "2017-01-13" {
    description
      "Remove top-level /isis container";
    reference "0.2.1";
  }

  revision "2016-12-15" {
    description
      "Add segment routing to IS-IS module";
    reference "0.2.0";
  }

  revision "2016-10-18" {
    description
      "Initial revision of IS-IS models.";
    reference "0.1.0";
  }

  typedef isis-metric-flags {
    type enumeration {
      enum INTERNAL {
        description
          "When this flag is not set, internal metrics are in use.";
      }
      enum UNSUPPORTED {
        description
          "When this flag (referred to as the S-bit) is set, then
          the metric is unsupported.";
      }
    }
    description
      "Type definition for flags used in IS-IS metrics";
  }

  grouping isis-lsdb-link-characteristics-a-bit {
    description
      "Definition of the A bit, as used in IS-IS link delay TLVs.";

    leaf a-bit {
      type boolean;
      description
        "The A bit is set when the measured value of this parameter
        exceeds its configured maximum threshold. The A bit is cleared
        when the measured value falls below its configured reuse
        threshold.";
    }
  }

  grouping isis-lsdb-tlv-nlpid-state {
    description
      "NLP ID parameters for IS-IS.";

    leaf-list nlpid {
      type enumeration {
        enum IPV4 {
          description "IPv4 Address family.";
        }
        enum IPV6 {
          description "IPv6 Address family.";
        }
      }
      description
        "Protocol supported. IPv4 is defined as (0xcc) and IPv6 -
        (0x8e)";
      reference
        "RFC1195: Use of OSI IS-IS for Routing in TCP/IP and
        Dual Environments. TLV 129. ";
    }
  }

  grouping isis-lsdb-subtlv-type-state {
    description
      "Per-subTLV type operational state parameters for ISIS.";

    leaf type {
      type identityref {
        base oc-isis-lsdb-types:ISIS_SUBTLV_TYPE;
      }
      description
        "The type of subTLV being described. The type of subTLV is
        expressed as a canonical name.";
    }
  }

  grouping isis-lsdb-tlv-type-state {
    description
      "Per-subTLV type operational state parameters for ISIS.";

    leaf type {
      type identityref {
        base oc-isis-lsdb-types:ISIS_TLV_TYPE;
      }
      description
        "The type of TLV being described. The type of TLV is
        expressed as a canonical name.";
    }
  }

  grouping is-reachability-neighbor-state {
    description
      "This grouping defines is-reachability neighbor.";

    container subtlvs {
      description
        "This container describes IS Neighbor sub-TLVs.";

      list subtlv {
        key "type";

        description
          "List of subTLV types in the LSDB for the specified TLV.";

        leaf type {
          type leafref {
            path "../state/type";
          }
          description
            "Reference to the sub-TLV type.";
        }

        container state {
          description
            "State parameters of IS neighbor state";

          uses isis-lsdb-subtlv-type-state;
        }

        container admin-group {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_ADMIN_GROUP'" {
            description
              "Only include the administrative group container when
              the sub-TLV is type 3";
          }
          description
            "This container defines sub-TLV 3.";

          container state {
            description
              "State parameters of sub-TLV 3.";

            leaf-list admin-group {
              type uint32;
              description
                "The administrative group sub-TLV contains a 4-octet
                bit mask assigned by the network administrator.  Each
                set bit corresponds to one administrative group
                assigned to the interface. By convention, the least
                significant bit is referred to as group 0, and the
                most significant bit is referred to as group 31.";
              reference
                "RFC5305: IS-IS Extensions for Traffic Engineering.
                sub-TLV 3: TLV 22,23,141,222, 223.";
            }
          }
        }

        container link-id {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ID'" {
            description
              "Only include the link identifier container when the
              sub-TLV is type 4";
          }
          description
            "This container defines sub-TLV 4.";

          container state {
            description
              "State parameters of sub-TLV 4.";

            leaf local {
              type uint32;
              description
                "The value field of this sub-TLV contains 4 octets of
                Link Local Identifier followed by 4 octets of Link
                Remote Identifier.";
              reference
                "RFC5307: IS-IS Extensions in Support of Generalized
                Multi-Protocol Label Switching (GMPLS). sub-TLV 3: TLV
                22,23,141,222, 223.";
            }

            leaf remote {
              type uint32;
              description
                "If the Link Remote Identifier is unknown, it is set
                to 0.";
              reference
                "RFC5307: IS-IS Extensions in Support of Generalized
                Multi-Protocol Label Switching (GMPLS). sub-TLV 3: TLV
                22,23,141,222, 223.";
            }
          }
        }

        container ipv4-interface-address {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_INTERFACE_ADDRESS'" {
            description
              "Only include the IPv4 interface address group container
              when the sub-TLV is type 6";
          }
          description
            "This container defines sub-TLV 6.";

          container state {
            description
              "State parameters of sub-TLV 6.";

            leaf-list address {
              type inet:ipv4-address;
              description
                "A 4-octet IPv4 address for the interface described by
                the (main) TLV. This sub-TLV can occur multiple
                times.";
              reference
                "RFC5305: IS-IS Extensions for Traffic Engineering.
                sub-TLV 6: TLV 22,23,41,222,223.";
            }
          }
        }

        container ipv4-neighbor-address {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_IPV4_NEIGHBOR_ADDRESS'" {
            description
              "Only include the IPv4 neighbor address container when
              the sub-TLV is type 8.";
          }
          description
            "This container defines sub-TLV 8.";

          container state {
            description
              "State parameters of sub-TLV 8.";

            leaf-list address {
              type inet:ipv4-address;
              description
                "A single IPv4 address for a neighboring router on
                this link. This sub-TLV can occur multiple times.";
              reference
                "RFC5305: IS-IS Extensions for Traffic Engineering.
                sub-TLV 8: TLV 22,23, 141,222,223.";
            }
          }
        }

        container max-link-bandwidth {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_MAX_LINK_BANDWIDTH'" {
            description
              "Only include the maximum link bandwidth container when
              the sub-TLV is type 9.";
          }
          description
            "This container defines sub-TLV 9.";

          container state {
            description
              "State parameters of sub-TLV 9.";

            leaf bandwidth {
              type oc-types:ieeefloat32;
              units "bytes per second";
              description
                "The maximum bandwidth that can be used on this link
                in this direction (from the system originating the LSP
                to its neighbors).  It is encoded in 32 bits in IEEE
                floating point format.  The units are bytes (not
                bits!) per second.";
              reference
                "RFC5305: IS-IS Extensions for Traffic Engineering.
                sub-TLV 9: TLV 22,23,141,222,223.";
            }
          }
        }

        container max-reservable-link-bandwidth {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_MAX_RESERVABLE_BANDWIDTH'" {
            description
              "Only include the maximum reservable link bandwidth
              container when the sub-TLV type is 10.";
          }
          description
            "This container defines sub-TLV 10.";

          container state {
            description
              "State parameters of sub-TLV 10.";

            leaf bandwidth {
              type oc-types:ieeefloat32;
              units "bytes per second";
              description
                "The maximum amount of bandwidth that can be reserved
                in this direction on this link.  Note that for
                oversubscription purposes,  this can be greater than
                the bandwidth of the link. It is encoded  in 32 bits
                in IEEE floating point format.  The units are bytes
                (not bits!) per second.";
              reference
                "RFC5305: IS-IS Extensions for Traffic Engineering.
                Sub-TLV 10: TLV 22,23,141,222,223.";
            }
          }
        }

        container unreserved-bandwidth {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_UNRESERVED_BANDWIDTH'" {
            description
              "Only include the unreserved bandwidth container when
              the sub-TLV type is 11.";
          }
          description
            "This container defines unreserved-bandwidth. The units
            are bytes per second.";

          reference
            "RFC5305: IS-IS Extensions for Traffic Engineering. sub-
            TLV 11: TLV 22,23,141,222,223";

          list setup-priority {
            key "priority";

            leaf priority {
              type leafref {
                path "../state/priority";
              }
              description
                "Reference to the setup priority to which the
                unreserved bandwidth corresponds.";
            }

            description
              "Setup priority (0 through 7) for unreserved
              bandwidth.";

            container state {
              description
                "State parameters of IS Extended Reachability sub-TLV
                11.";

              leaf priority {
                type uint8 {
                  range "0..7";
                }
                description
                  "Setup priority level of 0 through 7 to be used by
                  Unreserved Bandwidth sub-TLV 11.";
              }

              leaf bandwidth {
                type oc-types:ieeefloat32;
                units "bytes per second";
                description
                  "The amount of bandwidth reservable in this
                  direction on this link. Note that for
                  oversubscription purposes, this can be greater than
                  the bandwidth of the link. It contains eight 32-bit
                  IEEE floating point numbers(one for each priority).
                  The units are bytes (not bits!) per second. The
                  values correspond to the bandwidth that can be
                  reserved with a setup priority of 0 through 7,
                  arranged in increasing order with priority 0
                  occurring at the start of the sub-TLV, and priority
                  7 at the end of the sub-TLV.";
              }
            }
          }
        }

        container ipv6-interface-address {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_INTERFACE_ADDRESS'" {
            description
              "Only include the IPv6 interface address when the
              sub-TLV type is 12.";
          }
          description
            "This container defines sub-TLV 12.";

          container state {
            description
              "State parameters of sub-TLV 12.";

            leaf-list address {
              type inet:ipv6-address;
              description
                "Contains a 16-octet IPv6 address for the interface
                described by the containing  Extended IS Reachability
                TLV. This sub-TLV can occur multiple times.";
              reference
                "RFC6119: IPv6 Traffic Engineering in IS-IS. sub-TLV
                12: TLV 22,23,141,222,223.";
            }
          }
        }

        container ipv6-neighbor-address {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_IPV6_NEIGHBOR_ADDRESS'" {
            description
              "Only include the IPv6 neighbor address when the
              sub-TLV type is 13.";
          }
          description
            "This container defines sub-TLV 13.";

          container state {
            description
              "State parameters of sub-TLV 13.";

            leaf-list address {
              type inet:ipv6-address;
              description
                "Contains a 16-octet IPv6 address for a neighboring
                router on the link described by the (main) TLV. This
                sub-TLV can occur multiple times.";
              reference
                "RFC6119: IPv6 Traffic Engineering in IS-IS. sub-TLV
                13: ISIS TLV 22,23,141,222,223.";
            }
          }
        }

        container extended-admin-group {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_EXTENDED_ADMIN_GROUP'" {
            description
              "Only include the extended admin group when the
              sub-TLV type is 14.";
          }
          description
            "This container defines sub-TLV 14.";
          container state {
            description
              "State parameters of sub-TLV 14.";

            leaf-list extended-admin-group {
              type uint32;
              description
                "The extended-admin-group sub-TLV is used in addition
                to the Administrative Groups when it is desirable to
                make more than 32 colors available for advertisement
                in a network.";
              reference
                "RFC7308: Extended Administrative Groups in MPLS
                Traffic Engineering (MPLS-TE). sub-TLV 14: TLV
                22,23,141,222,223.";
            }
          }
        }

        container te-default-metric {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_TE_DEFAULT_METRIC'" {
            description
              "Only include the default traffic engineering metric
              container when the sub-TLV type is 18.";
          }
          description
            "This container defines sub-TLV 18.";
          container state {
            description
              "State parameters of sub-TLV 18.";

            leaf metric {
              type uint32;
              description
                "This metric is administratively assigned and can be
                used to present a differently weighted topology to
                traffic engineering SPF calculations. To preclude
                overflow within a traffic engineering SPF
                implementation, all metrics greater than or equal to
                MAX_PATH_METRIC SHALL be considered to have a metric
                of MAX_PATH_METRIC.";
              reference
                "RFC5305: IS-IS Extensions for Traffic Engineering.
                sub-TLV 18: TLV 22,23,141,222,223.";
            }
          }
        }

        container link-attributes {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_LINK_ATTRIBUTES'" {
            description
              "Only include the link attributes container when the
              sub-TLV is type 19.";
          }
          description
            "This container defines link-attributes.";

          container state {
            description
              "State parameters of IS Extended Reachability sub-TLV
              19.";

            leaf-list local-protection {
              type enumeration {
                enum LOCAL_PROTECTION {
                  description
                    "If set, local protection is available for the
                    link.";
                }
                enum LINK_EXCLUDED {
                  description
                    "If set, the link is excluded from local
                    protection.";
                }
              }
              description
                "Link local-protection attributes.";

              reference
                "RFC5029: Definition of an IS-IS Link Attribute Sub-
                TLV. TLV 22, sub-TLV 19.";
            }
          }
        }

        container link-protection-type {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_LINK_PROTECTION_TYPE'" {
            description
              "Only include the link protection type container when
              the sub-TLV type 20.";
          }
          description
            "ISIS LSDB parameters relating to the type of link
            protection offered.";

          container state {
            description
              "State parameters of sub-TLV 20.";

            leaf-list type {
              type enumeration {
                enum EXTRA_TRAFFIC {
                  description
                    "If set the link has extra traffic protection. If
                    the link is of type Extra Traffic, it means that
                    the link is protecting another link or links. The
                    LSPs on a link of this type will be lost if any of
                    the links it is protecting fail.";
                }
                enum UNPROTECTED {
                  description
                    "If set, the link is unprotected. If the link is
                    of type Unprotected, it means that there is no
                    other link protecting this link.  The LSPs on a
                    link of this type will be lost if the link
                    fails.";
                }
                enum SHARED {
                  description
                    "If set, the link has shared protection. If the
                    link is of type Shared, it means that there are
                    one or more disjoint links of type Extra Traffic
                    that are protecting this link.  These Extra
                    Traffic links are shared between one or more links
                    of type Shared.";
                }
                enum ONE_ONE {
                  description
                    "If set, the link has dedicated 1:1 protection. If
                    the link is of type Dedicated 1:1, it means that
                    there is one dedicated disjoint link of type Extra
                    Traffic that is protecting this link.";
                }
                enum PLUS_ONE {
                  description
                    "If set, the link has dedicated 1+1 protection. If
                    the link is of type Dedicated 1+1, it means that a
                    dedicated disjoint link is protecting this link.
                    However, the protecting link is not advertised in
                    the link state database and is therefore not
                    available for the routing of LSPs.";
                }
                enum ENHANCED {
                  description
                    "If set the link has enhanced protection.  If the
                    link is of type Enhanced, it means that a
                    protection scheme that is more reliable than
                    Dedicated 1+1, e.g., 4 fiber BLSR/MS-SPRING, is
                    being used to protect this link.";
                }
              }
              description
                "Link protection capabilities.";
              reference
                "RFC5307: IS-IS Extensions in Support of Generalized
                Multi-Protocol  Label Switching (GMPLS). sub-TLV 20:
                TLV 22,23,141,222,223.";
            }
          }
        }

        container bandwidth-constraints {
          when "../state/type =" +
               "'oc-isis-lsdb-types:IS_REACHABILITY_BANDWIDTH_CONSTRAINTS'" {
            description
              "Only include the bandwidth constraints container when
              the sub-TLV is type 22.";
          }
          description
            "This container defines bandwidth-constraints. For DS-TE,
            the existing Maximum Reservable link bandwidth parameter
            is retained, but its semantics is generalized and
            interpreted as the aggregate bandwidth constraint across
            all Class-Types";

          reference
            "RFC4124: Protocol Extensions for Support of Diffserv-
            aware MPLS Traffic Engineering. sub-TLV 22: TLV 22, 23,
            141, 222,223";

          list bandwidth-constraint {
            key "model-id";

            description
              "List of the Bandwidth Constraints sub-TLV instances
              present in the TLV.";

            leaf model-id {
              type leafref {
                path "../state/model-id";
              }
              description
                "Reference to the model ID associated with the
                instance of the Bandwidth Constraints sub-TLV.";
            }

            container state {
              description
                "State parameters of IS Extended Reachability sub-TLV
                22.";

              leaf model-id {
                type uint8;
                description
                  "Identifier for the Bandwidth Constraints  Model
                  currently in use by the LSR initiating the IGP
                  advertisement.";
              }
            }

            container constraints {
              description
                "Constraints contained within the Bandwidth
                Constraints sub-TLV";

              list constraint {
                key "constraint-id";

                description
                  "List of the constraints within the Bandwidth
                  Constraints sub-TLV. The BC0 level is indicated by
                  the constraint-id leaf being set to 0, with BCN
                  being indicated by constraint-id N.";

                leaf constraint-id {
                  type leafref {
                    path "../state/constraint-id";
                  }
                  description
                    "Reference to the unique ID for the BCN level.";
                }

                container state {
                  description
                    "Operational state parameters of the BCN level";

                  leaf constraint-id {
                    type uint32;
                    description
                      "Unique reference for the bandwidth constraint level. BC0
                      is indicated by this leaf being set to zero, with BCN
                      represented by this leaf being set to N.";
                  }

                  leaf bandwidth {
                    type oc-types:ieeefloat32;
                    units "bytes per second";
                    description
                      "The bandwidth constraint, expressed as a 32-bit IEEE
                      floating point number expressed in bytes per second.";
                  }
                }
              }
            }
          }
        }

        container unconstrained-lsp {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_UNCONSTRAINED_LSP'" {
            description
              "Only include the unconstrained LSP container when the
              sub-TLV is type 23.";
          }
          description
            "This container defines sub-TLV 23.";
          container state {
            description
              "State parameters of sub-TLV 23.";

            uses isis-lsdb-subtlv-type-state;

            leaf count {
              type uint16;
              description
                "Unconstrained TE LSP count(TE Label Switched Paths
                (LSPs) signalled with zero bandwidth).";
              reference
                "RFC5330: A Link-Type sub-TLV to Convey the Number of
                Traffic Engineering Label Switched Paths Signalled
                with Zero Reserved Bandwidth across a Link. sub-TLV
                23: TLV 22,23,141,222,223";
            }
          }
        }

        container adjacency-sids {
          when "../state/type =   'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_SID'" {
            description
              "Only include the adjacency SIDs container when the
              sub-TLV type is 31";
          }

          description
            "This container defines segment routing adjacency SIDs.";

          list adjacency-sid {
            key "value";

            description
              "Adjacency Segment-IDs List. An IGP-Adjacency Segment is
              an IGP segment attached to a unidirectional adjacency or
              a set of unidirectional adjacencies. By default, an IGP-
              Adjacency Segment is local to the node which advertises
              it.";

            leaf value {
              type leafref {
                path "../state/value";
              }
              description
                "Reference to the value of the Adjacency-SID.";
            }

            container state {
              description
                "State parameters of Adjacency-SID.";

              leaf value {
                type uint32;
                description
                  "Adjacency-SID value.";
              }

              leaf-list flags {
                type enumeration {
                  enum ADDRESS_FAMILY {
                    description
                      "Address-family flag. When unset, the Adj-SID
                      refers to an adjacency with outgoing IPv4
                      encapsulation. If set then the Adj-SID refers to
                      an adjacency with outgoing IPv6 encapsulation.";
                  }
                  enum BACKUP {
                    description
                      "Backup flag. When set, the Adj-SID refers to an
                      adjacency being protected (e.g.: using IPFRR or
                      MPLS-FRR).";
                  }
                  enum VALUE {
                    description
                      "Value flag. When set, the SID carries a value
                      (instead of an index). By default the flag is
                      SET.";
                  }
                  enum LOCAL {
                    description
                      "Local flag. When set, the value/index carried
                      by the SID has local significance. By default
                      the flag is SET.";
                  }
                  enum SET {
                    description
                      "Set flag. When set, the S-Flag indicates that
                      the Adj-SID refers to a set of adjacencies.";
                  }
                }
                description
                  "Flags associated with Adj-Segment-ID.";
              }

              leaf weight {
                type uint8;
                description
                  "Value that represents the weight of the Adj-SID for
                  the purpose of load balancing.";
              }
            }
          }

          reference
            "draft-ietf-isis-segment-routing-extensions. sub-TLV 31:
            TLV 22, 222, 223, 141. ";
        }

        container lan-adjacency-sids {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_ADJ_LAN_SID'" {
            description
              "Only include the LAN adjacency SID container when
              the sub-TLV is type 32.";
          }
          description
            "This container defines segment routing LAN adjacency
            SIDs";

          list lan-adjacency-sid {
            key "value";

            description
              "Adjacency Segment-IDs List. An IGP-Adjacency Segment is
              an IGP segment attached to a unidirectional adjacency or
              a set of unidirectional adjacencies. By default, an IGP-
              Adjacency Segment is local to the node which advertises
              it.";

            leaf value {
              type leafref {
                path "../state/value";
              }
              description
                "Reference to the value of the LAN Adjacency-SID.";
            }

            container state {
              description
                "State parameters of LAN Adjacency-SID.";

              leaf value {
                type uint32;
                description
                  "LAN Adjacency-SID value.";
              }

              leaf-list flags {
                type enumeration {
                  enum ADDRESS_FAMILY {
                    description
                      "Address-family flag. When unset, the Adj-SID
                      refers to an adjacency with outgoing IPv4
                      encapsulation. If set then the Adj-SID refers to
                      an adjacency with outgoing IPv6 encapsulation.";
                  }
                  enum BACKUP {
                    description
                      "Backup flag. When set, the Adj-SID refers to an
                      adjacency being protected (e.g.: using IPFRR or
                      MPLS-FRR).";
                  }
                  enum VALUE {
                    description
                      "Value flag. When set, the SID carries a value
                      (instead of an index). By default the flag is
                      SET.";
                  }
                  enum LOCAL {
                    description
                      "Local flag. When set, the value/index carried
                      by the SID has local significance. By default
                      the flag is SET.";
                  }
                  enum SET {
                    description
                      "Set flag. When set, the S-Flag indicates that
                      the Adj-SID refers to a set of adjacencies.";
                  }
                }
                description
                  "Flags associated with LAN-Adj-Segment-ID.";
              }

              leaf weight {
                type uint8;
                description
                   "Value that represents the weight of the Adj-SID
                   for the purpose of load balancing.";
              }

              leaf neighbor-id {
                type oc-isis-types:system-id;
                description
                  "System ID of the neighbor associated with the LAN-
                  Adj-Segment-ID value.";
              }
            }
          }

          reference
            "draft-ietf-isis-segment-routing-extensions. sub-TLV 32:
            TLV 22, 222, 223, 141.";
        }

        container link-delay {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY'" {
            description
              "Include the link delay container only when the sub-TLV
              type is type 33.";
          }
          description
            "This container defines unidirectional link delay.";

          reference
            "RFC7810: IS-IS Traffic Engineering (TE) Metric
            Extensions. sub-TLV 33: TLV 22, 23, 141, 222, 223.";

          container state {
            description
              "State parameters of IS Extended Reachability sub-TLV
              33.";

            uses isis-lsdb-link-characteristics-a-bit;

            leaf delay {
              type uint32;
              units microseconds;
              description
                "Average link delay value (in microseconds) between
                two directly connected IS-IS neighbors over a
                configurable interval.";
            }
          }
        }

        container min-max-link-delay {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_MIN_MAX_LINK_DELAY'" {
            description
              "Only include the min/max link delay container when the
              sub-TLV is type 34.";
          }
          description
            "This container defines min/max link delay.";

          reference
            "RFC7810: IS-IS Traffic Engineering (TE) Metric
            Extensions. sub-TLV 34: TLV 22, 23, 141, 222, 223.";

          container state {
            description
              "State parameters of IS Extended Reachability sub-TLV
              34.";

            uses isis-lsdb-link-characteristics-a-bit;

            leaf min-delay {
              type uint32;
              units microseconds;
              description
                "Minimum measured link delay value(in microseconds)
                between two directly connected IS-IS neighbors over a
                configurable interval.";
            }

            leaf max-delay {
              type uint32;
              units microseconds;
              description
                "Maximum measured link delay value(in microseconds)
                between two directly connected IS-IS neighbors over a
                configurable interval.";
            }
          }
        }

        container link-delay-variation {
          when "../state/type = " +
                "'oc-isis-lsdb-types:IS_REACHABILITY_LINK_DELAY_VARIATION'" {
            description
              "Only include the link delay variation container when
              the sub-TLV is type 35.";
          }
          description
            "This container defines unidirectional link delay
            variation.";

          reference
            "RFC7810: IS-IS Traffic Engineering (TE) Metric
            Extensions. sub-TLV 35: TLV 22,23,141,222,223.";

          container state {
            description
              "State parameters of IS Extended Reachability sub-TLV
              35.";

            leaf delay {
              type uint32;
              units microseconds;
              description
                "Average link delay between two directly connected IS-
                IS neighbors over a configurable interval.";
            }
          }
        }

        container link-loss {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_LINK_LOSS'" {
            description
              "Only include the link loss container when the sub-TLV
              is type 36.";
          }
          description
            "This container defines unidirectional link loss delay.";

          reference
            "RFC7810: IS-IS Traffic Engineering (TE) Metric
            Extensions. sub-TLV 36: TLV 22, 23, 141, 222, 223.";

          container state {
            description
              "State parameters of IS Extended Reachability sub-TLV
              36.";

            uses isis-lsdb-link-characteristics-a-bit;

            leaf link-loss {
              type uint32;
              description
                "Link packet loss as a percentage of the total traffic
                sent over a configurable interval. The basic unit is
                0.000003%, where (2^24 - 2) is 50.331642%. This value
                is the highest packet-loss percentage that can be
                expressed (the assumption being that precision is more
                important on high-speed links than the ability to
                advertise loss rates greater than this, and that high-
                speed links with over 50% loss are unusable).
                Therefore, measured values that are larger than the
                field maximum SHOULD be encoded as the maximum
                value.";
            }
          }
        }

        container residual-bandwidth {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_RESIDUAL_BANDWIDTH'" {
            description
              "Only include the resdiual bandwidth container when the
              sub-TLV is type 37.";
          }
          description
            "This container defines unidirectional residual
            bandwidth.";

          reference
            "RFC7810: IS-IS Traffic Engineering (TE) Metric
            Extensions. sub-TLV 37: TLV 22, 23, 141, 222, 223.";

          container state {
            description
              "State parameters of IS Extended Reachability sub-TLV
              37.";

            leaf bandwidth {
              type oc-types:ieeefloat32;
              units "bytes per second";
              description
                "Residual bandwidth on a link,forwarding adjacency
                [RFC4206], or bundled link in IEEE floating-point
                format with units of bytes per second. For a link or
                forwarding adjacency, residual bandwidth is defined to
                be the Maximum Bandwidth [RFC5305] minus the bandwidth
                currently allocated to RSVP-TE label switched paths.
                For a bundled link, residual bandwidth is defined to
                be the sum of the component link residual
                bandwidths.";
            }
          }
        }

        container available-bandwidth {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_AVAILABLE_BANDWIDTH'" {
            description
              "Only include the available bandwdith container when the
              sub-TLV is type 38.";
          }
          description
            "This container defines unidirectional lavailable
            bandwidth.";

          reference
            "RFC7810: IS-IS Traffic Engineering (TE) Metric
            Extensions. sub-TLV 38: TLV 22, 23, 141, 222, 223.";

          container state {
            description
              "State parameters of IS Extended Reachability sub-TLV
              38.";

            uses isis-lsdb-subtlv-type-state;

            leaf bandwidth {
              type oc-types:ieeefloat32;
              units "bytes per second";
              description
                "The available bandwidth on a link, forwarding
                adjacency, or bundled link in IEEE floating-point
                format with units of bytes per second. For a link or
                forwarding adjacency, available bandwidth is defined
                to be residual bandwidth minus the measured bandwidth
                used for the actual forwarding of non-RSVP-TE label
                switched path packets.  For a bundled link, available
                bandwidth is defined to be the sum of the component
                link available bandwidths minus the measured bandwidth
                used for the actual forwarding of non-RSVP-TE label
                switched path packets.  For a bundled link, available
                bandwidth is defined to be the sum of the component
                link available bandwidths.";
            }
          }
        }

        container utilized-bandwidth {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_REACHABILITY_UTILIZED_BANDWIDTH'" {
            description
              "Only include the utilized bandwidth container when the
              TLV is type 39.";
          }
          description
            "This container defines unidirectional utilized
            bandwidth.";

          reference
            "RFC7810: IS-IS Traffic Engineering (TE) Metric
            Extensions. sub-TLV 39: TLV 22, 23, 141, 222, 223.";

          container state {
            description
              "State parameters of IS Extended Reachability sub-TLV
              39.";

            uses isis-lsdb-subtlv-type-state;

            leaf bandwidth {
              type oc-types:ieeefloat32;
              units "bytes per second";
              description
                "The bandwidth utilization on a link, forwarding
                adjacency, or bundled link in IEEE floating-point
                format with units of bytes per second.  For a link or
                forwarding adjacency, bandwidth utilization represents
                the actual utilization of the link (i.e., as measured
                by the advertising node).  For a bundled link,
                bandwidth utilization is defined to be the sum of the
                component link bandwidth utilizations.";
            }
          }
        }
      }
    }

    uses isis-lsdb-undefined-subtlv;
  }

  grouping isis-lsdb-undefined-tlv {
    description
      "Grouping for unknown TLVs in the IS-IS LSDB";

    container undefined-tlvs {
      description
        "Surrounding container for a list of unknown TLVs.";

      list undefined-tlv {
        key "type";
        description
          "List of TLVs that are not defined within the model, or are
          not recognised by the system.";

        leaf type {
          type leafref {
            path "../state/type";
          }
          description
            "Reference to the undefined TLV's type";
        }

        container state {
          description
            "State parameters of the undefined TLV.";

          uses undefined-tlv-state;
        }
      }
    }
  }

  grouping isis-lsdb-undefined-subtlv {
    description
      "Grouping for unknown Sub-TLVs in the IS-IS LSDB.";

    container undefined-subtlvs {
      description
        "This container describes undefined ISIS TLVs.";

      list undefined-subtlv {
        key "type";

        description
          "Sub-TLVs that are not defined in the model or not
          recognised by system.";

        leaf type {
          type leafref {
            path "../state/type";
          }
          description
            "Reference to the type of the undefined sub-TLV";
        }

        container state {
          description
            "State parameters of the undefined sub-TLV.";

          uses undefined-subtlv-state;
        }
      }
    }
  }

  grouping isis-lsdb-prefix-state {
    description
      "This grouping defines prefix reachability.";

     container subtlvs {
      description
        "This container describes IS prefix sub-TLVs.";

      list subtlv {
        key "type";

        description
          "List of subTLV types in the LSDB for the specified TLV.";

        leaf type {
          type leafref {
            path "../state/type";
          }
          description
            "Reference to the sub-TLV type";
        }

        container state {
          description
            "State parameters for a prefix.";

          uses isis-lsdb-subtlv-type-state;
        }

      container tag {
        when "../state/type = " +
             "'oc-isis-lsdb-types:IP_REACHABILITY_TAG'" {
          description
            "Only include the tag container when the sub-TLV is type
            1.";
        }
        description
          "This container defines sub-TLV 1.";

        container state {
          description
            "State parameters of sub-TLV 1.";

          leaf-list tag32 {
            type uint32;
            description
              "List of 32-bit tags associated with the prefix. Example
              uses of these tags include carrying BGP standard (or
              extended) communities and controlling redistribution
              between levels and areas, different routing protocols,
              or multiple instances of IS-IS running on the same
              router.";
            reference
              "RFC5130: A Policy Control Mechanism in IS-IS Using
              Administrative Tags. sub-TLV 1.";
          }
        }
      }

      container tag64 {
        when "../state/type = " +
             "'oc-isis-lsdb-types:IP_REACHABILITY_TAG64'" {
          description
            "Only include the tag64 container when the sub-TLV is type
            2.";
        }
        description
          "This container defines sub-TLV 2.";

        container state {
          description
            "State parameters of sub-TLV 2.";

          leaf-list tag64 {
            type uint64;
            description
              "List of 64-bit tags associated with the prefix. Example
              uses of these tags include carrying BGP standard (or
              extended) communities and controlling redistribution
              between levels and areas, different routing protocols,
              or multiple instances of IS-IS running on the same
              router.";
            reference
              "RFC5130: A Policy Control Mechanism in IS-IS Using
              Administrative Tags. sub-TLV 2.";
          }
        }
      }

      container flags {
        when "../state/type = " +
             "'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_FLAGS'" {
          description
            "Only include the flags container when the sub-TLV is type
            4.";
        }
        description
          "This container defines sub-TLV 4.";

        container state {
          description
            "State parameters of sub-TLV 4.";

          uses isis-lsdb-subtlv-type-state;

          leaf-list flags {
            type enumeration {
              enum EXTERNAL_FLAG {
                description
                  "External prefix flag. Set if the prefix has been
                  redistributed from another protocol. This includes
                  the case where multiple virtual routers are
                  supported and the source of the redistributed prefix
                  is another IS-IS instance.";
              }
              enum READVERTISEMENT_FLAG {
                description
                  "Readvertisement flag. Set when the prefix has been
                  leaked from one level to another (upwards or
                  downwards).";
              }
              enum NODE_FLAG {
                description
                  "Node flag. Set when the prefix identifies the
                  advertising router, i.e., the prefix is a host
                  prefix advertising  a globally reachable address
                  typically associated with a loopback address.";
              }
            }
            description
              "Additional prefix reachability flags.";

            reference
              "RFC7794: IS-IS Prefix Attributes for Extended IPv4 and
              IPv6 Reachability. sub-TLV 4.";
            }
          }
        }

        container ipv4-source-router-id {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IP_REACHABILITY_IPV4_ROUTER_ID'" {
            description
              "Only include the IPv4 Source Router ID container when
              the sub-TLV is type 11.";
          }
          description
            "This container defines sub-TLV 11.";

          container state {
            description
              "State parameters of sub-TLV 11.";

            uses isis-lsdb-subtlv-type-state;

            leaf router-id {
              type inet:ipv4-address;
              description
                "IPv4 Source router ID address. In cases where the
                advertisement is an identifier for the advertising
                router (e.g., with the N-flag set in the Prefix
                Attribute Flags sub-TLV), it may be useful for other
                routers to know the source of the advertisement. When
                reachability advertisement is leaked from one level to
                another, Router ID advertised is always the Router ID
                of the IS-IS instance that originated the
                advertisement. This would be true even if the prefix
                had been learned from another protocol.";
              reference
                "RFC7794: IS-IS Prefix Attributes for Extended IPv4
                and IPv6 Reachability. sub-TLV 11";
            }
          }
        }

        container ipv6-source-router-id {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IP_REACHABILITY_IPV6_ROUTER_ID'" {
            description
              "Only include the IPv6 Source Router ID container when
              the sub-TLV is type 12.";
          }
          description
            "This container defines sub-TLV 12.";

          container state {
            description
              "State parameters of sub-TLV 12.";

            uses isis-lsdb-subtlv-type-state;

            leaf router-id {
              type inet:ipv6-address;
              description
                "IPv6 Source router ID address. In cases where the
                advertisement is an identifier for the advertising
                router (e.g., with the N-flag set in the Prefix
                Attribute Flags sub-TLV), it may be useful for other
                routers to know the source of the advertisement. When
                reachability advertisement is leaked from one level to
                another, Router ID advertised is always the Router ID
                of the IS-IS instance that originated the
                advertisement. This would be true even if the prefix
                had been learned from another protocol.";
              reference
                "RFC7794: IS-IS Prefix Attributes for Extended IPv4
                and IPv6 Reachability. sub-TLV 12.";
            }
          }
        }

        uses isis-lsdb-prefix-sid-state;
      }
    }

    uses isis-lsdb-undefined-subtlv;
  }

  grouping isis-lsdb-prefix-sid-state {
    description
      "This grouping defines ISIS Prefix SID.";

    container prefix-sids {
      when "../state/type = " +
           "'oc-isis-lsdb-types:IP_REACHABILITY_PREFIX_SID'" {
        description
          "Only include the Prefix SID container when
          the sub-TLV is type 3.";
      }
      description
        "This container defines segment routing extensions for
        prefixes.";

      reference
        "draft-ietf-isis-segment-routing-extensions. sub-TLV 3: TLV
        135, 235, 236, 237.";

      list prefix-sid {
        key "value";

        description
         "Prefix Segment-ID list. IGP-Prefix Segment is an IGP segment
         attached to an IGP prefix. An IGP-Prefix Segment is global
         (unless explicitly advertised otherwise) within the SR/IGP
         domain.";

        leaf value {
          type leafref {
            path "../state/value";
          }
          description
            "Reference to the value of the prefix SID.";
        }

        container state {
          description
            "State parameters for Prefix-SID.";

          leaf value {
            type uint32;
            description
              "IGP Prefix-SID value.";
          }

          leaf-list flags {
            type enumeration {
              enum READVERTISEMENT {
                description
                  "Readvertisment flag. When set, the prefix to which
                  this Prefix-SID is attached, has been propagated by
                  the router either from another level or from
                  redistribution.";
              }
              enum NODE {
                description
                  "Node flag. When set, the Prefix-SID refers to the
                  router identified by the prefix. Typically, the
                  N-Flag is set on Prefix-SIDs attached to a router
                  loopback address.";
              }
              enum NO_PHP {
                description
                  "Penultimate-Hop-Popping flag. When set, then the
                  penultimate hop MUST NOT pop the Prefix-SID before
                  delivering the packet to the node that advertised
                  the Prefix-SID.";
              }
              enum EXPLICIT_NULL {
                description
                  "Explicit-Null flag. When set, any upstream neighbor
                  of the Prefix-SID originator MUST replace the
                  Prefix-SID with a Prefix-SID having an Explicit-NULL
                  value (0 for IPv4 and 2 for IPv6) before forwarding
                  the packet.";
              }
              enum VALUE {
                description
                  "Value flag. When set, the Prefix-SID carries a
                  value (instead of an index). By default the flag is
                  UNSET.";
              }
              enum LOCAL {
                description
                  "Local flag. When set, the value/index carried by
                  the Prefix-SID has local significance. By default
                  the flag is UNSET.";
              }
            }
            description
              "Flags associated with Prefix Segment-ID.";
          }

          leaf algorithm {
            type uint8;
            description
              "Prefix-SID algorithm to be used for path computation.";
          }
        }
      }
    }
  }

  grouping isis-lsdb-common-metric-specification {
    description
      "Common definitions of the metric in IS-IS.";

    container default-metric {
      description
        "This container defines ISIS Default Metric.";

      container state {
        description
          "State parameters for default-metric.";

        leaf flags {
          type enumeration {
            enum INTERNAL {
              description
                "When set to zero, indicates internal metrics.";
            }
          }
          description
            "ISIS Default-Metric Flags.";
        }

        leaf metric {
          type oc-isis-types:narrow-metric;
          description
            "ISIS default metric value. This is a metric understood by
            every Intermediate system in the domain. Each circuit
            shall have a positive  integral value assigned for this
            metric. The value may be associated with any  objective
            function of the circuit, but by convention is intended to
            measure the capacity of the circuit for handling traffic,
            for example, its throughput in  bits-per-second. Higher
            values indicate a lower capacity.";
        }
      }
    }

    container delay-metric {
     description
       "This container defines the ISIS delay metric.";

      container state {
        description
          "State parameters of delay-metric.";

        leaf metric {
          type oc-isis-types:narrow-metric;
          description
            "ISIS delay metric value. This metric measures the transit
            delay of the associated circuit. It is an optional metric,
            which if assigned to a circuit shall have a positive
            integral value. Higher values indicate a longer transit
            delay.";
        }

        leaf-list flags {
          type isis-metric-flags;
          description
            "ISIS Delay Metric Flags.";
        }
      }
    }

    container expense-metric {
      description
        "This container defines the ISIS expense metric.";

      container state {
        description
          "State parameters of expense-metric.";

        leaf metric {
          type oc-isis-types:narrow-metric;
          description
            "ISIS expense metric value. This metric measures the
            monetary cost of utilising the associated circuit. It is
            an optional metric, which if assigned to a circuit shall
            have a positive integral value1). Higher values indicate a
            larger monetary expense.";
        }

        leaf-list flags {
          type isis-metric-flags;
          description
            "ISIS Expense Metric Flags.";
        }
      }
    }

    container error-metric {
      description
        "This container defines the ISIS error metric.";

      container state {
        description
          "State parameters of error-metric.";

        leaf metric {
          type oc-isis-types:narrow-metric;
          description
            "ISIS error metric value. This metric measures the
            residual error probability of the associated circuit. It
            is an optional metric, which if assigned to a circuit
            shall have a non-zero value. Higher values indicate a
            larger probability of undetected errors on the circuit.";
        }

        leaf-list flags {
          type isis-metric-flags;
          description
            "IS-IS error metric flags.";
        }
      }
    }
  }

  grouping isis-lsdb-neighbor {
    description
      "This grouping defines attributes of an ISIS standard
      neighbor.";

    container state {
      description
        "State parameters of IS standard neighbor.";

      leaf system-id {
        type oc-isis-types:system-id;
        description
          "System-ID of IS neighbor.";
      }
    }

    uses isis-lsdb-common-metric-specification;

  }

  grouping ipv4-prefix-attributes-state {
   description
     "This group defines attributes of an IPv4 standard prefix.";

    container state {
     description
       "State parameters of IPv4 standard prefix.";

      leaf up-down {
        type boolean;
        description
          "The up/down bit. Set if a prefix is advertised from a
          higher level to a lower level (e.g., level 2 to level 1),
          indicating that the prefix has traveled down the hierarchy.
          Prefixes that have the up/down bit set may only be
          advertised down the hierarchy, i.e., to lower levels. When a
          prefix is first injected into IS-IS, the bit is UNSET.";
      }

      leaf prefix {
        type inet:ipv4-prefix;
        description
          "IPv4 prefix contained within reachability TLVs.";
      }
    }

    uses isis-lsdb-common-metric-specification;
  }

  grouping isis-lsdb-common-mt-id {
    description
      "Common definition of the multi-topology ID";

    leaf mt-id {
      type uint16 {
        range "0..4095";
      }
      description
        "Multi-topology ID";
    }
  }

  grouping ipv4-prefix-extended-state {
    description
      "This grouping defines attributes of an IPv4 extended prefix.";

    container state {
      description
        "State parameters of an IPv4 extended prefix.";
      uses ipv4-prefix-extended-params-state;
    }

    uses isis-lsdb-prefix-state;
  }

  grouping ipv4-mt-prefix-extended-state {
    description
      "State parameters that relate to an IPv4 prefix in a
      multi-topology context.";

    container state {
      description
        "State parameters of an IPv4 extended prefix.";
      uses ipv4-prefix-extended-params-state;
      uses isis-lsdb-common-mt-id;
    }

    uses isis-lsdb-prefix-state;
  }

  grouping ipv4-prefix-extended-params-state {
    description
      "State parameters that relate to an IPv4 prefix";

    leaf up-down {
      type boolean;
      description
        "The up/down bit. Set if a prefix is advertised from a
        higher level to a lower level (e.g., level 2 to level 1),
        indicating that the prefix has traveled down the hierarchy.
        Prefixes that have the up/down bit set may only be
        advertised down the hierarchy, i.e., to lower levels. When a
        prefix is first injected into IS-IS, the bit is UNSET.";
    }

    leaf s-bit {
      type boolean;
      description
        "The Sub-TLV present bit. If UNSET, the octets of Sub-TLVs
        are not present. Otherwise, the bit is set and the octet
        following the prefix will contain the length of the Sub-TLV
        portion of the structure.";
    }

    leaf prefix {
      type inet:ipv4-prefix;
      description
        "IPv4 prefix contained within extended reachability TLVs.";
    }

    leaf metric {
      type oc-isis-types:wide-metric;
      description
        "ISIS metric value.";
    }
  }

  grouping ipv6-prefix-extended-state {
    description
      "State parameters relating to an IPv6 prefix.";

    container state {
      description
        "State parameters of IPv6 prefix attributes";

      uses ipv6-prefix-extended-params-state;
    }

    uses isis-lsdb-prefix-state;
  }

  grouping ipv6-mt-prefix-extended-state {
    description
      "State parameters relating to a multi-topology IPv6
      prefix.";

    container state {
      description
        "State parameters relating an IPv6 prefix attribute";
      uses ipv6-prefix-extended-params-state;
      uses isis-lsdb-common-mt-id;
    }

    uses isis-lsdb-prefix-state;
  }

  grouping ipv6-prefix-extended-params-state {
    description
      "Common parameters of an IPv6 extended prefix.";

    leaf up-down {
      type boolean;
      description
        "The up/down bit. Set if a prefix is advertised from a
        higher level to a lower level (e.g., level 2 to level 1),
        indicating that the prefix has traveled down the hierarchy.
        Prefixes that have the up/down bit set may only be
        advertised down the hierarchy, i.e., to lower levels. When a
        prefix is first injected into IS-IS, the bit is UNSET.";
    }

    leaf x-bit {
      type boolean;
      description
        "The external bit. Set when the prefix was distributed into
        IS-IS from another routing protocol.";
    }

    leaf s-bit {
      type boolean;
      description
        "The sub-tlv present bit. If UNSET, the octets of Sub-TLVs
         are not present. Otherwise, the bit is set and the octet
         following the prefix will contain the length of the Sub-TLV
         portion of the structure.";
    }

    leaf prefix {
      type inet:ipv6-prefix;
      description
        "IPv6 prefix contained within extended reachability TLVs.";
    }

    leaf metric {
      type oc-isis-types:wide-metric;
      description
        "ISIS metric value.";
    }
  }

  grouping isis-lsdb-common-extisreach-neighbors {
    description
      "Common structure for the Extended IS Reachability and IS
      Reachability Neighbour attributes.";

    container neighbors {
      description
        "This container describes IS neighbors.";

      list neighbor {
        key "system-id";
        description
          "This list describes ISIS extended neighbors and
          reachability attributes.";

        leaf system-id {
          type leafref {
            path "../state/system-id";
          }
          description
            "Reference to the neighboring system's system ID.";
        }

        container state {
          description
            "State parameters corresponding to the extended
            neighbour.";

          leaf system-id {
            type oc-isis-types:system-id;
            description
              "System-id of the neighbor.";
          }
        }

        container instances {
          description
            "This list contains all instances of an adjacency
            between the originating IS and the remote IS.
            Multiple instances are used where there are
            parallel adjacencies between two systems.";

          list instance {
            key "id";

            description
              "Instance of the TLV to the remote IS neighbor.";

            leaf id {
              type leafref {
                path "../state/id";
              }
              description
                "Reference to the unique identifier for
                the instance of the extended IS
                reachability sub-TLV.";
            }

            container state {
              description
                "State parameters of extended neighbor";

              leaf id {
                type uint64;
                description
                  "Unique identifier for the instance of the
                  TLV for the IS neighbor. The instance
                  ID is not required to be consistent across
                  across readvertisements of the LSP.";
              }

              leaf metric {
                type oc-isis-types:wide-metric;
                description
                  "Metric value.";
              }
            }
            uses is-reachability-neighbor-state;
          }
        }
      }
    }
  }

  grouping isis-lsdb-mtis-common {
    description
      "Common grouping for structure used within the multi-topology IS
      neighbour and multi-topology IS neighbour attribute TLVs.";

    container neighbors {
      description
        "MT-IS neigbor attributes.";

      list neighbor {
        key "mt-id system-id";
        description
          "This container describes IS neighbors.";

        leaf mt-id {
          type leafref {
            path "../state/mt-id";
          }
          description
          "Reference to the topology that the neighbor is
          within.";
        }

        leaf system-id {
          type leafref {
            path "../state/system-id";
          }
          description
            "Reference to the System ID of the neighbor.";
        }

        container state {
          description
            "Operational state parameters related to the
            MT ISN TLV.";

          uses mt-isis-neighbor-state;
        }

        container instances {
          description
            "This list contains all instances of an adjacency
            between the originating and remote IS. Multiple
            instances are used to indicate where there are
            parallel adjacencies between systems.";

          list instance {
            key "id";

            description
              "Instance of TLV-222 between the originating
              and remote IS.";

            leaf id {
              type leafref {
                path "../state/id";
              }
              description
                "Reference to the unique identifier for the
                instance of the multi-topology IS neighbor
                TLV instance.";
            }

            uses mt-isis-neighbor-instance;
          }
        }
      }
    }
  }

  grouping mt-isis-neighbor-state {
    description
      "This grouping defines state parameters that are related to
      each neighbour entry for the MT ISN TLV.";

    leaf mt-id {
      type uint16 {
        range "0..4095";
      }
      description
        "Identifier of a topology being announced.";
    }

    leaf system-id {
      type oc-isis-types:system-id;
      description
        "System-id of the IS neighbor.";
    }
  }

  grouping mt-isis-neighbor-instance {
    description
      "This grouping defines list of ISIS multi-topology neighbors for
      extended ISIS LSP (multiple system IDs).";

     container state {
      description
        "State parameters of MT neighbor.";

      leaf metric {
        type oc-isis-types:wide-metric;
        description
          "ISIS metric value.";
      }

      leaf id {
        type uint64;
        description
          "Unique identifier for the TLV instance for the
          neighbor. The ID is not required to be consistent
          across readvertisements of the LSP.";
      }
    }
    uses is-reachability-neighbor-state;
  }

  grouping isis-lsdb-generic-tlv {
    description
      "Generic TLV encoding grouping.";

    leaf type {
      type uint8;
      description
        "TLV Type.";
    }

    leaf length {
      type uint8;
      description
        "TLV length.";
    }

    leaf value {
      type binary;
      description
        "TLV value.";
    }
  }

  grouping undefined-tlv-state {
    description
      "Generic grouping defining an unknown TLV.";

    uses isis-lsdb-generic-tlv;
  }

  grouping undefined-subtlv-state {
    description
      "Generic grouping defining an unknown sub-TLV.";

    uses isis-lsdb-generic-tlv;
  }

  grouping lsp-state {
    description
      "This grouping defines ISIS LSP state information.";

    leaf lsp-id {
     type leafref {
        path "../state/lsp-id";
      }

      description
        "A reference to the Link State PDU ID.";
    }

    container state {
      description
        "State parameters of Link State PDU.";

      leaf lsp-id {
        type oc-isis-types:lsp-id;
        description
          "LSP ID of the LSP.";
      }

      leaf maximum-area-addresses {
        type uint8;
        description
          "Number of area addresses permitted for this ISs area. 0
          indicates the IS only supports three area addresses (by
          default). Any number inclusive of 1 and 254 indicates the
          number of areas allowed.";
      }

      leaf version {
        type uint8;
        default 1;
        description
          "PDU version. This is set to 1.";
      }

      leaf version2 {
        type uint8;
        default 1;
        description
          "PDU version2. This is set to 1";
      }

      leaf id-length {
        type uint8;
        description
          "Length of the ID field of NSAP addresses and NETs used in
          this routing domain.";
      }

      leaf pdu-type {
        type enumeration {
          enum LEVEL_1 {
            description "This enum describes ISIS level 1 PDU.";
          }
          enum LEVEL_2 {
            description "This enum describes ISIS level 2 PDU.";
          }
        }
         description
           "Link State PDU type.";
      }

      leaf remaining-lifetime {
         type uint16;
         units "seconds";
         description
           "Remaining lifetime in seconds before the LSP expiration.";
      }

      leaf sequence-number {
         type uint32;
         description
           "Sequence number of the LSP.";
      }

      leaf checksum {
         type uint16;
         description
           "Checksum of the LSP.";
      }

      leaf pdu-length {
         type uint16;
         description
           "Total length of the LSP.";
      }

      leaf-list flags {
        type enumeration {
          enum PARTITION_REPAIR {
            description
              "When set, the originator supports partition
              repair.";
          }
          enum ATTACHED_ERROR {
            description
              "When set, the originator is attached to another
              area using the referred metric.";
          }
          enum ATTACHED_EXPENSE {
            description
              "When set, the originator is attached to another
              area using the referred metric.";
          }
          enum ATTACHED_DELAY {
            description
              "When set, the originator is attached to another
              area using the referred metric.";
          }
          enum ATTACHED_DEFAULT {
            description
              "When set, the originator is attached to another
              area using the referred metric.";
          }
          enum OVERLOAD {
            description
              "When set, the originator is overloaded, and must
              be avoided in path calculation.";
          }
        }
        description
          "LSP Type-Block flags.";
      }

      leaf is-type {
        type oc-isis-types:level-number;
        description
          "Type of neighboring system.";
      }
    }

    container tlvs {
      description
        "This container defines Link State PDU State TLVs.";

      list tlv {
        key "type";

        description
          "List of TLV types in the LSDB for the specified LSP.";

        leaf type {
          type leafref {
            path "../state/type";
          }
          description
            "Reference to the TLV's type.";
        }

        container state {
          config false;
          description
            "Operational state parameters relating to the specified
            LSP";

          uses isis-lsdb-tlv-type-state;
        }

        container area-address {
          when "../state/type = 'oc-isis-lsdb-types:AREA_ADDRESSES'" {
            description
              "Include area address parameters only when the TLV type
              is TLV 1.";
          }

          description
            "This container defines TLV 1.";

          container state {
            description
              "State parameters of ISIS TLV 1.";

            leaf-list address {
              type oc-isis-types:area-address;
              description
                "Area adress(es) of the IS. Set of manual area
                addresses of this IS.";
             reference
              "ISO 10589 Intermediate System to Intermediate System
              Intra- Domain Routeing Exchange Protocol for use in
              Conjunction with the Protocol for Providing the
              Connectionless-mode Network Service (ISO 8473 )
              International Standard 10589: 2002, Second Edition,
              2002. TLV 1.";
            }
          }
        }

        container lsp-buffer-size {
          when "../state/type = " +
               "'oc-isis-lsdb-types:LSP_BUFFER_SIZE'" {
            description
              "Include the LSP buffer size parameters only when the
              TLV type is TLV 14.";
          }

          description
            "This container defines TLV 14 - the LSP Buffer Size
            TLV.";

          container state {
            description
              "State parameters of TLV 14.";

            leaf size {
              type uint16;
              units "bytes";
              description
                "The maximum MTU that the advertising system can
                receive, expressed in bytes.";
              reference
               "ISO 10589 Intermediate System to Intermediate System
               Intra- Domain Routeing Exchange Protocol for use in
               Conjunction with the Protocol for Providing the
               Connectionless-mode Network Service (ISO 8473 )
               International Standard 10589: 2002, Second Edition,
               2002. TLV 14.";
            }
          }
        }

        container nlpid {
          when "../state/type = 'oc-isis-lsdb-types:NLPID'" {
            description
              "Include NLPID specification only when the TLV type is
              TLV 129.";
          }

          description
            "This container defines TLV 129.";

          container state {
           description
             "State parameters of ISIS TLV 129.";

            uses isis-lsdb-tlv-nlpid-state;
          }
        }

        container hostname {
          when "../state/type = 'oc-isis-lsdb-types:DYNAMIC_NAME'" {
            description
              "Include the dynamic hostname TLV only when the TLV is
              type 137.";
          }
          description
            "This container defines TLV 137.";

          container state {
            description
              "State parameters of ISIS TLV 137.";

            leaf-list hostname {
              type string;
              description
                "Name of the node.";

              reference
                "RFC6233: IS-IS Registry Extension for Purges, RFC
                5301: Dynamic Hostname Exchange Mechanism for IS-IS.
                TLV 137";
           }
         }
        }

        container ipv4-interface-addresses {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IPV4_INTERFACE_ADDRESSES'" {
            description
              "Include the IPv4 interface addresses TLV only when the
              TLV is type 132.";
          }
          description
            "This container defines TLV 132.";

          container state {
            description
              "State parameters of ISIS TLV 132.";

            leaf-list address {
              type inet:ipv4-address;
              description
                "IPv4 address(es) of the interface corresponding to
                the SNPA over which this PDU is to be transmitted.";
             reference
              "RFC1195: Use of OSI IS-IS for Routing in TCP/IP and
              Dual Environments. TLV 132.";
            }
          }
        }

        container ipv6-interface-addresses {
          when "../state/type = " +
                "'oc-isis-lsdb-types:IPV6_INTERFACE_ADDRESSES'" {
            description
              "Include the IPv6 interface addresses TLV only when the
              TLV is type 232.";
          }
          description
            "This container defines TLV 232.";

          container state {
            description
              "State parameters of ISIS TLV 232.";

            leaf-list address {
              type inet:ipv6-address;
              description
                "IPv6 interface addresses of the node.  MUST contain
                only the non-link-local IPv6 addresses assigned to the
                IS.";
              reference
                "RFC5308: Routing IPv6 with IS-IS. TLV 232.";
            }
          }
        }

        container ipv4-te-router-id {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IPV4_TE_ROUTER_ID'" {
            description
              "Include the IPv4 traffic engineering router ID TLV only
              when the TLV is type 134.";
          }
          description
            "This container defines TLV 134.";

          container state {
            description
              "State parameters of ISIS TLV 134.";

            leaf-list router-id {
              type inet:ipv4-address;
              description
                "IPv4 Traffic Engineering router ID of the node. For
                traffic engineering, it guarantees that we have a
                single stable address that can always be referenced in
                a path that will be reachable from multiple hops away,
                regardless of the state of the node's interfaces.";
             reference
              "RFC5305: IS-IS Extensions for Traffic Engineering. TLV
              134.";
            }
          }
        }

        container ipv6-te-router-id {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IPV6_TE_ROUTER_ID'" {
            description
              "Include the IPv6 traffic engineering router ID TLV only
              when the TLV is type 140.";
          }
          description
            "This container defines TLV 140.";

          container state {
            description
              "State parameters of ISIS TLV 140.";

            leaf-list router-id {
              type inet:ipv6-address;
              description
                "IPv6 Traffic Engineering router ID of the node. For
                traffic engineering, it guarantees that we have a
                single stable address that can always be referenced in
                a path that will be reachable from multiple hops away,
                regardless of the state of the node's interfaces.";
              reference
                "RFC6119: IPv6 Traffic Engineering in IS-IS. TLV
                140.";
            }
          }
        }

        container instance-ids {
          when "../state/type = 'oc-isis-lsdb-types:INSTANCE_ID'" {
            description
              "Include the ISIS Instance Identifier TLV only when the
              TLV is type 7.";
          }
          description
            "This container defines ISIS Instance Identifier TLV.";
          reference "RFC6822: IS-IS Multi-Instance. TLV 7.";

          list instance-id {
            key "instance-id";

            description
              "A list of instance IDs received within TLV 7 within an
              IS-IS LSP. In the case that more than one instance of
              TLV 7 is included in the LSP, the instance IDs specified
              within the instances are concatenated within this
              list.";

            leaf instance-id {
              type leafref {
                path "../state/instance-id";
              }
              description
                "Reference to the unique instance ID.";
            }
            container state {
              description
                "State parameters of ISIS TLV 7.";

              leaf instance-id {
                type uint16;
                description
                  "An Instance Identifier (IID) to uniquely identify
                  an IS-IS instance. When the IID = 0, the list of
                  supported ITIDs MUST NOT be present. An IID-TLV with
                  IID = 0 MUST NOT appear in an SNP or LSP. When the
                  TLV appears (with a non-zero IID) in an SNP or LSP,
                  exactly one ITID. MUST be present indicating the
                  topology with which the PDU is associated. If no
                  ITIDs or multiple ITIDs are present or the IID is
                  zero, then the PDU MUST be ignored.";
              }

              leaf-list topology-id {
                type uint16;
                description
                  "Instance-Specific Topology Identifiers (ITIDs).";
              }
            }
          }
        }

        container ipv4-srlgs {
          when "../state/type = 'oc-isis-lsdb-types:IPV4_SRLG'" {
            description
              "Include the IPv4 SRLG TLV only when the TLV is type
              138.";
          }
         description
           "This container defines ISIS SRLG TLV 138.";

         reference
            "RFC5307: IS-IS Extensions in Support of Generalized
            Multi-Protocol Label Switching (GMPLS). TLV 138.";

          list ipv4-srlg {
            key "instance-number";

            description
              "Instance of the IPv4 SRLG TLV";

            leaf instance-number {
              type leafref {
                path "../state/instance-number";
              }
              description
                "Reference to the instance number of TLV 138.";
            }

            container state {
              description
                "State parameters of TLV 138.";

              leaf instance-number {
                type uint32;
                description
                  "An arbitrary unsigned 32-bit integer used to
                  disambiguate the instance of TLV 138. The instance
                  identifier is synthesised by the system
                  and may be renumbered for the same SRLG definition
                  in subsequent advertised LSPs if (and only if) the
                  entire list of SRLGs is replaced.";
              }

              leaf system-id {
                type oc-isis-types:system-id;
                description
                  "Neighbor system ID.";
              }

              leaf psn-number {
                type uint8;
                description
                  "Pseudonode number if the neighbor is on a LAN
                  interface.";
              }

              leaf-list flags {
                type enumeration {
                  enum NUMBERED {
                    description
                      "When set, the interface is numbered, whereas if
                      unset indicates that the interface is
                      unnumbered.";
                  }
                }
                description
                  "SRLG flags.";
              }

              leaf ipv4-interface-address {
                type inet:ipv4-address;
                description
                  "IPv4 interface address.";
              }

              leaf ipv4-neighbor-address {
                type inet:ipv4-address;
                description
                  "IPv4 neighbor address.";
              }

              leaf-list srlg-value {
                type uint32;
                description
                  "List of SRLG values.";
              }
            }
          }
        }

        container ipv6-srlgs {
          when "../state/type = 'oc-isis-lsdb-types:IPV6_SRLG'" {
            description
              "Include the IPv6 SRLG TLV only when the TLV is type
              139.";
          }
          description
            "This container defines ISIS SRLG TLV.";

          reference
            "RFC6119: IPv6 Traffic Engineering in IS-IS. TLV 139.";

          list ipv6-srlg {
            key "instance-number";

            description
              "Instance of the IPv6 SRLG TLV.";

            leaf instance-number {
              type leafref {
                path "../state/instance-number";
              }
              description
                "Reference to the instance number of the IPv6 Shared
                Risk Link Group (SRLG) TLV.";
            }

            container state {
              description
                "State parameters of TLV 139.";

              leaf instance-number {
                type uint32;
                description
                  "An arbitrary unsigned 32-bit integer used to
                  disambiguate the instance of TLV 138. The instance
                  identifier is synthesised by the system
                  and may be renumbered for the same SRLG definition
                  in subsequent advertised LSPs if (and only if) the
                  entire list of SRLGs is replaced.";
              }

              leaf system-id {
                type oc-isis-types:system-id;
                description
                  "Neighbor system ID.";
              }

              leaf psn-number {
                type uint8;
                description
                  "Pseudonode number if the neighbor is on a LAN
                  interface.";
              }

              leaf-list flags {
                type enumeration {
                  enum NA {
                    description
                      "When set, the IPv6 neighbour address is
                      included, whereas if unset, it is omitted";
                  }
                }
                description
                  "IPv6 SRLG flags.";
              }

              leaf ipv6-interface-address {
                type inet:ipv6-address;
                description
                  "IPv6 interface address or Link Local Identifier.";
              }

              leaf ipv6-neighbor-address {
                type inet:ipv6-address;
                description
                  "IPv6 neighbor address or Link Remote Identifier.";
              }

              leaf-list srlg-value {
                type uint32;
                description
                  "SRLG values.";
              }
            }
          }
        }

        container purge-oi {
          when "../state/type = 'oc-isis-lsdb-types:PURGE_OI'" {
            description
              "Only include the purge originator identitication TLV
              when the TLV type is 13.";
          }
          description
            "This container defines ISIS purge TLV.";

          reference
            "RFC6232: Purge Originator Identification TLV for IS-IS.
            TLV 13.";

          container state {
            description
              "State parameters of TLV 13.";

            leaf system-id-count {
              type uint8;
              description
                "Number of system IDs carried in this TLV.";
            }

            leaf source-system-id {
              type oc-isis-types:system-id;
              description
                "System ID of the Intermediate System that inserted
                this TLV.";
            }

            leaf received-system-id {
              type oc-isis-types:system-id;
              description
                "System ID of the Intermediate System from which the
                purge was received.";
            }
          }
        }

        container router-capabilities {
          when "../state/type = " +
               "'oc-isis-lsdb-types:ROUTER_CAPABILITY'" {
            description
              "Only include the router capability TLV when the TLV is
              type 242.";
          }
          description
            "This container defines router capabilities.";

          list capability {
            key "instance-number";

            description
              "This list describes IS Router capabilities.";

            reference
              "RFC4971: Intermediate System to Intermediate System
              (IS-IS) Extensions for Advertising Router Information.
              TLV 242.";

            leaf instance-number {
              type leafref {
                path "../state/instance-number";
              }
              description
                "Reference to the instance number of the router
                capability TLV.";
            }

            container state {
              description
                "State parameters of TLV 242.";

              leaf instance-number {
                type uint32;
                description
                  "A unique instance number for the instance of the
                  router capabilities TLV. The instance number should
                  be autogenerated by the producer of the data and may
                  be renumbered if the entire LSP contents are
                  replaced in subsequent advertisements.";
              }

              leaf router-id {
                type inet:ipv4-address;
                description
                  "IPv4 router-id.";
              }

              leaf-list flags {
                type enumeration {
                  enum FLOOD {
                    description
                      "When the S bit is set(1), the IS - IS Router
                      CAPABILITY TLV MUST be flooded across the entire
                      routing domain. When the S bit is not set(0),
                      the TLV MUST NOT be leaked between levels . This
                      bit MUST NOT be altered during the TLV
                      leaking.";
                  }
                  enum DOWN {
                    description
                      "When the IS-IS Router CAPABILITY TLV is leaked
                      from level - 2 to level-1, the Down bit MUST be
                      set. Otherwise, this bit MUST be clear. IS - IS
                      Router capability TLVs with the Down bit set
                      MUST NOT be leaked from level - 1 to level-2.
                      This is to prevent TLV looping.";
                  }
                }
                description
                  "Router capability flags.";
              }
            }

            container subtlvs {
              description
                "This container describes router capability TLV
                sub-TLVs";

              list subtlv {
                key "type";
                description
                  "List of subTLV types in the LSDB for the specified
                  TLV";

                leaf type {
                  type leafref {
                    path "../state/type";
                  }
                  description
                    "Reference to the sub-TLV type";
                }

                container state {
                  description
                    "State parameters of IS Router Capabilities";

                  uses isis-lsdb-subtlv-type-state;
                 }

                container segment-routing-algorithms {
                  when "../state/type = " +
                       "'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_ALGORITHM'" {
                    description
                      "Only include segment routing algorithm when the
                      sub-TLV is type 19.";
                  }
                  description
                    "This container defines SR algorithm sub-TLV 19.";

                  reference
                    "draft-ietf-isis-segment-routing-extensions.
                     TLV 242, sub-TLV 19";

                    container state {
                      description
                        "State parameters of sub-TLV 19 - Segment
                        Routing Algorithm.";

                      leaf-list algorithm {
                        type enumeration {
                          enum SPF {
                            value 0;
                            description
                              "Shortest Path First (SPF) algorithm
                              based on link metric.  This is the
                              well-known shortest path algorithm as
                              computed by the IS-IS Decision process.
                              Consistent with the deployed practice
                              for link-state protocols, algorithm 0
                              permits any node to overwrite the SPF
                              path with a different path based on
                              local policy.";
                          }
                          enum STRICT_SPF {
                            value 1;
                            description
                              "Strict Shortest Path First (SPF)
                              algorithm based on link metric. The
                              algorithm is identical to algorithm 0
                              but algorithm 1 requires that all nodes
                              along the path will honor the SPF
                              routing decision. Local policy MUST NOT
                              alter the forwarding decision computed
                              by algorithm 1 at the node claiming to
                              support algorithm 1.";
                          }
                        }
                        description
                          "The Segment Routing algorithm that is
                          described by the TLV.";
                      }
                    }
                }

                container segment-routing-capability {
                  when "../state/type = " +
                       "'oc-isis-lsdb-types:ROUTER_CAPABILITY_SR_CAPABILITY'" {
                    description
                      "Only include the SR capability sub-TLV when
                      the sub-TLV type is 2.";
                  }
                  description
                    "This container defines SR Capability sub-TLV 2.";

                  reference
                    "draft-ietf-isis-segment-routing-extensions. TLV
                    242, sub-TLV 2.";

                  container state {
                    description
                      "State parameters of IS SR Router Capability";

                    leaf-list flags {
                      type enumeration {
                        enum IPV4_MPLS {
                          description
                            "When set, the router is capable of
                            processing SR MPLS encapsulated IPv4
                            packets on all interfaces.";
                        }
                        enum IPV6_MPLS {
                          description
                            "When set, the router is capable of
                            processing SR MPLS encapsulated IPv6
                            packets on all interfaces.";
                        }
                        enum IPV6_SR {
                          description
                            "When set, the router is capable of
                            processing the IPv6 Segment Routing Header
                            on all interfaces.";
                        }
                      }
                      description
                        "Segment Routing Capability Flags.";
                    }
                  }

                  container srgb-descriptors {
                    description
                      "SRGB Descriptors included within the SR
                      capability sub-TLV";

                    list srgb-descriptor {
                      key "range";
                      description
                        "Descriptor entry within the SR capabilty
                        sub-TLV";

                      leaf range {
                        type leafref {
                          path "../state/range";
                        }
                        description
                          "Reference to unique SRGB Descriptor.";
                      }

                      container state {
                        description
                          "State parameters of the SR range";

                        leaf range {
                          type uint32;
                          description
                            "Number of SRGB elements. The range
                            value MUST be greater than 0.";
                        }

                        leaf label {
                          type oc-mpls-types:mpls-label;
                          description
                            "The first value of the SRGB when
                            expressed as an MPLS label.";
                        }
                      }
                    }
                  }
                }
              }
            }
            uses isis-lsdb-undefined-subtlv;
          }
        }

        container is-reachability {
          when "../state/type = 'oc-isis-lsdb-types:IIS_NEIGHBORS'" {
            description
              "Include IIS_NEIGHBORS sub-TLV when the TLV type is 2.";
          }
          description
            "This container describes list of ISIS neighbors and
            attributes.";

           reference
             "ISO 10589, Intermediate System to Intermediate System
             Intra- Domain Routeing Exchange Protocol for use in
             Conjunction with the Protocol for Providing the
             Connectionless-mode Network Service (ISO 8473),
             International Standard 10589: 2002, Second Edition,
             2002. TLV 2.";

          container neighbors {
            description
              "This container describes IS neighbors.";

            list neighbor {
              key "system-id";
              description
                "IS reachability neighbor attributes.";

              leaf system-id {
                type leafref {
                  path "../state/system-id";
                }
                description
                  "Reference to the system ID of the neighbor.";
              }

              uses isis-lsdb-neighbor;
            }
          }
        }

        container ipv4-internal-reachability {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IPV4_INTERNAL_REACHABILITY'" {
            description
              "Include IPv4 internal reachability TLV when the TLV
              type is specified as 128.";
          }
          description
            "This container defines list of IPv4 internal reachability
            information.";

          reference
            "RFC1195: OSI ISIS for IP and Dual Environments. RFC5302:
            Domain-Wide Prefix Distribution with Two-Level IS-IS. TLV
            128";

          container prefixes {
            description
              "This container describes IS prefixes.";

            list prefix {
              key "prefix";

              description
                "IPv4 prefixes and internal reachability attributes.";

              leaf prefix {
                type leafref {
                  path "../state/prefix";
                }
                description
                  "Reference to the IPv4 prefix";
              }

              uses ipv4-prefix-attributes-state;
            }
          }
        }

        container ipv4-external-reachability {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IPV4_EXTERNAL_REACHABILITY'" {
            description
              "Include IPv4 external reachability when the TLV type
              is set to 130.";
          }
          description
           "This container defines list of IPv4 external reachability
            information.";

          reference
            "RFC1195: OSI ISIS for IP and Dual Environments.  RFC5302:
            Domain-Wide Prefix Distribution with Two-Level IS-IS. TLV
            130";

          container prefixes {
            description
              "This container describes IS neighbors.";

            list prefix {
              key "prefix";

              description
                "IPv4 external prefixes and reachability attributes.";

              leaf prefix {
                type leafref {
                  path "../state/prefix";
                }
                description
                  "Reference to the IPv4 prefix.";
              }

              uses ipv4-prefix-attributes-state;
            }
          }
        }

        container authentication {
          when "../state/type = 'oc-isis-lsdb-types:AUTHENTICATION'" {
            description
              "Only include the authentication TLV when the TLV is
              type 10.";
          }
          description
            "This container defines authentication information of the
            node.";

          reference
            "ISO 10589 Intermediate System to Intermediate System
            Intra- Domain Routeing Exchange Protocol for use in
            Conjunction with the Protocol for Providing the
            Connectionless-mode Network Service (ISO 8473)
            International Standard 10589: 2002, Second Edition, 2002.
            TLV 10.";

          container state {
            description
              "State parameters of TLV 10.";

            leaf crypto-type {
              type enumeration {
                enum HMAC_MD5 {
                  description
                    "HMAC-MD5 Authentication type.";
                }
                enum CLEARTEXT {
                  description
                    "Cleartext Authentication type.";
                }
               }
               description
                 "Authentication type to be used.";
            }

            leaf authentication-key {
              type string;
              description
                "Authentication key to be used.";
            }
          }
        }

        container extended-is-reachability {
          when "../state/type = " +
               "'oc-isis-lsdb-types:EXTENDED_IS_REACHABILITY'" {
            description
              "Only included the extended IS reachability TLV when the
              TLV is type 22.";
          }

          description
            "This container defines list of ISIS extended reachability
            neighbors.";

          reference
            "RFC5305: IS-IS Extensions for Traffic Engineering. TLV
            22.";

          uses isis-lsdb-common-extisreach-neighbors;
        }

        container extended-ipv4-reachability {
          when "../state/type = " +
               "'oc-isis-lsdb-types:EXTENDED_IPV4_REACHABILITY'" {
            description
              "Only include the extended IPv4 reachability container
              when the TLV type is 135.";
          }
          description
            "This container defines list of IPv4 extended reachability
            information.";

          reference
            "RFC5305: IS-IS Extensions for Traffic Engineering. TLV
            135";

          container prefixes {
            description
              "This container describes IS prefixes.";

            list prefix {
              key "prefix";

              description
                "This list describes IPv4 extended prefixes and
                attributes.";

              leaf prefix {
                type leafref {
                  path "../state/prefix";
                }
                description
                  "Reference to the IPv4 prefix that the TLV describes
                  the attributes of.";
              }

              uses ipv4-prefix-extended-state;
            }
          }
        }

        container ipv6-reachability {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IPV6_REACHABILITY'" {
            description
              "Only include the IPv6 reachability container when the
              TLV type is 236.";
          }
          description
            "This container defines list of IPv6 reachability
            information.";

          reference
            "RFC5308: Routing IPv6 with IS-IS. TLV 236";

          container prefixes {
            description
              "This container describes IS prefixes.";

            list prefix {
              key "prefix";

              description
                "This list defines IPv6 extended prefix attributes.";

              leaf prefix {
                type leafref {
                  path "../state/prefix";
                }
                description
                  "Reference to the IPv6 prefix that the TLV
                  corresponds to.";
              }

              uses ipv6-prefix-extended-state;
            }
          }
        }

        container multi-topology {
          when "../state/type = 'oc-isis-lsdb-types:MULTI_TOPOLOGY'" {
            description
              "Only include the multi-topology container when the TLV
              is type 229.";
          }

          description
            "This container defines the topology supported.";

          reference
            "RFC5120: M-ISIS: Multi Topology (MT) Routing in
            Intermediate System to Intermediate Systems (IS-ISs). TLV
            229";

          container topologies {
            description
              "This container describes IS topologies.";

            list topology {
              key "mt-id";

              description
                "This list describes a topology.";

              leaf mt-id {
                type leafref {
                  path "../state/mt-id";
                }
                description
                  "Reference to the multi-topology ID being described
                  by the list entry.";
              }

              container state {
                description
                  "State parameters of IS multi-topology TLV 229.";

                leaf mt-id {
                  type uint16 {
                    range "0 .. 4095";
                  }
                  description
                    "Multi-topology ID.";
                }

                leaf attributes {
                  type enumeration {
                    enum OVERLOAD {
                      description
                        "When set, node is overloaded, still part of
                        the topology but cannot be used for transit.";
                    }
                    enum ATTACHED {
                      description
                        "When set, node is attached to another area
                        using the referred metric and can be used as
                        default gateway.";
                    }
                  }
                  description
                    "Attributes of the LSP for the associated
                    topology.";
                }
              }
            }
          }
        }

        container isis-neighbor-attribute {
          when "../state/type = " +
               "'oc-isis-lsdb-types:IS_NEIGHBOR_ATTRIBUTE'" {
            description
              "Only include the neighbor attribute container when the
              TLV is type 23.";
          }
          description
            "This container defines list of ISIS topology neighbors
            for extended ISIS LSP (multiple system IDs). ";

          reference
            "RFC5311: Simplified Extension of Link State PDU (LSP)
            Space for IS-IS. TLV 23. It is identical in format  to the
            extended IS reachability TLV 22.";

          uses isis-lsdb-common-extisreach-neighbors;
        }

        container is-alias-id {
          when "../state/type = 'oc-isis-lsdb-types:ISIS_ALIAS_ID'" {
            description
              "Only include the ISIS alias ID container when the TLV
              is type 24.";
          }

          description
            "This container defines the IS-Alias TLV which allows
             extension-capable ISs to recognize the Originating System
             of an Extended LSP set. It identifies the Normal system-
             id of the Originating System.";

          reference
            "RFC5311: Simplified Extension of Link State PDU (LSP)
             Space for IS-IS TLV 24.";

          container state {
            config false;
            description
              "State parameters of alias ID.";

            leaf alias-id {
              type oc-isis-types:system-id;
              description
                "List of alias ID(s).";
            }
          }
        }

        container mt-isn {
          when "../state/type = 'oc-isis-lsdb-types:MT_ISN'" {
            description
              "Only include the MT ISN container when the TLV is type
              222.";
          }
          description
            "This container defines list of ISIS multi-topology
            neighbors.";

          reference
            "RFC5120: M-ISIS: Multi Topology (MT) Routing in
            Intermediate System to Intermediate Systems (IS-ISs). TLV
            222.";

          uses isis-lsdb-mtis-common;
        }

        container mt-isis-neighbor-attribute {
          when "../state/type = " +
               "'oc-isis-lsdb-types:MT_IS_NEIGHBOR_ATTRIBUTE'" {
            description
              "Only include the MT ISIS neighbor attribute container
              when the TLV is type 223.";
          }

          description
            "This container defines list of ISIS multi-topology
            neighbors.";

          reference
            "RFC5311: Simplified Extension of Link State PDU (LSP)
            Space for IS-IS. TLV 223. It is identical in format to the
            MT-ISN TLV 222.";

          uses isis-lsdb-mtis-common;
        }

        container mt-ipv4-reachability {
          when "../state/type = " +
               "'oc-isis-lsdb-types:MT_IPV4_REACHABILITY'" {
            description
              "Only include the multi-topology IPv4 reachability
              container when the TLV is type 235.";
          }
          description
            "This container defines list of IPv4 reachability
            Information in multi-topology environment.";

          reference
            "RFC5120: M-ISIS: Multi Topology (MT) Routing in
            Intermediate System to Intermediate Systems (IS-ISs). TLV
            235.";

          container prefixes {
            description
              "This container describes IS prefixes.";

            list prefix {
              key "mt-id prefix";

              leaf mt-id {
                type leafref {
                  path "../state/mt-id";
                }
                description
                  "Reference to the topology ID of the topology that
                  the prefix is within.";
              }

              leaf prefix {
                type leafref {
                  path "../state/prefix";
                }
                description
                  "Reference to the prefix to which reachability is
                  being advertised.";
              }

              description
                "IPv4 prefixes that are contained within MT
                reachability TLV.";

              uses ipv4-mt-prefix-extended-state;
            }
          }
        }

        container mt-ipv6-reachability {
          when "../state/type = " +
               "'oc-isis-lsdb-types:MT_IPV6_REACHABILITY'" {
            description
              "Only include the multi-topology IPv6 reachability
              container when the TLV is type 237.";
          }
          description
            "This container defines list of IPv6 reachability
            information in multi - topology environment.";

          reference
            "RFC5120: M-ISIS: Multi Topology (MT) Routing in
            Intermediate System to Intermediate Systems (IS-ISs). TLV
            237.";

          container prefixes {
            description
              "This container describes IS prefixes.";

            list prefix {
              key "prefix mt-id";
              description
                  "List of IPv6 prefixes contained within MT
                  reachability TLV.";

              leaf prefix {
                type leafref {
                  path "../state/prefix";
                }
                description
                  "Reference to the IPv6 prefix described by the
                  TLV.";
              }

              leaf mt-id {
                type leafref {
                  path "../state/mt-id";
                }
                description
                  "Reference to the multi-topology ID.";
              }

              uses ipv6-mt-prefix-extended-state;
            }
          }
        }
      }
    }

    uses isis-lsdb-undefined-tlv;
  }
}