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
|
<pre>Internet Engineering Task Force (IETF) A. Bierman
Request for Comments: 8525 YumaWorks
Obsoletes: <a href="./rfc7895">7895</a> M. Bjorklund
Category: Standards Track Tail-f Systems
ISSN: 2070-1721 J. Schoenwaelder
Jacobs University
K. Watsen
Watsen Networks
R. Wilton
Cisco Systems
March 2019
<span class="h1">YANG Library</span>
Abstract
This document describes a YANG library that provides information
about the YANG modules, datastores, and datastore schemas used by a
network management server. Simple caching mechanisms are provided to
allow clients to minimize retrieval of this information. This
version of the YANG library supports the Network Management Datastore
Architecture (NMDA) by listing all datastores supported by a network
management server and the schema that is used by each of these
datastores.
This document obsoletes <a href="./rfc7895">RFC 7895</a>.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in <a href="./rfc7841#section-2">Section 2 of RFC 7841</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="https://www.rfc-editor.org/info/rfc8525">https://www.rfc-editor.org/info/rfc8525</a>.
<span class="grey">Bierman, et al. Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="https://trustee.ietf.org/license-info">https://trustee.ietf.org/license-info</a>) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Table of Contents
<a href="#section-1">1</a>. Introduction ....................................................<a href="#page-3">3</a>
<a href="#section-1.1">1.1</a>. Terminology ................................................<a href="#page-4">4</a>
<a href="#section-2">2</a>. Objectives ......................................................<a href="#page-5">5</a>
<a href="#section-3">3</a>. YANG Library Data Model .........................................<a href="#page-6">6</a>
<a href="#section-4">4</a>. YANG Library YANG Module ........................................<a href="#page-8">8</a>
<a href="#section-5">5</a>. IANA Considerations ............................................<a href="#page-20">20</a>
<a href="#section-6">6</a>. Security Considerations ........................................<a href="#page-21">21</a>
<a href="#section-7">7</a>. References .....................................................<a href="#page-22">22</a>
<a href="#section-7.1">7.1</a>. Normative References ......................................<a href="#page-22">22</a>
<a href="#section-7.2">7.2</a>. Informative References ....................................<a href="#page-23">23</a>
<a href="#appendix-A">Appendix A</a>. Summary of Changes from <a href="./rfc7895">RFC 7895</a> .....................<a href="#page-25">25</a>
<a href="#appendix-B">Appendix B</a>. Example YANG Library Instance for a Basic Server .....<a href="#page-25">25</a>
<a href="#appendix-C">Appendix C</a>. Example YANG Library Instance for an Advanced Server .27
Authors' Addresses ................................................<a href="#page-32">32</a>
<span class="grey">Bierman, et al. Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
There is a need for a standard mechanism to expose which YANG modules
[<a href="./rfc7950" title=""The YANG 1.1 Data Modeling Language"">RFC7950</a>], datastores [<a href="./rfc8342" title=""Network Management Datastore Architecture (NMDA)"">RFC8342</a>], and datastore schemas [<a href="./rfc8342" title=""Network Management Datastore Architecture (NMDA)"">RFC8342</a>] are
in use by a network management server.
This document defines the YANG module "ietf-yang-library" that
provides this information. This version of the YANG library is
compatible with the Network Management Datastore Architecture (NMDA)
[<a href="./rfc8342" title=""Network Management Datastore Architecture (NMDA)"">RFC8342</a>]. The previous version of the YANG library, defined in
[<a href="./rfc7895" title=""YANG Module Library"">RFC7895</a>], is not compatible with the NMDA since it assumes that all
datastores have exactly the same schema. This is not necessarily
true in the NMDA since dynamic configuration datastores may have
their own datastore schema. Furthermore, the operational state
datastore may support non-configurable YANG modules in addition to
the YANG modules supported by conventional configuration datastores.
The old YANG library definitions have been retained (for backwards-
compatibility reasons), but the definitions have been marked as
deprecated. For backwards compatibility, an NMDA-supporting server
SHOULD populate the deprecated "/modules-state" tree in a backwards-
compatible manner. The new "/yang-library" tree will be ignored by
legacy clients but will provide all the data needed for NMDA-aware
clients (which will ignore the "/modules-state" tree). The
recommended approach to populate "/modules-state" is to report the
YANG modules with "config true" data nodes that are configurable via
conventional configuration datastores and the YANG modules with
"config false" data nodes that are returned via a Network
Configuration Protocol (NETCONF) <get> operation or equivalent.
The YANG library information can be different on every server, and it
can change at runtime or across a server reboot. If a server
implements multiple network management protocols to access the
server's datastores, then each such protocol may have its own
conceptual instantiation of the YANG library.
If a large number of YANG modules are utilized by a server, then the
YANG library contents can be relatively large. Since the YANG
library contents change very infrequently, it is important that
clients be able to cache the YANG library contents and easily
identify whether their cache is out of date.
<span class="grey">Bierman, et al. Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>. Terminology</span>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in
<a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a> [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>] [<a href="./rfc8174" title=""Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words"">RFC8174</a>] when, and only when, they appear in all
capitals, as shown here.
The following terms are defined in [<a href="./rfc7950" title=""The YANG 1.1 Data Modeling Language"">RFC7950</a>]:
o module
o submodule
o data node
This document uses the phrase "implement a module" as defined in
<a href="./rfc7950#section-5.6.5">Section 5.6.5 of [RFC7950]</a>.
The following terms are defined in [<a href="./rfc8342" title=""Network Management Datastore Architecture (NMDA)"">RFC8342</a>]:
o datastore
o datastore schema
o configuration
o conventional configuration datastore
o operational state
o operational state datastore
o dynamic configuration datastore
o client
o server
The following terms are used within this document:
o YANG library: A collection of YANG modules, submodules,
datastores, and datastore schemas used by a server.
o YANG library content identifier: A server-generated identifier of
the contents of the YANG library.
Tree diagrams in this document use the notation defined in [<a href="./rfc8340" title=""YANG Tree Diagrams"">RFC8340</a>].
<span class="grey">Bierman, et al. Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Objectives</span>
The following information is needed by a client application (for each
YANG module in the library) to fully utilize the YANG data modeling
language:
o name: The name of the YANG module.
o revision: If defined in the YANG module or submodule, the revision
is derived from the most recent revision statement within the
module or submodule.
o submodule list: The name and (if defined) revision of each
submodule used by the module must be identified.
o feature list: The name of each YANG feature supported by the
server must be identified.
o deviation list: The name of each YANG module with deviation
statements affecting a given YANG module must be identified.
In addition, the following information is needed by a client
application for each datastore supported by a server:
o identity: The YANG identity for the datastore.
o schema: The schema (i.e., the set of modules) implemented by the
datastore.
In order to select one out of several possible designs for the YANG
library data model, the following criteria were used:
1. The information must be efficient for a client to consume. Since
the size of the YANG library can be quite large, it should be
possible for clients to cache the YANG library information.
2. A dynamic configuration datastore must be able to implement a
module or feature that is not implemented in the conventional
configuration datastores.
3. It must be possible to not implement a module or feature in
<operational>, even if it is implemented in some other datastore.
This is required for transition purposes; a server that wants to
implement <operational> should not have to implement all modules
at once.
<span class="grey">Bierman, et al. Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
4. A given module can only be implemented in one revision in all
datastores. If a module is implemented in more than one
datastore, the same revision is implemented in all these
datastores.
5. Multiple revisions can be used for import, if import-by revision
is used.
6. It must be possible to use the YANG library by schema mount
[<a href="./rfc8528" title=""YANG Schema Mount"">RFC8528</a>].
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. YANG Library Data Model</span>
The "ietf-yang-library" YANG module provides information about the
modules, submodules, datastores, and datastore schemas supported by a
server. All data nodes in the "ietf-yang-library" module are "config
false" and thus only accessible in the operational state datastore.
+-----------+
| datastore |
+-----------+
|
| has a
V
+-----------+ +--------+ +------------+
| datastore | union of | module | consists of | modules + |
| schema |----------->| set |--------------->| submodules |
+-----------+ +--------+ +------------+
Figure 1
The conceptual model of the YANG library is depicted in Figure 1.
Following the NMDA, every datastore has an associated datastore
schema. A datastore schema is a union of module sets, and every
module set is a collection of modules and submodules, including the
modules and submodules used for imports. Note that multiple
datastores may refer to the same datastore schema. Furthermore, it
is possible for individual datastore schemas to share module sets. A
common use case is the operational state datastore schema, which is a
superset of the schema used by conventional configuration datastores.
Below is the YANG tree diagram for the "ietf-yang-library" module,
excluding the deprecated "/modules-state" tree:
<span class="grey">Bierman, et al. Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
module: ietf-yang-library
+--ro yang-library
+--ro module-set* [name]
| +--ro name string
| +--ro module* [name]
| | +--ro name yang:yang-identifier
| | +--ro revision? revision-identifier
| | +--ro namespace inet:uri
| | +--ro location* inet:uri
| | +--ro submodule* [name]
| | | +--ro name yang:yang-identifier
| | | +--ro revision? revision-identifier
| | | +--ro location* inet:uri
| | +--ro feature* yang:yang-identifier
| | +--ro deviation* -> ../../module/name
| +--ro import-only-module* [name revision]
| +--ro name yang:yang-identifier
| +--ro revision union
| +--ro namespace inet:uri
| +--ro location* inet:uri
| +--ro submodule* [name]
| +--ro name yang:yang-identifier
| +--ro revision? revision-identifier
| +--ro location* inet:uri
+--ro schema* [name]
| +--ro name string
| +--ro module-set* -> ../../module-set/name
+--ro datastore* [name]
| +--ro name ds:datastore-ref
| +--ro schema -> ../../schema/name
+--ro content-id string
notifications:
+---n yang-library-update
+--ro content-id -> /yang-library/content-id
The "/yang-library" container holds the entire YANG library. The
container has the following child nodes:
o The "/yang-library/module-set" contains entries representing
module sets. The list "/yang-library/module-set/module"
enumerates the modules that belong to the module set. A module is
listed together with its submodules (if any), a set of features,
and any deviation modules. The list "/yang-library/module-set/
import-only-module" lists all modules (and their submodules) used
only for imports. The assignment of a module to a module set is
<span class="grey">Bierman, et al. Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
at the server's discretion. This revision of the YANG library
attaches no semantics as to which module set a module is listed
in.
o The "/yang-library/schema" list contains an entry for each
datastore schema supported by the server. All conventional
configuration datastores use the same "schema" list entry. A
dynamic configuration datastore may use a different datastore
schema from the conventional configuration datastores and hence
may require a separate "schema" entry. A "schema" entry has a
leaf-list of references to entries in the "module-set" list. The
schema consists of the union of all modules in all referenced
module sets.
o The "/yang-library/datastore" list contains one entry for each
datastore supported by the server, and it identifies the datastore
schema associated with a datastore via a reference to an entry in
the "schema" list. Each supported conventional configuration
datastore has a separate entry, pointing to the same "schema" list
element.
o The "/yang-library/content-id" leaf contains the YANG library
content identifier, which is an implementation-specific identifier
representing the current information in the YANG library on a
specific server. The value of this leaf MUST change whenever the
information in the YANG library changes. There is no requirement
that the same information always result in the same "content-id"
value. This leaf allows a client to fetch all schema information
once, cache it, and only refetch it if the value of this leaf has
been changed. If the value of this leaf changes, the server also
generates a "yang-library-update" notification.
Note that for a NETCONF server implementing the NETCONF extensions to
support the NMDA [<a href="./rfc8526" title=""NETCONF Extensions to Support the Network Management Datastore Architecture"">RFC8526</a>], a change of the YANG library content
identifier results in a new value for the :yang-library:1.1
capability defined in [<a href="./rfc8526" title=""NETCONF Extensions to Support the Network Management Datastore Architecture"">RFC8526</a>]. Thus, if such a server implements
NETCONF notifications [<a href="./rfc5277" title=""NETCONF Event Notifications"">RFC5277</a>] and the "netconf-capability-change"
notification [<a href="./rfc6470" title=""Network Configuration Protocol (NETCONF) Base Notifications"">RFC6470</a>], a "netconf-capability-change" notification is
generated whenever the YANG library content identifier changes.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. YANG Library YANG Module</span>
The "ietf-yang-library" YANG module imports definitions from the
"ietf-yang-types" and "ietf-inet-types" modules defined in [<a href="./rfc6991" title=""Common YANG Data Types"">RFC6991</a>]
and from the "ietf-datastores" module defined in [<a href="./rfc8342" title=""Network Management Datastore Architecture (NMDA)"">RFC8342</a>]. While
the YANG module is defined using YANG version 1.1, the YANG library
supports YANG modules written in any version of YANG.
<span class="grey">Bierman, et al. Standards Track [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
<CODE BEGINS> file "ietf-yang-library@2019-01-04.yang"
module ietf-yang-library {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-library";
prefix yanglib;
import ietf-yang-types {
prefix yang;
reference
"<a href="./rfc6991">RFC 6991</a>: Common YANG Data Types";
}
import ietf-inet-types {
prefix inet;
reference
"<a href="./rfc6991">RFC 6991</a>: Common YANG Data Types";
}
import ietf-datastores {
prefix ds;
reference
"<a href="./rfc8342">RFC 8342</a>: Network Management Datastore Architecture
(NMDA)";
}
organization
"IETF NETCONF (Network Configuration) Working Group";
contact
"WG Web: <<a href="https://datatracker.ietf.org/wg/netconf/">https://datatracker.ietf.org/wg/netconf/</a>>
WG List: <mailto:netconf@ietf.org>
Author: Andy Bierman
<mailto:andy@yumaworks.com>
Author: Martin Bjorklund
<mailto:mbj@tail-f.com>
Author: Juergen Schoenwaelder
<mailto:j.schoenwaelder@jacobs-university.de>
Author: Kent Watsen
<mailto:kent+ietf@watsen.net>
Author: Robert Wilton
<mailto:rwilton@cisco.com>";
description
"This module provides information about the YANG modules,
datastores, and datastore schemas used by a network
management server.
<span class="grey">Bierman, et al. Standards Track [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
'MAY', and 'OPTIONAL' in this document are to be interpreted as
described in <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a> (<a href="./rfc2119">RFC 2119</a>) (<a href="./rfc8174">RFC 8174</a>) when, and only when,
they appear in all capitals, as shown here.
Copyright (c) 2019 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 <a href="#section-4">Section 4</a>.c of the IETF Trust's Legal Provisions
Relating to IETF Documents
(<a href="https://trustee.ietf.org/license-info">https://trustee.ietf.org/license-info</a>).
This version of this YANG module is part of <a href="./rfc8525">RFC 8525</a>; see
the RFC itself for full legal notices.";
revision 2019-01-04 {
description
"Added support for multiple datastores according to the
Network Management Datastore Architecture (NMDA).";
reference
"<a href="./rfc8525">RFC 8525</a>: YANG Library";
}
revision 2016-04-09 {
description
"Initial revision.";
reference
"<a href="./rfc7895">RFC 7895</a>: YANG Module Library";
}
/*
* Typedefs
*/
typedef revision-identifier {
type string {
pattern '\d{4}-\d{2}-\d{2}';
}
description
"Represents a specific date in YYYY-MM-DD format.";
}
/*
* Groupings
*/
<span class="grey">Bierman, et al. Standards Track [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
grouping module-identification-leafs {
description
"Parameters for identifying YANG modules and submodules.";
leaf name {
type yang:yang-identifier;
mandatory true;
description
"The YANG module or submodule name.";
}
leaf revision {
type revision-identifier;
description
"The YANG module or submodule revision date. If no revision
statement is present in the YANG module or submodule, this
leaf is not instantiated.";
}
}
grouping location-leaf-list {
description
"Common leaf-list parameter for the locations of modules and
submodules.";
leaf-list location {
type inet:uri;
description
"Contains a URL that represents the YANG schema
resource for this module or submodule.
This leaf will only be present if there is a URL
available for retrieval of the schema for this entry.";
}
}
grouping module-implementation-parameters {
description
"Parameters for describing the implementation of a module.";
leaf-list feature {
type yang:yang-identifier;
description
"List of all YANG feature names from this module that are
supported by the server, regardless whether they are defined
in the module or any included submodule.";
}
leaf-list deviation {
type leafref {
path "../../module/name";
}
<span class="grey">Bierman, et al. Standards Track [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
description
"List of all YANG deviation modules used by this server to
modify the conformance of the module associated with this
entry. Note that the same module can be used for deviations
for multiple modules, so the same entry MAY appear within
multiple 'module' entries.
This reference MUST NOT (directly or indirectly)
refer to the module being deviated.
Robust clients may want to make sure that they handle a
situation where a module deviates itself (directly or
indirectly) gracefully.";
}
}
grouping module-set-parameters {
description
"A set of parameters that describe a module set.";
leaf name {
type string;
description
"An arbitrary name of the module set.";
}
list module {
key "name";
description
"An entry in this list represents a module implemented by the
server, as per <a href="./rfc7950#section-5.6.5">Section 5.6.5 of RFC 7950</a>, with a particular
set of supported features and deviations.";
reference
"<a href="./rfc7950">RFC 7950</a>: The YANG 1.1 Data Modeling Language";
uses module-identification-leafs;
leaf namespace {
type inet:uri;
mandatory true;
description
"The XML namespace identifier for this module.";
}
uses location-leaf-list;
list submodule {
key "name";
description
"Each entry represents one submodule within the
parent module.";
uses module-identification-leafs;
uses location-leaf-list;
}
<span class="grey">Bierman, et al. Standards Track [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
uses module-implementation-parameters;
}
list import-only-module {
key "name revision";
description
"An entry in this list indicates that the server imports
reusable definitions from the specified revision of the
module but does not implement any protocol-accessible
objects from this revision.
Multiple entries for the same module name MAY exist. This
can occur if multiple modules import the same module but
specify different revision dates in the import statements.";
leaf name {
type yang:yang-identifier;
description
"The YANG module name.";
}
leaf revision {
type union {
type revision-identifier;
type string {
length "0";
}
}
description
"The YANG module revision date.
A zero-length string is used if no revision statement
is present in the YANG module.";
}
leaf namespace {
type inet:uri;
mandatory true;
description
"The XML namespace identifier for this module.";
}
uses location-leaf-list;
list submodule {
key "name";
description
"Each entry represents one submodule within the
parent module.";
uses module-identification-leafs;
uses location-leaf-list;
}
}
}
<span class="grey">Bierman, et al. Standards Track [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
grouping yang-library-parameters {
description
"The YANG library data structure is represented as a grouping
so it can be reused in configuration or another monitoring
data structure.";
list module-set {
key "name";
description
"A set of modules that may be used by one or more schemas.
A module set does not have to be referentially complete,
i.e., it may define modules that contain import statements
for other modules not included in the module set.";
uses module-set-parameters;
}
list schema {
key "name";
description
"A datastore schema that may be used by one or more
datastores.
The schema must be valid and referentially complete, i.e.,
it must contain modules to satisfy all used import
statements for all modules specified in the schema.";
leaf name {
type string;
description
"An arbitrary name of the schema.";
}
leaf-list module-set {
type leafref {
path "../../module-set/name";
}
description
"A set of module-sets that are included in this schema.
If a non-import-only module appears in multiple module
sets, then the module revision and the associated features
and deviations must be identical.";
}
}
list datastore {
key "name";
description
"A datastore supported by this server.
Each datastore indicates which schema it supports.
<span class="grey">Bierman, et al. Standards Track [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
The server MUST instantiate one entry in this list per
specific datastore it supports.
Each datastore entry with the same datastore schema SHOULD
reference the same schema.";
leaf name {
type ds:datastore-ref;
description
"The identity of the datastore.";
}
leaf schema {
type leafref {
path "../../schema/name";
}
mandatory true;
description
"A reference to the schema supported by this datastore.
All non-import-only modules of the schema are implemented
with their associated features and deviations.";
}
}
}
/*
* Top-level container
*/
container yang-library {
config false;
description
"Container holding the entire YANG library of this server.";
uses yang-library-parameters;
leaf content-id {
type string;
mandatory true;
description
"A server-generated identifier of the contents of the
'/yang-library' tree. The server MUST change the value of
this leaf if the information represented by the
'/yang-library' tree, except '/yang-library/content-id', has
changed.";
}
}
/*
* Notifications
*/
notification yang-library-update {
<span class="grey">Bierman, et al. Standards Track [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
description
"Generated when any YANG library information on the
server has changed.";
leaf content-id {
type leafref {
path "/yanglib:yang-library/yanglib:content-id";
}
mandatory true;
description
"Contains the YANG library content identifier for the updated
YANG library at the time the notification is generated.";
}
}
/*
* Legacy groupings
*/
grouping module-list {
status deprecated;
description
"The module data structure is represented as a grouping
so it can be reused in configuration or another monitoring
data structure.";
grouping common-leafs {
status deprecated;
description
"Common parameters for YANG modules and submodules.";
leaf name {
type yang:yang-identifier;
status deprecated;
description
"The YANG module or submodule name.";
}
leaf revision {
type union {
type revision-identifier;
type string {
length "0";
}
}
status deprecated;
description
"The YANG module or submodule revision date.
A zero-length string is used if no revision statement
is present in the YANG module or submodule.";
}
<span class="grey">Bierman, et al. Standards Track [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
}
grouping schema-leaf {
status deprecated;
description
"Common schema leaf parameter for modules and submodules.";
leaf schema {
type inet:uri;
description
"Contains a URL that represents the YANG schema
resource for this module or submodule.
This leaf will only be present if there is a URL
available for retrieval of the schema for this entry.";
}
}
list module {
key "name revision";
status deprecated;
description
"Each entry represents one revision of one module
currently supported by the server.";
uses common-leafs {
status deprecated;
}
uses schema-leaf {
status deprecated;
}
leaf namespace {
type inet:uri;
mandatory true;
status deprecated;
description
"The XML namespace identifier for this module.";
}
leaf-list feature {
type yang:yang-identifier;
status deprecated;
description
"List of YANG feature names from this module that are
supported by the server, regardless of whether they are
defined in the module or any included submodule.";
}
list deviation {
key "name revision";
status deprecated;
<span class="grey">Bierman, et al. Standards Track [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
description
"List of YANG deviation module names and revisions
used by this server to modify the conformance of
the module associated with this entry. Note that
the same module can be used for deviations for
multiple modules, so the same entry MAY appear
within multiple 'module' entries.
The deviation module MUST be present in the 'module'
list, with the same name and revision values.
The 'conformance-type' value will be 'implement' for
the deviation module.";
uses common-leafs {
status deprecated;
}
}
leaf conformance-type {
type enumeration {
enum implement {
description
"Indicates that the server implements one or more
protocol-accessible objects defined in the YANG module
identified in this entry. This includes deviation
statements defined in the module.
For YANG version 1.1 modules, there is at most one
'module' entry with conformance type 'implement' for a
particular module name, since YANG 1.1 requires that
at most one revision of a module is implemented.
For YANG version 1 modules, there SHOULD NOT be more
than one 'module' entry for a particular module
name.";
}
enum import {
description
"Indicates that the server imports reusable definitions
from the specified revision of the module but does
not implement any protocol-accessible objects from
this revision.
Multiple 'module' entries for the same module name MAY
exist. This can occur if multiple modules import the
same module but specify different revision dates in
the import statements.";
}
}
mandatory true;
<span class="grey">Bierman, et al. Standards Track [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
status deprecated;
description
"Indicates the type of conformance the server is claiming
for the YANG module identified by this entry.";
}
list submodule {
key "name revision";
status deprecated;
description
"Each entry represents one submodule within the
parent module.";
uses common-leafs {
status deprecated;
}
uses schema-leaf {
status deprecated;
}
}
}
}
/*
* Legacy operational state data nodes
*/
container modules-state {
config false;
status deprecated;
description
"Contains YANG module monitoring information.";
leaf module-set-id {
type string;
mandatory true;
status deprecated;
description
"Contains a server-specific identifier representing
the current set of modules and submodules. The
server MUST change the value of this leaf if the
information represented by the 'module' list instances
has changed.";
}
uses module-list {
status deprecated;
}
}
/*
* Legacy notifications
<span class="grey">Bierman, et al. Standards Track [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
*/
notification yang-library-change {
status deprecated;
description
"Generated when the set of modules and submodules supported
by the server has changed.";
leaf module-set-id {
type leafref {
path "/yanglib:modules-state/yanglib:module-set-id";
}
mandatory true;
status deprecated;
description
"Contains the module-set-id value representing the
set of modules and submodules supported at the server
at the time the notification is generated.";
}
}
}
<CODE ENDS>
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. IANA Considerations</span>
<a href="./rfc7895">RFC 7895</a> previously registered one URI in the "IETF XML Registry"
[<a href="./rfc3688" title=""The IETF XML Registry"">RFC3688</a>]. This document takes over this registration entry made by
<a href="./rfc7895">RFC 7895</a> and changes the Registrant Contact to the IESG according to
<a href="./rfc3688#section-4">Section 4 of [RFC3688]</a>.
URI: urn:ietf:params:xml:ns:yang:ietf-yang-library
Registrant Contact: The IESG.
XML: N/A, the requested URI is an XML namespace.
This document registers a YANG module in the "YANG Module Names"
registry [<a href="./rfc6020" title=""YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)"">RFC6020</a>]:
name: ietf-yang-library
namespace: urn:ietf:params:xml:ns:yang:ietf-yang-library
prefix: yanglib
reference: <a href="./rfc8525">RFC 8525</a>
<span class="grey">Bierman, et al. Standards Track [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Security Considerations</span>
The YANG module specified in this document defines a schema for data
that is designed to be accessed via network management protocols such
as NETCONF [<a href="./rfc6241" title=""Network Configuration Protocol (NETCONF)"">RFC6241</a>] or RESTCONF [<a href="./rfc8040" title=""RESTCONF Protocol"">RFC8040</a>]. The lowest NETCONF layer
is the secure transport layer, and the mandatory-to-implement secure
transport is Secure Shell (SSH) [<a href="./rfc6242" title=""Using the NETCONF Protocol over Secure Shell (SSH)"">RFC6242</a>]. The lowest RESTCONF layer
is HTTPS, and the mandatory-to-implement secure transport is TLS
[<a href="./rfc8446" title=""The Transport Layer Security (TLS) Protocol Version 1.3"">RFC8446</a>].
The Network Configuration Access Control Model (NACM) [<a href="./rfc8341" title=""Network Configuration Access Control Model"">RFC8341</a>]
provides the means to restrict access for particular NETCONF or
RESTCONF users to a preconfigured subset of all available NETCONF or
RESTCONF protocol operations and content.
Some of the readable data nodes in this YANG module may be considered
sensitive or vulnerable in some network environments. It is thus
important to control read access (e.g., via get, get-config, or
notification) to these data nodes. These are the subtrees and data
nodes and their sensitivity/vulnerability:
The "/yang-library" subtree of the YANG library may help an attacker
identify the server capabilities and server implementations with
known bugs since the set of YANG modules supported by a server may
reveal the kind of device and the manufacturer of the device.
Although some of this information may be available to all NETCONF
users via the NETCONF <hello> message (or similar messages in other
management protocols), this YANG module potentially exposes
additional details that could be of some assistance to an attacker.
Server vulnerabilities may be specific to particular modules, module
revisions, module features, or even module deviations. For example,
if a particular operation on a particular data node is known to cause
a server to crash or significantly degrade device performance, then
the "module" list information will help an attacker identify server
implementations with such a defect, in order to launch a denial-of-
service attack on the device.
<span class="grey">Bierman, et al. Standards Track [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. References</span>
<span class="h3"><a class="selflink" id="section-7.1" href="#section-7.1">7.1</a>. Normative References</span>
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>,
DOI 10.17487/RFC2119, March 1997,
<<a href="https://www.rfc-editor.org/info/rfc2119">https://www.rfc-editor.org/info/rfc2119</a>>.
[<a id="ref-RFC3688">RFC3688</a>] Mealling, M., "The IETF XML Registry", <a href="https://www.rfc-editor.org/bcp/bcp81">BCP 81</a>, <a href="./rfc3688">RFC 3688</a>,
DOI 10.17487/RFC3688, January 2004,
<<a href="https://www.rfc-editor.org/info/rfc3688">https://www.rfc-editor.org/info/rfc3688</a>>.
[<a id="ref-RFC6020">RFC6020</a>] Bjorklund, M., Ed., "YANG - A Data Modeling Language for
the Network Configuration Protocol (NETCONF)", <a href="./rfc6020">RFC 6020</a>,
DOI 10.17487/RFC6020, October 2010,
<<a href="https://www.rfc-editor.org/info/rfc6020">https://www.rfc-editor.org/info/rfc6020</a>>.
[<a id="ref-RFC6241">RFC6241</a>] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed.,
and A. Bierman, Ed., "Network Configuration Protocol
(NETCONF)", <a href="./rfc6241">RFC 6241</a>, DOI 10.17487/RFC6241, June 2011,
<<a href="https://www.rfc-editor.org/info/rfc6241">https://www.rfc-editor.org/info/rfc6241</a>>.
[<a id="ref-RFC6242">RFC6242</a>] Wasserman, M., "Using the NETCONF Protocol over Secure
Shell (SSH)", <a href="./rfc6242">RFC 6242</a>, DOI 10.17487/RFC6242, June 2011,
<<a href="https://www.rfc-editor.org/info/rfc6242">https://www.rfc-editor.org/info/rfc6242</a>>.
[<a id="ref-RFC6991">RFC6991</a>] Schoenwaelder, J., Ed., "Common YANG Data Types",
<a href="./rfc6991">RFC 6991</a>, DOI 10.17487/RFC6991, July 2013,
<<a href="https://www.rfc-editor.org/info/rfc6991">https://www.rfc-editor.org/info/rfc6991</a>>.
[<a id="ref-RFC7950">RFC7950</a>] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language",
<a href="./rfc7950">RFC 7950</a>, DOI 10.17487/RFC7950, August 2016,
<<a href="https://www.rfc-editor.org/info/rfc7950">https://www.rfc-editor.org/info/rfc7950</a>>.
[<a id="ref-RFC8040">RFC8040</a>] Bierman, A., Bjorklund, M., and K. Watsen, "RESTCONF
Protocol", <a href="./rfc8040">RFC 8040</a>, DOI 10.17487/RFC8040, January 2017,
<<a href="https://www.rfc-editor.org/info/rfc8040">https://www.rfc-editor.org/info/rfc8040</a>>.
[<a id="ref-RFC8174">RFC8174</a>] Leiba, B., "Ambiguity of Uppercase vs Lowercase in <a href="./rfc2119">RFC</a>
<a href="./rfc2119">2119</a> Key Words", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc8174">RFC 8174</a>, DOI 10.17487/RFC8174,
May 2017, <<a href="https://www.rfc-editor.org/info/rfc8174">https://www.rfc-editor.org/info/rfc8174</a>>.
[<a id="ref-RFC8341">RFC8341</a>] Bierman, A. and M. Bjorklund, "Network Configuration
Access Control Model", STD 91, <a href="./rfc8341">RFC 8341</a>,
DOI 10.17487/RFC8341, March 2018,
<<a href="https://www.rfc-editor.org/info/rfc8341">https://www.rfc-editor.org/info/rfc8341</a>>.
<span class="grey">Bierman, et al. Standards Track [Page 22]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
[<a id="ref-RFC8342">RFC8342</a>] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
and R. Wilton, "Network Management Datastore Architecture
(NMDA)", <a href="./rfc8342">RFC 8342</a>, DOI 10.17487/RFC8342, March 2018,
<<a href="https://www.rfc-editor.org/info/rfc8342">https://www.rfc-editor.org/info/rfc8342</a>>.
[<a id="ref-RFC8446">RFC8446</a>] Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", <a href="./rfc8446">RFC 8446</a>, DOI 10.17487/RFC8446, August 2018,
<<a href="https://www.rfc-editor.org/info/rfc8446">https://www.rfc-editor.org/info/rfc8446</a>>.
<span class="h3"><a class="selflink" id="section-7.2" href="#section-7.2">7.2</a>. Informative References</span>
[<a id="ref-RFC5277">RFC5277</a>] Chisholm, S. and H. Trevino, "NETCONF Event
Notifications", <a href="./rfc5277">RFC 5277</a>, DOI 10.17487/RFC5277, July 2008,
<<a href="https://www.rfc-editor.org/info/rfc5277">https://www.rfc-editor.org/info/rfc5277</a>>.
[<a id="ref-RFC6470">RFC6470</a>] Bierman, A., "Network Configuration Protocol (NETCONF)
Base Notifications", <a href="./rfc6470">RFC 6470</a>, DOI 10.17487/RFC6470,
February 2012, <<a href="https://www.rfc-editor.org/info/rfc6470">https://www.rfc-editor.org/info/rfc6470</a>>.
[<a id="ref-RFC7895">RFC7895</a>] Bierman, A., Bjorklund, M., and K. Watsen, "YANG Module
Library", <a href="./rfc7895">RFC 7895</a>, DOI 10.17487/RFC7895, June 2016,
<<a href="https://www.rfc-editor.org/info/rfc7895">https://www.rfc-editor.org/info/rfc7895</a>>.
[<a id="ref-RFC8340">RFC8340</a>] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams",
<a href="https://www.rfc-editor.org/bcp/bcp215">BCP 215</a>, <a href="./rfc8340">RFC 8340</a>, DOI 10.17487/RFC8340, March 2018,
<<a href="https://www.rfc-editor.org/info/rfc8340">https://www.rfc-editor.org/info/rfc8340</a>>.
[<a id="ref-RFC8343">RFC8343</a>] Bjorklund, M., "A YANG Data Model for Interface
Management", <a href="./rfc8343">RFC 8343</a>, DOI 10.17487/RFC8343, March 2018,
<<a href="https://www.rfc-editor.org/info/rfc8343">https://www.rfc-editor.org/info/rfc8343</a>>.
[<a id="ref-RFC8344">RFC8344</a>] Bjorklund, M., "A YANG Data Model for IP Management",
<a href="./rfc8344">RFC 8344</a>, DOI 10.17487/RFC8344, March 2018,
<<a href="https://www.rfc-editor.org/info/rfc8344">https://www.rfc-editor.org/info/rfc8344</a>>.
[<a id="ref-RFC8345">RFC8345</a>] Clemm, A., Medved, J., Varga, R., Bahadur, N.,
Ananthakrishnan, H., and X. Liu, "A YANG Data Model for
Network Topologies", <a href="./rfc8345">RFC 8345</a>, DOI 10.17487/RFC8345, March
2018, <<a href="https://www.rfc-editor.org/info/rfc8345">https://www.rfc-editor.org/info/rfc8345</a>>.
[<a id="ref-RFC8348">RFC8348</a>] Bierman, A., Bjorklund, M., Dong, J., and D. Romascanu, "A
YANG Data Model for Hardware Management", <a href="./rfc8348">RFC 8348</a>,
DOI 10.17487/RFC8348, March 2018,
<<a href="https://www.rfc-editor.org/info/rfc8348">https://www.rfc-editor.org/info/rfc8348</a>>.
<span class="grey">Bierman, et al. Standards Track [Page 23]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
[<a id="ref-RFC8349">RFC8349</a>] Lhotka, L., Lindem, A., and Y. Qu, "A YANG Data Model for
Routing Management (NMDA Version)", <a href="./rfc8349">RFC 8349</a>,
DOI 10.17487/RFC8349, March 2018,
<<a href="https://www.rfc-editor.org/info/rfc8349">https://www.rfc-editor.org/info/rfc8349</a>>.
[<a id="ref-RFC8526">RFC8526</a>] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K.,
and R. Wilton, "NETCONF Extensions to Support the Network
Management Datastore Architecture", <a href="./rfc8526">RFC 8526</a>,
DOI 10.17487/RFC8526, March 2019,
<<a href="https://www.rfc-editor.org/info/rfc8526">https://www.rfc-editor.org/info/rfc8526</a>>.
[<a id="ref-RFC8528">RFC8528</a>] Bjorklund, M. and L. Lhotka, "YANG Schema Mount",
<a href="./rfc8528">RFC 8528</a>, DOI 10.17487/RFC8528, March 2019,
<<a href="https://www.rfc-editor.org/info/rfc8528">https://www.rfc-editor.org/info/rfc8528</a>>.
<span class="grey">Bierman, et al. Standards Track [Page 24]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. Summary of Changes from <a href="./rfc7895">RFC 7895</a></span>
This document changes [<a href="./rfc7895" title=""YANG Module Library"">RFC7895</a>] in the following ways:
o Renamed document title from "YANG Module Library" to "YANG
Library".
o Added a new top-level "/yang-library" container to hold the entire
YANG library providing information about module sets, schemas, and
datastores.
o Refactored the "/modules-state" container into a new
"/yang-library/module-set" list.
o Added a new "/yang-library/schema" list and a new "/yang-library/
datastore" list.
o Added a set of new groupings as replacements for the deprecated
groupings.
o Added a "yang-library-update" notification as a replacement for
the deprecated "yang-library-change" notification.
o Deprecated the "/modules-state" tree.
o Deprecated the "/module-list" grouping.
o Deprecated the "/yang-library-change" notification.
<span class="h2"><a class="selflink" id="appendix-B" href="#appendix-B">Appendix B</a>. Example YANG Library Instance for a Basic Server</span>
The following example shows the YANG library of a basic server
implementing the "ietf-interfaces" [<a href="./rfc8343" title=""A YANG Data Model for Interface Management"">RFC8343</a>] and "ietf-ip" [<a href="./rfc8344" title=""A YANG Data Model for IP Management"">RFC8344</a>]
modules in the <running>, <startup>, and <operational> datastores and
the "ietf-hardware" [<a href="./rfc8348" title=""A YANG Data Model for Hardware Management"">RFC8348</a>] module in the <operational> datastore.
Newline characters in leaf values are added for formatting reasons.
<yang-library
xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"
xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores">
<module-set>
<name>config-modules</name>
<module>
<name>ietf-interfaces</name>
<revision>2018-02-20</revision>
<namespace>
<span class="grey">Bierman, et al. Standards Track [Page 25]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
urn:ietf:params:xml:ns:yang:ietf-interfaces
</namespace>
</module>
<module>
<name>ietf-ip</name>
<revision>2018-02-22</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-ip
</namespace>
</module>
<import-only-module>
<name>ietf-yang-types</name>
<revision>2013-07-15</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-yang-types
</namespace>
</import-only-module>
<import-only-module>
<name>ietf-inet-types</name>
<revision>2013-07-15</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-inet-types
</namespace>
</import-only-module>
</module-set>
<module-set>
<name>state-modules</name>
<module>
<name>ietf-hardware</name>
<revision>2018-03-13</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-hardware
</namespace>
</module>
<import-only-module>
<name>ietf-inet-types</name>
<revision>2013-07-15</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-inet-types
</namespace>
</import-only-module>
<import-only-module>
<name>ietf-yang-types</name>
<revision>2013-07-15</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-yang-types
</namespace>
<span class="grey">Bierman, et al. Standards Track [Page 26]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
</import-only-module>
<import-only-module>
<name>iana-hardware</name>
<revision>2018-03-13</revision>
<namespace>
urn:ietf:params:xml:ns:yang:iana-hardware
</namespace>
</import-only-module>
</module-set>
<schema>
<name>config-schema</name>
<module-set>config-modules</module-set>
</schema>
<schema>
<name>state-schema</name>
<module-set>config-modules</module-set>
<module-set>state-modules</module-set>
</schema>
<datastore>
<name>ds:startup</name>
<schema>config-schema</schema>
</datastore>
<datastore>
<name>ds:running</name>
<schema>config-schema</schema>
</datastore>
<datastore>
<name>ds:operational</name>
<schema>state-schema</schema>
</datastore>
<content-id>75a43df9bd56b92aacc156a2958fbe12312fb285</content-id>
</yang-library>
<span class="h2"><a class="selflink" id="appendix-C" href="#appendix-C">Appendix C</a>. Example YANG Library Instance for an Advanced Server</span>
The following example extends the example in <a href="#appendix-B">Appendix B</a> by using
modules from [<a href="./rfc8345" title=""A YANG Data Model for Network Topologies"">RFC8345</a>] and [<a href="./rfc8349" title=""A YANG Data Model for Routing Management (NMDA Version)"">RFC8349</a>] to illustrate a slightly more
advanced server that:
o Has a module with features only enabled in <operational>; the
"ietf-routing" module is supported in <running>, <startup>, and
<operational>, but the "multiple-ribs" and "router-id" features
are only enabled in <operational>. Hence, the "router-id" leaf
may be read but not configured.
<span class="grey">Bierman, et al. Standards Track [Page 27]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
o Supports a dynamic configuration datastore "example-ds-ephemeral",
with only the "ietf-network" and "ietf-network-topology" modules
configurable via a notional dynamic configuration protocol.
o Shows an example of datastore-specific deviations. The
"example-vendor-hardware-deviations" module is included in the
schema for <operational> to remove data nodes that cannot be
supported by the server.
o Shows how module-sets can be used to organize related modules
together.
Newline characters in leaf values are added for formatting reasons.
<yang-library
xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library"
xmlns:ds="urn:ietf:params:xml:ns:yang:ietf-datastores"
xmlns:ex-ds-eph="urn:example:ds-ephemeral">
<module-set>
<name>config-state-modules</name>
<module>
<name>ietf-interfaces</name>
<revision>2018-02-20</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-interfaces
</namespace>
</module>
<module>
<name>ietf-ip</name>
<revision>2018-02-22</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-ip
</namespace>
</module>
<module>
<name>ietf-routing</name>
<revision>2018-03-13</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-routing
</namespace>
</module>
<import-only-module>
<name>ietf-yang-types</name>
<revision>2013-07-15</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-yang-types
</namespace>
<span class="grey">Bierman, et al. Standards Track [Page 28]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
</import-only-module>
<import-only-module>
<name>ietf-inet-types</name>
<revision>2013-07-15</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-inet-types
</namespace>
</import-only-module>
</module-set>
<module-set>
<name>config-only-modules</name>
<module>
<name>ietf-routing</name>
<revision>2018-03-13</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-routing
</namespace>
</module>
</module-set>
<module-set>
<name>dynamic-config-state-modules</name>
<module>
<name>ietf-network</name>
<revision>2018-02-26</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-network
</namespace>
</module>
<module>
<name>ietf-network-topology</name>
<revision>2018-02-26</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-network-topology
</namespace>
</module>
<import-only-module>
<name>ietf-inet-types</name>
<revision>2013-07-15</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-inet-types
</namespace>
</import-only-module>
</module-set>
<module-set>
<name>state-only-modules</name>
<span class="grey">Bierman, et al. Standards Track [Page 29]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
<module>
<name>ietf-hardware</name>
<revision>2018-03-13</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-hardware
</namespace>
<deviation>example-vendor-hardware-deviations</deviation>
</module>
<module>
<name>ietf-routing</name>
<revision>2018-03-13</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-routing
</namespace>
<feature>multiple-ribs</feature>
<feature>router-id</feature>
</module>
<module>
<name>example-vendor-hardware-deviations</name>
<revision>2018-01-31</revision>
<namespace>
urn:example:example-vendor-hardware-deviations
</namespace>
</module>
<import-only-module>
<name>ietf-inet-types</name>
<revision>2013-07-15</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-inet-types
</namespace>
</import-only-module>
<import-only-module>
<name>ietf-yang-types</name>
<revision>2013-07-15</revision>
<namespace>
urn:ietf:params:xml:ns:yang:ietf-yang-types
</namespace>
</import-only-module>
<import-only-module>
<name>iana-hardware</name>
<revision>2018-03-13</revision>
<namespace>
urn:ietf:params:xml:ns:yang:iana-hardware
</namespace>
</import-only-module>
</module-set>
<schema>
<span class="grey">Bierman, et al. Standards Track [Page 30]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
<name>config-schema</name>
<module-set>config-state-modules</module-set>
<module-set>config-only-modules</module-set>
</schema>
<schema>
<name>dynamic-config-schema</name>
<module-set>dynamic-config-state-modules</module-set>
</schema>
<schema>
<name>state-schema</name>
<module-set>config-state-modules</module-set>
<module-set>dynamic-config-state-modules</module-set>
<module-set>state-only-modules</module-set>
</schema>
<datastore>
<name>ds:startup</name>
<schema>config-schema</schema>
</datastore>
<datastore>
<name>ds:running</name>
<schema>config-schema</schema>
</datastore>
<datastore>
<name>ex-ds-eph:ds-ephemeral</name>
<schema>dynamic-config-schema</schema>
</datastore>
<datastore>
<name>ds:operational</name>
<schema>state-schema</schema>
</datastore>
<content-id>14782ab9bd56b92aacc156a2958fbe12312fb285</content-id>
</yang-library>
<span class="grey">Bierman, et al. Standards Track [Page 31]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span>
<span class="grey"><a href="./rfc8525">RFC 8525</a> YANG Library March 2019</span>
Authors' Addresses
Andy Bierman
YumaWorks
Email: andy@yumaworks.com
Martin Bjorklund
Tail-f Systems
Email: mbj@tail-f.com
Juergen Schoenwaelder
Jacobs University
Email: j.schoenwaelder@jacobs-university.de
Kent Watsen
Watsen Networks
Email: kent+ietf@watsen.net
Robert Wilton
Cisco Systems
Email: rwilton@cisco.com
Bierman, et al. Standards Track [Page 32]
</pre>
|