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
|
<pre>Internet Engineering Task Force (IETF) M. Bjorklund
Request for Comments: 8342 Tail-f Systems
Updates: <a href="./rfc7950">7950</a> J. Schoenwaelder
Category: Standards Track Jacobs University
ISSN: 2070-1721 P. Shafer
K. Watsen
Juniper Networks
R. Wilton
Cisco Systems
March 2018
<span class="h1">Network Management Datastore Architecture (NMDA)</span>
Abstract
Datastores are a fundamental concept binding the data models written
in the YANG data modeling language to network management protocols
such as the Network Configuration Protocol (NETCONF) and RESTCONF.
This document defines an architectural framework for datastores based
on the experience gained with the initial simpler model, addressing
requirements that were not well supported in the initial model. This
document updates <a href="./rfc7950">RFC 7950</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/rfc8342">https://www.rfc-editor.org/info/rfc8342</a>.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
Copyright Notice
Copyright (c) 2018 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-2">2</a>. Objectives ......................................................<a href="#page-4">4</a>
<a href="#section-3">3</a>. Terminology .....................................................<a href="#page-5">5</a>
<a href="#section-4">4</a>. Background ......................................................<a href="#page-8">8</a>
<a href="#section-4.1">4.1</a>. Original Model of Datastores ...............................<a href="#page-9">9</a>
<a href="#section-5">5</a>. Architectural Model of Datastores ..............................<a href="#page-11">11</a>
<a href="#section-5.1">5.1</a>. Conventional Configuration Datastores .....................<a href="#page-12">12</a>
<a href="#section-5.1.1">5.1.1</a>. The Startup Configuration Datastore (<startup>) ....<a href="#page-12">12</a>
5.1.2. The Candidate Configuration Datastore
(<candidate>) ......................................<a href="#page-13">13</a>
<a href="#section-5.1.3">5.1.3</a>. The Running Configuration Datastore (<running>) ....<a href="#page-13">13</a>
<a href="#section-5.1.4">5.1.4</a>. The Intended Configuration Datastore (<intended>) ..13
<a href="#section-5.2">5.2</a>. Dynamic Configuration Datastores ..........................<a href="#page-14">14</a>
<a href="#section-5.3">5.3</a>. The Operational State Datastore (<operational>) ...........<a href="#page-14">14</a>
<a href="#section-5.3.1">5.3.1</a>. Remnant Configuration ..............................<a href="#page-16">16</a>
<a href="#section-5.3.2">5.3.2</a>. Missing Resources ..................................<a href="#page-16">16</a>
<a href="#section-5.3.3">5.3.3</a>. System-Controlled Resources ........................<a href="#page-16">16</a>
<a href="#section-5.3.4">5.3.4</a>. Origin Metadata Annotation .........................<a href="#page-17">17</a>
<a href="#section-6">6</a>. Implications on YANG ...........................................<a href="#page-18">18</a>
<a href="#section-6.1">6.1</a>. XPath Context .............................................<a href="#page-18">18</a>
<a href="#section-6.2">6.2</a>. Invocation of Actions and RPCs ............................<a href="#page-19">19</a>
<a href="#section-7">7</a>. YANG Modules ...................................................<a href="#page-20">20</a>
<a href="#section-8">8</a>. IANA Considerations ............................................<a href="#page-26">26</a>
<a href="#section-8.1">8.1</a>. Updates to the IETF XML Registry ..........................<a href="#page-26">26</a>
<a href="#section-8.2">8.2</a>. Updates to the YANG Module Names Registry .................<a href="#page-27">27</a>
<a href="#section-9">9</a>. Security Considerations ........................................<a href="#page-27">27</a>
<a href="#section-10">10</a>. References ....................................................<a href="#page-28">28</a>
<a href="#section-10.1">10.1</a>. Normative References .....................................<a href="#page-28">28</a>
<a href="#section-10.2">10.2</a>. Informative References ...................................<a href="#page-29">29</a>
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<a href="#appendix-A">Appendix A</a>. Guidelines for Defining Datastores ....................<a href="#page-31">31</a>
<a href="#appendix-A.1">A.1</a>. Define Which YANG Modules Can Be Used in the Datastore .....<a href="#page-31">31</a>
<a href="#appendix-A.2">A.2</a>. Define Which Subset of YANG-Modeled Data Applies ...........<a href="#page-31">31</a>
<a href="#appendix-A.3">A.3</a>. Define How Data Is Actualized ..............................<a href="#page-31">31</a>
<a href="#appendix-A.4">A.4</a>. Define Which Protocols Can Be Used .........................<a href="#page-31">31</a>
<a href="#appendix-A.5">A.5</a>. Define YANG Identities for the Datastore ...................<a href="#page-32">32</a>
<a href="#appendix-B">Appendix B</a>. Example of an Ephemeral Dynamic Configuration
Datastore .............................................<a href="#page-32">32</a>
<a href="#appendix-C">Appendix C</a>. Example Data ..........................................<a href="#page-33">33</a>
<a href="#appendix-C.1">C.1</a>. System Example .............................................<a href="#page-34">34</a>
<a href="#appendix-C.2">C.2</a>. BGP Example ................................................<a href="#page-37">37</a>
<a href="#appendix-C.2.1">C.2.1</a>. Datastores .............................................<a href="#page-38">38</a>
<a href="#appendix-C.2.2">C.2.2</a>. Adding a Peer ..........................................<a href="#page-38">38</a>
<a href="#appendix-C.2.3">C.2.3</a>. Removing a Peer ........................................<a href="#page-39">39</a>
<a href="#appendix-C.3">C.3</a>. Interface Example ..........................................<a href="#page-40">40</a>
<a href="#appendix-C.3.1">C.3.1</a>. Pre-provisioned Interfaces .............................<a href="#page-41">41</a>
<a href="#appendix-C.3.2">C.3.2</a>. System-Provided Interface ..............................<a href="#page-42">42</a>
Acknowledgments ...................................................<a href="#page-43">43</a>
Authors' Addresses ................................................<a href="#page-44">44</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
This document provides an architectural framework for datastores as
they are used by network management protocols such as the Network
Configuration Protocol (NETCONF) [<a href="./rfc6241" title=""Network Configuration Protocol (NETCONF)"">RFC6241</a>], RESTCONF [<a href="./rfc8040" title=""RESTCONF Protocol"">RFC8040</a>], and
the YANG data modeling language [<a href="./rfc7950" title=""The YANG 1.1 Data Modeling Language"">RFC7950</a>]. Datastores are a
fundamental concept binding network management data models to network
management protocols. Agreement on a common architectural model of
datastores ensures that data models can be written in a way that is
network management protocol agnostic. This architectural framework
identifies a set of conceptual datastores, but it does not mandate
that all network management protocols expose all these conceptual
datastores. This architecture is agnostic with regard to the
encoding used by network management protocols.
This document updates <a href="./rfc7950">RFC 7950</a> by refining the definition of the
accessible tree for some XML Path Language (XPath) context (see
<a href="#section-6.1">Section 6.1</a>) and the invocation context of operations (see
<a href="#section-6.2">Section 6.2</a>).
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.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Objectives</span>
Network management data objects can often take two different values:
the value configured by the user or an application (configuration)
and the value that the device is actually using (operational state).
These two values may be different for a number of reasons, e.g.,
system internal interactions with hardware, interaction with
protocols or other devices, or simply the time it takes to propagate
a configuration change to the software and hardware components of a
system. Furthermore, configuration and operational state data
objects may have different lifetimes.
The original model of datastores required these data objects to be
modeled twice in the YANG schema -- as "config true" objects and as
"config false" objects. The convention adopted by the interfaces
data model [<a href="./rfc8343" title=""A YANG Data Model for Interface Management"">RFC8343</a>] and the IP data model [<a href="./rfc8344" title=""A YANG Data Model for IP Management"">RFC8344</a>] was to use two
separate branches rooted at the root of the data tree: one branch for
configuration data objects and one branch for operational state data
objects.
The duplication of definitions and the ad hoc separation of
operational state data from configuration data lead to a number of
problems. Having configuration and operational state data in
separate branches in the data model is operationally complicated and
impacts the readability of module definitions. Furthermore, the
relationship between the branches is not machine readable, and filter
expressions operating on configuration and on related operational
state are different.
With the revised architectural model of datastores defined in this
document, the data objects are defined only once in the YANG schema
but independent instantiations can appear in different datastores,
e.g., one for a configured value and another for an operationally
used value. This provides a more elegant and simpler solution to the
problem.
The revised architectural model of datastores supports additional
datastores for systems that support more advanced processing chains
converting configuration to operational state. For example, some
systems support configuration that is not currently used (so-called
"inactive configuration") or they support configuration templates
that are used to expand configuration data via a common template.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Terminology</span>
This document defines the following terminology. Some of the terms
are revised definitions of terms originally defined in [<a href="./rfc6241" title=""Network Configuration Protocol (NETCONF)"">RFC6241</a>] and
[<a href="./rfc7950" title=""The YANG 1.1 Data Modeling Language"">RFC7950</a>] (see also <a href="#section-4">Section 4</a>). The revised definitions are
semantically equivalent to the definitions found in [<a href="./rfc6241" title=""Network Configuration Protocol (NETCONF)"">RFC6241</a>] and
[<a href="./rfc7950" title=""The YANG 1.1 Data Modeling Language"">RFC7950</a>]. It is expected that the revised definitions provided in
this section will replace the definitions in [<a href="./rfc6241" title=""Network Configuration Protocol (NETCONF)"">RFC6241</a>] and [<a href="./rfc7950" title=""The YANG 1.1 Data Modeling Language"">RFC7950</a>]
when these documents are revised.
o datastore: A conceptual place to store and access information. A
datastore might be implemented, for example, using files, a
database, flash memory locations, or combinations thereof. A
datastore maps to an instantiated YANG data tree.
o schema node: A node in the schema tree. The formal definition is
provided in <a href="./rfc7950">RFC 7950</a>.
o datastore schema: The combined set of schema nodes for all modules
supported by a particular datastore, taking into consideration any
deviations and enabled features for that datastore.
o configuration: Data that is required to get a device from its
initial default state into a desired operational state. This data
is modeled in YANG using "config true" nodes. Configuration can
originate from different sources.
o configuration datastore: A datastore holding configuration.
o running configuration datastore: A configuration datastore holding
the current configuration of the device. It may include
configuration that requires further transformations before it can
be applied. This datastore is referred to as "<running>".
o candidate configuration datastore: A configuration datastore that
can be manipulated without impacting the device's running
configuration datastore and that can be committed to the running
configuration datastore. This datastore is referred to as
"<candidate>".
o startup configuration datastore: A configuration datastore holding
the configuration loaded by the device into the running
configuration datastore when it boots. This datastore is referred
to as "<startup>".
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
o intended configuration: Configuration that is intended to be used
by the device. It represents the configuration after all
configuration transformations to <running> have been performed and
is the configuration that the system attempts to apply.
o intended configuration datastore: A configuration datastore
holding the complete intended configuration of the device. This
datastore is referred to as "<intended>".
o configuration transformation: The addition, modification, or
removal of configuration between the <running> and <intended>
datastores. Examples of configuration transformations include the
removal of inactive configuration and the configuration produced
through the expansion of templates.
o conventional configuration datastore: One of the following set of
configuration datastores: <running>, <startup>, <candidate>, and
<intended>. These datastores share a common datastore schema, and
protocol operations allow copying data between these datastores.
The term "conventional" is chosen as a generic umbrella term for
these datastores.
o conventional configuration: Configuration that is stored in any of
the conventional configuration datastores.
o dynamic configuration datastore: A configuration datastore holding
configuration obtained dynamically during the operation of a
device through interaction with other systems, rather than through
one of the conventional configuration datastores.
o dynamic configuration: Configuration obtained via a dynamic
configuration datastore.
o learned configuration: Configuration that has been learned via
protocol interactions with other systems and that is neither
conventional nor dynamic configuration.
o system configuration: Configuration that is supplied by the device
itself.
o default configuration: Configuration that is not explicitly
provided but for which a value defined in the data model is used.
o applied configuration: Configuration that is actively in use by a
device. Applied configuration originates from conventional,
dynamic, learned, system, and default configuration.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
o system state: The additional data on a system that is not
configuration, such as read-only status information and collected
statistics. System state is transient and modified by
interactions with internal components or other systems. System
state is modeled in YANG using "config false" nodes.
o operational state: The combination of applied configuration and
system state.
o operational state datastore: A datastore holding the complete
operational state of the device. This datastore is referred to as
"<operational>".
o origin: A metadata annotation indicating the origin of a
data item.
o remnant configuration: Configuration that remains part of the
applied configuration for a period of time after it has been
removed from the intended configuration or dynamic configuration.
The time period may be minimal or may last until all resources
used by the newly deleted configuration (e.g., network
connections, memory allocations, file handles) have been
deallocated.
The following additional terms are not datastore specific, but they
are commonly used and are thus defined here as well:
o client: An entity that can access YANG-defined data on a server,
over some network management protocol.
o server: An entity that provides access to YANG-defined data to a
client, over some network management protocol.
o notification: A server-initiated message indicating that a certain
event has been recognized by the server.
o remote procedure call: An operation that can be invoked by a
client on a server.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Background</span>
NETCONF [<a href="./rfc6241" title=""Network Configuration Protocol (NETCONF)"">RFC6241</a>] provides the following definitions:
o datastore: A conceptual place to store and access information. A
datastore might be implemented, for example, using files, a
database, flash memory locations, or combinations thereof.
o configuration datastore: The datastore holding the complete set of
configuration that is required to get a device from its initial
default state into a desired operational state.
YANG 1.1 [<a href="./rfc7950" title=""The YANG 1.1 Data Modeling Language"">RFC7950</a>] provides the following refinements when NETCONF is
used with YANG (which is the usual case, but note that NETCONF was
defined before YANG existed):
o datastore: When modeled with YANG, a datastore is realized as an
instantiated data tree.
o configuration datastore: When modeled with YANG, a configuration
datastore is realized as an instantiated data tree with
configuration.
[<a id="ref-RFC6244">RFC6244</a>] defined operational state data as follows:
o Operational state data is a set of data that has been obtained by
the system at runtime and influences the system's behavior similar
to configuration data. In contrast to configuration data,
operational state is transient and modified by interactions with
internal components or other systems via specialized protocols.
<a href="./rfc6244#section-4.3.3">Section 4.3.3 of [RFC6244]</a> discusses operational state and mentions,
among other things, the option to consider operational state as being
stored in another datastore. <a href="./rfc6244#section-4.4">Section 4.4 of [RFC6244]</a> then concludes
that, at the time of its writing, modeling state as distinct leafs
and distinct branches is the recommended approach.
Implementation experience and requests from operators [<a href="#ref-OpState-Reqs">OpState-Reqs</a>]
[<a href="#ref-OpState-Modeling">OpState-Modeling</a>] indicate that the datastore model initially
designed for NETCONF and refined by YANG needs to be extended. In
particular, the notion of intended configuration and applied
configuration has developed.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. Original Model of Datastores</span>
The following drawing shows the original model of datastores as it is
currently used by NETCONF [<a href="./rfc6241" title=""Network Configuration Protocol (NETCONF)"">RFC6241</a>]:
+-------------+ +-----------+
| <candidate> | | <startup> |
| (ct, rw) |<---+ +--->| (ct, rw) |
+-------------+ | | +-----------+
| | | |
| +-----------+ |
+-------->| <running> |<--------+
| (ct, rw) |
+-----------+
|
v
operational state <--- control plane
(cf, ro)
ct = config true; cf = config false
rw = read-write; ro = read-only
boxes denote datastores
Figure 1
Note that this diagram simplifies the model: "read-only" (ro) and
"read-write" (rw) are to be understood from the client's perspective,
at a conceptual level. In NETCONF, for example, support for
<candidate> and <startup> is optional, and <running> does not have to
be writable. Furthermore, <startup> can only be modified by copying
<running> to <startup> in the standardized NETCONF datastore editing
model. The RESTCONF protocol does not expose these differences and
instead provides only a writable unified datastore, which hides
whether edits are done through <candidate>, by directly modifying
<running>, or via some other implementation-specific mechanism.
RESTCONF also hides how configuration is made persistent. Note that
implementations may also have additional datastores that can
propagate changes to <running>. NETCONF explicitly mentions
so-called "named datastores".
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
Some observations:
o Operational state has not been defined as a datastore, although
there were proposals in the past to introduce an operational state
datastore.
o The NETCONF <get> operation returns the contents of <running>
together with the operational state. It is therefore necessary
that "config false" data be in a different branch than the
"config true" data if the operational state can have a different
lifetime compared to configuration or if configuration is not
immediately or successfully applied.
o Several implementations have proprietary mechanisms that allow
clients to store inactive data in <running>. Inactive data is
conceptually removed before validation.
o Some implementations have proprietary mechanisms that allow
clients to define configuration templates in <running>. These
templates are expanded automatically by the system, and the
resulting configuration is applied internally.
o Some operators have reported that it is essential for them to be
able to retrieve the configuration that has actually been
successfully applied, which may be a subset or a superset of the
<running> configuration.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Architectural Model of Datastores</span>
Below is a new conceptual model of datastores, extending the original
model in order to reflect the experience gained with the original
model.
+-------------+ +-----------+
| <candidate> | | <startup> |
| (ct, rw) |<---+ +--->| (ct, rw) |
+-------------+ | | +-----------+
| | | |
| +-----------+ |
+-------->| <running> |<--------+
| (ct, rw) |
+-----------+
|
| // configuration transformations,
| // e.g., removal of nodes marked as
| // "inactive", expansion of
| // templates
v
+------------+
| <intended> | // subject to validation
| (ct, ro) |
+------------+
| // changes applied, subject to
| // local factors, e.g., missing
| // resources, delays
|
dynamic | +-------- learned configuration
configuration | +-------- system configuration
datastores -----+ | +-------- default configuration
| | |
v v v
+---------------+
| <operational> | <-- system state
| (ct + cf, ro) |
+---------------+
ct = config true; cf = config false
rw = read-write; ro = read-only
boxes denote named datastores
Figure 2
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. Conventional Configuration Datastores</span>
The conventional configuration datastores are a set of configuration
datastores that share exactly the same datastore schema, allowing
data to be copied between them. The term is meant as a generic
umbrella description of these datastores. If a module does not
contain any configuration data nodes and it is not needed to satisfy
any imports, then it MAY be omitted from the datastore schema for the
conventional configuration datastores. The set of datastores
include:
o <running>
o <candidate>
o <startup>
o <intended>
Other conventional configuration datastores may be defined in future
documents.
The flow of data between these datastores is depicted in <a href="#section-5">Section 5</a>.
The specific protocols may define explicit operations to copy between
these datastores, e.g., NETCONF defines the <copy-config> operation.
<span class="h4"><a class="selflink" id="section-5.1.1" href="#section-5.1.1">5.1.1</a>. The Startup Configuration Datastore (<startup>)</span>
The startup configuration datastore (<startup>) is a configuration
datastore holding the configuration loaded by the device when it
boots. <startup> is only present on devices that separate the
startup configuration from the running configuration datastore.
The startup configuration datastore may not be supported by all
protocols or implementations.
On devices that support non-volatile storage, the contents of
<startup> will typically persist across reboots via that storage. At
boot time, the device loads the saved startup configuration into
<running>. To save a new startup configuration, data is copied to
<startup> via either implicit or explicit protocol operations.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h4"><a class="selflink" id="section-5.1.2" href="#section-5.1.2">5.1.2</a>. The Candidate Configuration Datastore (<candidate>)</span>
The candidate configuration datastore (<candidate>) is a
configuration datastore that can be manipulated without impacting the
device's current configuration and that can be committed to
<running>.
The candidate configuration datastore may not be supported by all
protocols or implementations.
<candidate> does not typically persist across reboots, even in the
presence of non-volatile storage. If <candidate> is stored using
non-volatile storage, it is reset at boot time to the contents of
<running>.
<span class="h4"><a class="selflink" id="section-5.1.3" href="#section-5.1.3">5.1.3</a>. The Running Configuration Datastore (<running>)</span>
The running configuration datastore (<running>) is a configuration
datastore that holds the current configuration of the device. It MAY
include configuration that requires further transformation before it
can be applied, e.g., inactive configuration, or template-mechanism-
oriented configuration that needs further expansion. However,
<running> MUST always be a valid configuration data tree, as defined
in <a href="./rfc7950#section-8.1">Section 8.1 of [RFC7950]</a>.
<running> MUST be supported if the device can be configured via
conventional configuration datastores.
If a device does not have a distinct <startup> and non-volatile
storage is available, the device will typically use that non-volatile
storage to allow <running> to persist across reboots.
<span class="h4"><a class="selflink" id="section-5.1.4" href="#section-5.1.4">5.1.4</a>. The Intended Configuration Datastore (<intended>)</span>
The intended configuration datastore (<intended>) is a read-only
configuration datastore. It represents the configuration after all
configuration transformations to <running> are performed (e.g.,
template expansion, removal of inactive configuration) and is the
configuration that the system attempts to apply.
<intended> is tightly coupled to <running>. Whenever data is written
to <running>, the server MUST also immediately update and validate
<intended>.
<intended> MAY also be updated independently of <running> if the
effect of a configuration transformation changes, but <intended> MUST
always be a valid configuration data tree, as defined in <a href="./rfc7950#section-8.1">Section 8.1
of [RFC7950]</a>.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
For simple implementations, <running> and <intended> are identical.
The contents of <intended> are also related to the "config true"
subset of <operational>; hence, a client can determine to what extent
the intended configuration is currently in use by checking to see
whether the contents of <intended> also appear in <operational>.
<intended> does not persist across reboots; its relationship with
<running> makes that unnecessary.
Currently, there are no standard mechanisms defined that affect
<intended> so that it would have different content than <running>,
but this architecture allows for such mechanisms to be defined.
One example of such a mechanism is support for marking nodes as
inactive in <running>. Inactive nodes are not copied to <intended>.
A second example is support for templates, which can perform
transformations on the configuration from <running> to the
configuration written to <intended>.
<span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>. Dynamic Configuration Datastores</span>
The model recognizes the need for dynamic configuration datastores
that are, by definition, not part of the persistent configuration of
a device. In some contexts, these have been termed "ephemeral
datastores", since the information is ephemeral, i.e., lost upon
reboot. The dynamic configuration datastores interact with the rest
of the system through <operational>.
The datastore schema for a dynamic configuration datastore MAY differ
from the datastore schema used for conventional configuration
datastores. If a module does not contain any configuration data
nodes and it is not needed to satisfy any imports, then it MAY be
omitted from the datastore schema for the dynamic configuration
datastore.
<span class="h3"><a class="selflink" id="section-5.3" href="#section-5.3">5.3</a>. The Operational State Datastore (<operational>)</span>
The operational state datastore (<operational>) is a read-only
datastore that consists of all "config true" and "config false" nodes
defined in the datastore's schema. In the original NETCONF model,
the operational state only had "config false" nodes. The reason for
incorporating "config true" nodes here is to be able to expose all
operational settings without having to replicate definitions in the
data models.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<operational> contains system state and all configuration actually
used by the system. This includes all applied configuration from
<intended>, learned configuration, system-provided configuration, and
default values defined by any supported data models. In addition,
<operational> also contains applied configuration from dynamic
configuration datastores.
The datastore schema for <operational> MUST be a superset of the
combined datastore schema used in all configuration datastores,
except that configuration data nodes supported in a configuration
datastore MAY be omitted from <operational> if a server is not able
to accurately report them.
Requests to retrieve nodes from <operational> always return the value
in use if the node exists, regardless of any default value specified
in the YANG module. If no value is returned for a given node, then
this implies that the node is not used by the device.
The interpretation of what constitutes being "in use" by the system
is dependent on both the schema definition and the device
implementation. Generally, functionality that is enabled and
operational on the system would be considered to be "in use".
Conversely, functionality that is neither enabled nor operational on
the system is considered not to be "in use"; hence, it SHOULD be
omitted from <operational>.
<operational> SHOULD conform to any constraints specified in the data
model, but given the principal aim of returning "in use" values, it
is possible that constraints MAY be violated under some circumstances
(e.g., an abnormal value is "in use", the structure of a list is
being modified, or remnant configuration (see <a href="#section-5.3.1">Section 5.3.1</a>) still
exists). Note that deviations SHOULD be used when it is known in
advance that a device does not fully conform to the <operational>
schema.
Only semantic constraints MAY be violated. These are the YANG
"when", "must", "mandatory", "unique", "min-elements", and
"max-elements" statements; and the uniqueness of key values.
Syntactic constraints MUST NOT be violated, including hierarchical
organization, identifiers, and type-based constraints. If a node in
<operational> does not meet the syntactic constraints, then it
MUST NOT be returned, and some other mechanism should be used to flag
the error.
<operational> does not persist across reboots.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h4"><a class="selflink" id="section-5.3.1" href="#section-5.3.1">5.3.1</a>. Remnant Configuration</span>
Changes to configuration may take time to percolate through to
<operational>. During this period, <operational> may contain nodes
for both the previous and current configuration, as closely as
possible tracking the current operation of the device. Such remnant
configuration from the previous configuration persists until the
system has released resources used by the newly deleted configuration
(e.g., network connections, memory allocations, file handles).
Remnant configuration is a common example of where the semantic
constraints defined in the data model cannot be relied upon for
<operational>, since the system may have remnant configuration whose
constraints were valid with the previous configuration and that are
not valid with the current configuration. Since constraints on
"config false" nodes may refer to "config true" nodes, remnant
configuration may force the violation of those constraints.
<span class="h4"><a class="selflink" id="section-5.3.2" href="#section-5.3.2">5.3.2</a>. Missing Resources</span>
Configuration in <intended> can refer to resources that are not
available or otherwise not physically present. In these situations,
these parts of <intended> are not applied. The data appears in
<intended> but does not appear in <operational>.
A typical example is an interface configuration that refers to an
interface that is not currently present. In such a situation, the
interface configuration remains in <intended> but the interface
configuration will not appear in <operational>.
Note that configuration validity cannot depend on the current state
of such resources, since that would imply that removing a resource
might render the configuration invalid. This is unacceptable,
especially given that rebooting such a device would cause it to
restart with an invalid configuration. Instead, we allow
configuration for missing resources to exist in <running> and
<intended>, but it will not appear in <operational>.
<span class="h4"><a class="selflink" id="section-5.3.3" href="#section-5.3.3">5.3.3</a>. System-Controlled Resources</span>
Sometimes, resources are controlled by the device and the
corresponding system-controlled data appears in (and disappears from)
<operational> dynamically. If a system-controlled resource has
matching configuration in <intended> when it appears, the system will
try to apply the configuration; this causes the configuration to
appear in <operational> eventually (if application of the
configuration was successful).
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h4"><a class="selflink" id="section-5.3.4" href="#section-5.3.4">5.3.4</a>. Origin Metadata Annotation</span>
As configuration flows into <operational>, it is conceptually marked
with a metadata annotation [<a href="./rfc7952" title=""Defining and Using Metadata with YANG"">RFC7952</a>] that indicates its origin. The
origin applies to all configuration nodes except non-presence
containers. The "origin" metadata annotation is defined in
<a href="#section-7">Section 7</a>. The values are YANG identities. The following identities
are defined:
o origin: abstract base identity from which the other origin
identities are derived.
o intended: represents configuration provided by <intended>.
o dynamic: represents configuration provided by a dynamic
configuration datastore.
o system: represents configuration provided by the system itself.
Examples of system configuration include applied configuration for
an always-existing loopback interface, or interface configuration
that is auto-created due to the hardware currently present in the
device.
o learned: represents configuration that has been learned via
protocol interactions with other systems, including such protocols
as link-layer negotiations, routing protocols, and DHCP.
o default: represents configuration using a default value specified
in the data model, using either values in the "default" statement
or any values described in the "description" statement. The
default origin is only used when the configuration has not been
provided by any other source.
o unknown: represents configuration for which the system cannot
identify the origin.
These identities can be further refined, e.g., there could be
separate identities for particular types or instances of dynamic
configuration datastores derived from "dynamic".
For all configuration data nodes in <operational>, the device SHOULD
report the origin that most accurately reflects the source of the
configuration that is in use by the system.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
In cases where it could be ambiguous as to which origin should be
used, i.e., where the same data node value has originated from
multiple sources, the "description" statement in the YANG module
SHOULD be used as guidance for choosing the appropriate origin. For
example:
If, for a particular configuration node, the associated YANG
"description" statement indicates that a protocol-negotiated value
overrides any configured value, then the origin would be reported as
"learned", even when a learned value is the same as the configured
value.
Conversely, if, for a particular configuration node, the associated
YANG "description" statement indicates that a protocol-negotiated
value does not override an explicitly configured value, then the
origin would be reported as "intended", even when a learned value is
the same as the configured value.
In the case that a device cannot provide an accurate origin for a
particular configuration data node, it SHOULD use the origin
"unknown".
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Implications on YANG</span>
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>. XPath Context</span>
This section updates <a href="./rfc7950#section-6.4.1">Section 6.4.1 of RFC 7950</a>.
If a server implements the architecture defined in this document, the
accessible trees for some XPath contexts are refined as follows:
o If the XPath expression is defined in a substatement to a data
node that represents system state, the accessible tree is all
operational state in the server. The root node has all top-level
data nodes in all modules as children.
o If the XPath expression is defined in a substatement to a
"notification" statement, the accessible tree is the notification
instance and all operational state in the server. If the
notification is defined on the top level in a module, then the
root node has the node representing the notification being defined
and all top-level data nodes in all modules as children.
Otherwise, the root node has all top-level data nodes in all
modules as children.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
o If the XPath expression is defined in a substatement to an "input"
statement in an "rpc" or "action" statement, the accessible tree
is the RPC or action operation instance and all operational state
in the server. The root node has top-level data nodes in all
modules as children. Additionally, for an RPC, the root node also
has the node representing the RPC operation being defined as a
child. The node representing the operation being defined has the
operation's input parameters as children.
o If the XPath expression is defined in a substatement to an
"output" statement in an "rpc" or "action" statement, the
accessible tree is the RPC or action operation instance and all
operational state in the server. The root node has top-level data
nodes in all modules as children. Additionally, for an RPC, the
root node also has the node representing the RPC operation being
defined as a child. The node representing the operation being
defined has the operation's output parameters as children.
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>. Invocation of Actions and RPCs</span>
This section updates <a href="./rfc7950#section-7.15">Section 7.15 of RFC 7950</a>.
Actions are always invoked in the context of the operational state
datastore. The node for which the action is invoked MUST exist in
the operational state datastore.
Note that this document does not constrain the result of invoking an
RPC or action in any way. For example, an RPC might be defined to
modify the contents of some datastore.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. YANG Modules</span>
<CODE BEGINS> file "ietf-datastores@2018-02-14.yang"
module ietf-datastores {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-datastores";
prefix ds;
organization
"IETF Network Modeling (NETMOD) Working Group";
contact
"WG Web: <<a href="https://datatracker.ietf.org/wg/netmod/">https://datatracker.ietf.org/wg/netmod/</a>>
WG List: <mailto:netmod@ietf.org>
Author: Martin Bjorklund
<mailto:mbj@tail-f.com>
Author: Juergen Schoenwaelder
<mailto:j.schoenwaelder@jacobs-university.de>
Author: Phil Shafer
<mailto:phil@juniper.net>
Author: Kent Watsen
<mailto:kwatsen@juniper.net>
Author: Rob Wilton
<rwilton@cisco.com>";
description
"This YANG module defines a set of identities for identifying
datastores.
Copyright (c) 2018 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>).
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
This version of this YANG module is part of <a href="./rfc8342">RFC 8342</a>
(<a href="https://www.rfc-editor.org/info/rfc8342">https://www.rfc-editor.org/info/rfc8342</a>); see the RFC itself
for full legal notices.";
revision 2018-02-14 {
description
"Initial revision.";
reference
"<a href="./rfc8342">RFC 8342</a>: Network Management Datastore Architecture (NMDA)";
}
/*
* Identities
*/
identity datastore {
description
"Abstract base identity for datastore identities.";
}
identity conventional {
base datastore;
description
"Abstract base identity for conventional configuration
datastores.";
}
identity running {
base conventional;
description
"The running configuration datastore.";
}
identity candidate {
base conventional;
description
"The candidate configuration datastore.";
}
identity startup {
base conventional;
description
"The startup configuration datastore.";
}
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
identity intended {
base conventional;
description
"The intended configuration datastore.";
}
identity dynamic {
base datastore;
description
"Abstract base identity for dynamic configuration datastores.";
}
identity operational {
base datastore;
description
"The operational state datastore.";
}
/*
* Type definitions
*/
typedef datastore-ref {
type identityref {
base datastore;
}
description
"A datastore identity reference.";
}
}
<CODE ENDS>
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<CODE BEGINS> file "ietf-origin@2018-02-14.yang"
module ietf-origin {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-origin";
prefix or;
import ietf-yang-metadata {
prefix md;
}
organization
"IETF Network Modeling (NETMOD) Working Group";
contact
"WG Web: <<a href="https://datatracker.ietf.org/wg/netmod/">https://datatracker.ietf.org/wg/netmod/</a>>
WG List: <mailto:netmod@ietf.org>
Author: Martin Bjorklund
<mailto:mbj@tail-f.com>
Author: Juergen Schoenwaelder
<mailto:j.schoenwaelder@jacobs-university.de>
Author: Phil Shafer
<mailto:phil@juniper.net>
Author: Kent Watsen
<mailto:kwatsen@juniper.net>
Author: Rob Wilton
<rwilton@cisco.com>";
description
"This YANG module defines an 'origin' metadata annotation and a
set of identities for the origin value.
Copyright (c) 2018 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>).
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
This version of this YANG module is part of <a href="./rfc8342">RFC 8342</a>
(<a href="https://www.rfc-editor.org/info/rfc8342">https://www.rfc-editor.org/info/rfc8342</a>); see the RFC itself
for full legal notices.";
revision 2018-02-14 {
description
"Initial revision.";
reference
"<a href="./rfc8342">RFC 8342</a>: Network Management Datastore Architecture (NMDA)";
}
/*
* Identities
*/
identity origin {
description
"Abstract base identity for the origin annotation.";
}
identity intended {
base origin;
description
"Denotes configuration from the intended configuration
datastore.";
}
identity dynamic {
base origin;
description
"Denotes configuration from a dynamic configuration
datastore.";
}
identity system {
base origin;
description
"Denotes configuration originated by the system itself.
Examples of system configuration include applied configuration
for an always-existing loopback interface, or interface
configuration that is auto-created due to the hardware
currently present in the device.";
}
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
identity learned {
base origin;
description
"Denotes configuration learned from protocol interactions with
other devices, instead of via either the intended
configuration datastore or any dynamic configuration
datastore.
Examples of protocols that provide learned configuration
include link-layer negotiations, routing protocols, and
DHCP.";
}
identity default {
base origin;
description
"Denotes configuration that does not have a configured or
learned value but has a default value in use. Covers both
values defined in a 'default' statement and values defined
via an explanation in a 'description' statement.";
}
identity unknown {
base origin;
description
"Denotes configuration for which the system cannot identify the
origin.";
}
/*
* Type definitions
*/
typedef origin-ref {
type identityref {
base origin;
}
description
"An origin identity reference.";
}
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
/*
* Metadata annotations
*/
md:annotation origin {
type origin-ref;
description
"The 'origin' annotation can be present on any configuration
data node in the operational state datastore. It specifies
from where the node originated. If not specified for a given
configuration data node, then the origin is the same as the
origin of its parent node in the data tree. The origin for
any top-level configuration data nodes must be specified.";
}
}
<CODE ENDS>
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. IANA Considerations</span>
<span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a>. Updates to the IETF XML Registry</span>
This document registers two URIs in the "IETF XML Registry"
[<a href="./rfc3688" title=""The IETF XML Registry"">RFC3688</a>]. Following the format in [<a href="./rfc3688" title=""The IETF XML Registry"">RFC3688</a>], the following
registrations have been made:
URI: urn:ietf:params:xml:ns:yang:ietf-datastores
Registrant Contact: The IESG.
XML: N/A; the requested URI is an XML namespace.
URI: urn:ietf:params:xml:ns:yang:ietf-origin
Registrant Contact: The IESG.
XML: N/A; the requested URI is an XML namespace.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a>. Updates to the YANG Module Names Registry</span>
This document registers two YANG modules in the "YANG Module Names"
registry [<a href="./rfc6020" title=""YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)"">RFC6020</a>]. Following the format in [<a href="./rfc6020" title=""YANG - A Data Modeling Language for the Network Configuration Protocol (NETCONF)"">RFC6020</a>], the following
registrations have been made:
name: ietf-datastores
namespace: urn:ietf:params:xml:ns:yang:ietf-datastores
prefix: ds
reference: <a href="./rfc8342">RFC 8342</a>
name: ietf-origin
namespace: urn:ietf:params:xml:ns:yang:ietf-origin
prefix: or
reference: <a href="./rfc8342">RFC 8342</a>
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. Security Considerations</span>
This document discusses an architectural model of datastores for
network management using NETCONF/RESTCONF and YANG. It has no
security impact on the Internet.
Although this document specifies several YANG modules, these modules
only define identities and a metadata annotation; hence, the "YANG
module security guidelines" [<a href="#ref-YANG-SEC" title=""YANG Security Guidelines"">YANG-SEC</a>] do not apply.
The origin metadata annotation exposes the origin of values in the
applied configuration. Origin information may provide hints that
certain control-plane protocols are active on a device. Since origin
information is tied to applied configuration values, it is only
accessible to clients that have the permissions to read the applied
configuration values. Security administrators should consider the
sensitivity of origin information while defining access control
rules.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. References</span>
<span class="h3"><a class="selflink" id="section-10.1" href="#section-10.1">10.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-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-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-RFC7952">RFC7952</a>] Lhotka, L., "Defining and Using Metadata with YANG",
<a href="./rfc7952">RFC 7952</a>, DOI 10.17487/RFC7952, August 2016,
<<a href="https://www.rfc-editor.org/info/rfc7952">https://www.rfc-editor.org/info/rfc7952</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 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-W3C.REC-xml-20081126">W3C.REC-xml-20081126</a>]
Bray, T., Paoli, J., Sperberg-McQueen, M., Maler, E., and
F. Yergeau, "Extensible Markup Language (XML) 1.0
(Fifth Edition)", World Wide Web Consortium Recommendation
REC-xml-20081126, November 2008,
<<a href="https://www.w3.org/TR/2008/REC-xml-20081126">https://www.w3.org/TR/2008/REC-xml-20081126</a>>.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h3"><a class="selflink" id="section-10.2" href="#section-10.2">10.2</a>. Informative References</span>
[<a id="ref-NETMOD-Operational">NETMOD-Operational</a>]
Bjorklund, M. and L. Lhotka, "Operational Data in NETCONF
and YANG", Work in Progress, <a href="./draft-bjorklund-netmod-operational-00">draft-bjorklund-netmod-</a>
<a href="./draft-bjorklund-netmod-operational-00">operational-00</a>, October 2012.
[<a id="ref-OpState-Enhance">OpState-Enhance</a>]
Watsen, K., Bierman, A., Bjorklund, M., and J.
Schoenwaelder, "Operational State Enhancements for YANG,
NETCONF, and RESTCONF", Work in Progress, <a href="./draft-kwatsen-netmod-opstate-02">draft-kwatsen-</a>
<a href="./draft-kwatsen-netmod-opstate-02">netmod-opstate-02</a>, February 2016.
[<a id="ref-OpState-Modeling">OpState-Modeling</a>]
Shakir, R., Shaikh, A., and M. Hines, "Consistent Modeling
of Operational State Data in YANG", Work in Progress,
<a href="./draft-openconfig-netmod-opstate-01">draft-openconfig-netmod-opstate-01</a>, July 2015.
[<a id="ref-OpState-Reqs">OpState-Reqs</a>]
Watsen, K. and T. Nadeau, "Terminology and Requirements
for Enhanced Handling of Operational State", Work in
Progress, <a href="./draft-ietf-netmod-opstate-reqs-04">draft-ietf-netmod-opstate-reqs-04</a>, January 2016.
[<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-RFC6244">RFC6244</a>] Shafer, P., "An Architecture for Network Management Using
NETCONF and YANG", <a href="./rfc6244">RFC 6244</a>, DOI 10.17487/RFC6244,
June 2011, <<a href="https://www.rfc-editor.org/info/rfc6244">https://www.rfc-editor.org/info/rfc6244</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>>.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
[<a id="ref-With-config-state">With-config-state</a>]
Wilton, R., ""With-config-state" Capability for
NETCONF/RESTCONF", Work in Progress, <a href="./draft-wilton-netmod-opstate-yang-02">draft-wilton-netmod-</a>
<a href="./draft-wilton-netmod-opstate-yang-02">opstate-yang-02</a>, December 2015.
[<a id="ref-YANG-SEC">YANG-SEC</a>] IETF, "YANG Security Guidelines", <<a href="https://trac.ietf.org/trac/ops/wiki/yang-security-guidelines">https://trac.ietf.org/</a>
<a href="https://trac.ietf.org/trac/ops/wiki/yang-security-guidelines">trac/ops/wiki/yang-security-guidelines</a>>.
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h2"><a class="selflink" id="appendix-A" href="#appendix-A">Appendix A</a>. Guidelines for Defining Datastores</span>
The definition of a new datastore in this architecture should be
provided in a document (e.g., an RFC) purposed for defining the
datastore. When it makes sense, more than one datastore may be
defined in the same document (e.g., when the datastores are logically
connected). Each datastore's definition should address the points
specified in the subsections below.
<span class="h3"><a class="selflink" id="appendix-A.1" href="#appendix-A.1">A.1</a>. Define Which YANG Modules Can Be Used in the Datastore</span>
Not all YANG modules may be used in all datastores. Some datastores
may constrain which data models can be used in them. If it is
desirable that a subset of all modules can be targeted to the
datastore, then the documentation defining the datastore must
indicate this.
<span class="h3"><a class="selflink" id="appendix-A.2" href="#appendix-A.2">A.2</a>. Define Which Subset of YANG-Modeled Data Applies</span>
By default, the data in a datastore is modeled by all YANG statements
in the available YANG modules. However, it is possible to specify
criteria that YANG statements must satisfy in order to be present in
a datastore. For instance, maybe only "config true" nodes, or
"config false" nodes that also have a specific YANG extension, are
present in the datastore.
<span class="h3"><a class="selflink" id="appendix-A.3" href="#appendix-A.3">A.3</a>. Define How Data Is Actualized</span>
The new datastore must specify how it interacts with other
datastores.
For example, the diagram in <a href="#section-5">Section 5</a> depicts dynamic configuration
datastores feeding into <operational>. How this interaction occurs
has to be defined by the particular dynamic configuration datastores.
In some cases, it may occur implicitly, as soon as the data is put
into the dynamic configuration datastore, while in other cases an
explicit action (e.g., an RPC) may be required to trigger the
application of the datastore's data.
<span class="h3"><a class="selflink" id="appendix-A.4" href="#appendix-A.4">A.4</a>. Define Which Protocols Can Be Used</span>
By default, it is assumed that both the NETCONF and RESTCONF
protocols can be used to interact with a datastore. However, it may
be that only a specific protocol can be used (e.g., Forwarding and
Control Element Separation (ForCES)) or that a subset of all protocol
operations or capabilities are available (e.g., no locking or no
XPath-based filtering).
<span class="grey">Bjorklund, 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="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h3"><a class="selflink" id="appendix-A.5" href="#appendix-A.5">A.5</a>. Define YANG Identities for the Datastore</span>
The datastore must be defined with a YANG identity that uses the
"ds:datastore" identity, or one of its derived identities, as its
base. This identity is necessary, so that the datastore can be
referenced in protocol operations (e.g., <get-data>).
The datastore may also be defined with an identity that uses the
"or:origin" identity, or one of its derived identities, as its base.
This identity is needed if the datastore interacts with
<operational>, so that data originating from the datastore can be
identified as such via the "origin" metadata attribute defined in
<a href="#section-7">Section 7</a>.
An example of these guidelines in use is provided in <a href="#appendix-B">Appendix B</a>.
<span class="h2"><a class="selflink" id="appendix-B" href="#appendix-B">Appendix B</a>. Example of an Ephemeral Dynamic Configuration Datastore</span>
This section defines documentation for an example dynamic
configuration datastore using the guidelines provided in <a href="#appendix-A">Appendix A</a>.
For brevity, only a terse example is provided; it is expected that a
standalone RFC would be written when this type of scenario is fully
considered.
This example defines a dynamic configuration datastore called
"ephemeral", which is loosely modeled after the work done in the I2RS
Working Group.
+--------------------+----------------------------------------------+
| Name | Value |
+--------------------+----------------------------------------------+
| Name | ephemeral |
| | |
| YANG modules | all (default) |
| | |
| YANG nodes | all "config true" data nodes |
| | |
| How applied | changes automatically propagated to |
| | <operational> |
| | |
| Protocols | NETCONF/RESTCONF (default) |
| | |
| Defining YANG | "example-ds-ephemeral" |
| module | |
+--------------------+----------------------------------------------+
Properties of the Example "ephemeral" Datastore
<span class="grey">Bjorklund, et al. Standards Track [Page 32]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span>
<span class="grey"><a href="./rfc8342">RFC 8342</a> NMDA March 2018</span>
module example-ds-ephemeral {
yang-version 1.1;
namespace "urn:example:ds-ephemeral";
prefix eph;
import ietf-datastores {
prefix ds;
}
import ietf-origin {
prefix or;
}
// datastore identity
identity ds-ephemeral {
base ds:dynamic;
description
"The ephemeral dynamic configuration datastore.";
}
// origin identity
identity or-ephemeral {
base or:dynamic;
description
"Denotes data from the ephemeral dynamic configuration
datastore.";
}
}
<span class="h2"><a class="selflink" id="appendix-C" href="#appendix-C">Appendix C</a>. Example Data</span>
The use of datastores is complex, and many of the subtle effects are
more easily presented using examples. This section presents a series
of example data models with some sample contents of the various
datastores.
The XML [<a href="#ref-W3C.REC-xml-20081126">W3C.REC-xml-20081126</a>] snippets that follow are provided as
examples only.
<span class="grey">Bjorklund, et al. Standards Track [Page 33]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-34" ></span>
<span class="grey"><a href="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h3"><a class="selflink" id="appendix-C.1" href="#appendix-C.1">C.1</a>. System Example</span>
In this example, the following fictional module is used:
module example-system {
yang-version 1.1;
namespace urn:example:system;
prefix sys;
import ietf-inet-types {
prefix inet;
}
container system {
leaf hostname {
type string;
}
list interface {
key name;
leaf name {
type string;
}
container auto-negotiation {
leaf enabled {
type boolean;
default true;
}
leaf speed {
type uint32;
units mbps;
description
"The advertised speed, in Mbps.";
}
}
leaf speed {
type uint32;
units mbps;
config false;
description
"The speed of the interface, in Mbps.";
}
<span class="grey">Bjorklund, et al. Standards Track [Page 34]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-35" ></span>
<span class="grey"><a href="./rfc8342">RFC 8342</a> NMDA March 2018</span>
list address {
key ip;
leaf ip {
type inet:ip-address;
}
leaf prefix-length {
type uint8;
}
}
}
}
}
The operator has configured the hostname and two interfaces, so the
contents of <intended> are:
<system xmlns="urn:example:system">
<hostname>foo.example.com</hostname>
<interface>
<name>eth0</name>
<auto-negotiation>
<speed>1000</speed>
</auto-negotiation>
<address>
<ip>2001:db8::10</ip>
<prefix-length>64</prefix-length>
</address>
</interface>
<interface>
<name>eth1</name>
<address>
<ip>2001:db8::20</ip>
<prefix-length>64</prefix-length>
</address>
</interface>
</system>
The system has detected that the hardware for one of the configured
interfaces ("eth1") is not yet present, so the configuration for that
interface is not applied. Further, the system has received a
hostname and an additional IP address for "eth0" over DHCP. In
addition to filling in the default value for the auto-negotiation
enabled leaf, a loopback interface entry is also automatically
<span class="grey">Bjorklund, et al. Standards Track [Page 35]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-36" ></span>
<span class="grey"><a href="./rfc8342">RFC 8342</a> NMDA March 2018</span>
instantiated by the system. All of this is reflected in
<operational>. Note how the "origin" metadata attribute for several
"config true" data nodes is inherited from their parent data nodes.
<system
xmlns="urn:example:system"
xmlns:or="urn:ietf:params:xml:ns:yang:ietf-origin">
<hostname or:origin="or:learned">bar.example.com</hostname>
<interface or:origin="or:intended">
<name>eth0</name>
<auto-negotiation>
<enabled or:origin="or:default">true</enabled>
<speed>1000</speed>
</auto-negotiation>
<speed>100</speed>
<address>
<ip>2001:db8::10</ip>
<prefix-length>64</prefix-length>
</address>
<address or:origin="or:learned">
<ip>2001:db8::1:100</ip>
<prefix-length>64</prefix-length>
</address>
</interface>
<interface or:origin="or:system">
<name>lo0</name>
<address>
<ip>::1</ip>
<prefix-length>128</prefix-length>
</address>
</interface>
</system>
<span class="grey">Bjorklund, et al. Standards Track [Page 36]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-37" ></span>
<span class="grey"><a href="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h3"><a class="selflink" id="appendix-C.2" href="#appendix-C.2">C.2</a>. BGP Example</span>
Consider the following fragment of a fictional BGP module:
container bgp {
leaf local-as {
type uint32;
}
leaf peer-as {
type uint32;
}
list peer {
key name;
leaf name {
type inet:ip-address;
}
leaf local-as {
type uint32;
description
"... Defaults to ../local-as.";
}
leaf peer-as {
type uint32;
description
"... Defaults to ../peer-as.";
}
leaf local-port {
type inet:port;
}
leaf remote-port {
type inet:port;
default 179;
}
leaf state {
config false;
type enumeration {
enum init;
enum established;
enum closing;
}
}
}
}
In this example model, both bgp/peer/local-as and bgp/peer/peer-as
have complex hierarchical values, allowing the user to specify
default values for all peers in a single location.
<span class="grey">Bjorklund, et al. Standards Track [Page 37]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-38" ></span>
<span class="grey"><a href="./rfc8342">RFC 8342</a> NMDA March 2018</span>
The model also follows the pattern of fully integrating state
("config false") nodes with configuration ("config true") nodes.
There is no separate "bgp-state" hierarchy, with the accompanying
repetition of containment and naming nodes. This makes the model
simpler and more readable.
<span class="h4"><a class="selflink" id="appendix-C.2.1" href="#appendix-C.2.1">C.2.1</a>. Datastores</span>
Each datastore represents differing views of these nodes. <running>
will hold the configuration provided by the operator -- for example,
a single BGP peer. <intended> will conceptually hold the data as
validated, after the removal of data not intended for validation and
after any local template mechanisms are performed. <operational>
will show data from <intended> as well as any "config false" nodes.
<span class="h4"><a class="selflink" id="appendix-C.2.2" href="#appendix-C.2.2">C.2.2</a>. Adding a Peer</span>
If the user configures a single BGP peer, then that peer will be
visible in both <running> and <intended>. It may also appear in
<candidate> if the server supports the candidate configuration
datastore. Retrieving the peer will return only the user-specified
values.
No time delay should exist between the appearance of the peer in
<running> and <intended>.
In this scenario, we've added the following to <running>:
<bgp>
<local-as>64501</local-as>
<peer-as>64502</peer-as>
<peer>
<name>2001:db8::2:3</name>
</peer>
</bgp>
<span class="h5"><a class="selflink" id="appendix-C.2.2.1" href="#appendix-C.2.2.1">C.2.2.1</a>. <operational></span>
The operational datastore will contain the fully expanded peer data,
including "config false" nodes. In our example, this means that the
"state" node will appear.
In addition, <operational> will contain the "currently in use" values
for all nodes. This means that local-as and peer-as will be
populated even if they are not given values in <intended>. The value
of bgp/local-as will be used if bgp/peer/local-as is not provided;
bgp/peer-as and bgp/peer/peer-as will have the same relationship. In
<span class="grey">Bjorklund, et al. Standards Track [Page 38]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-39" ></span>
<span class="grey"><a href="./rfc8342">RFC 8342</a> NMDA March 2018</span>
the operational view, this means that every peer will have values for
their local-as and peer-as, even if those values are not explicitly
configured but are provided by bgp/local-as and bgp/peer-as.
Each BGP peer has a TCP connection associated with it, using the
values of local-port and remote-port from <intended>. If those
values are not supplied, the system will select values. When the
connection is established, <operational> will contain the current
values for the local-port and remote-port nodes regardless of the
origin. If the system has chosen the values, the "origin" attribute
will be set to "system". Before the connection is established, one
or both of the nodes may not appear, since the system may not yet
have their values.
<bgp xmlns:or="urn:ietf:params:xml:ns:yang:ietf-origin"
or:origin="or:intended">
<local-as>64501</local-as>
<peer-as>64502</peer-as>
<peer>
<name>2001:db8::2:3</name>
<local-as or:origin="or:default">64501</local-as>
<peer-as or:origin="or:default">64502</peer-as>
<local-port or:origin="or:system">60794</local-port>
<remote-port or:origin="or:default">179</remote-port>
<state>established</state>
</peer>
</bgp>
<span class="h4"><a class="selflink" id="appendix-C.2.3" href="#appendix-C.2.3">C.2.3</a>. Removing a Peer</span>
Changes to configuration may take time to percolate through the
various software components involved. During this period, it is
imperative to continue to give an accurate view of the working of the
device. <operational> will contain nodes for both the previous and
current configuration, as closely as possible tracking the current
operation of the device.
Consider the scenario where a client removes a BGP peer. When a peer
is removed, the operational state will continue to reflect the
existence of that peer until the peer's resources are released,
including closing the peer's connection. During this period, the
current data values will continue to be visible in <operational>,
with the "origin" attribute set to indicate the origin of the
original data.
<span class="grey">Bjorklund, et al. Standards Track [Page 39]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-40" ></span>
<span class="grey"><a href="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<bgp xmlns:or="urn:ietf:params:xml:ns:yang:ietf-origin"
or:origin="or:intended">
<local-as>64501</local-as>
<peer-as>64502</peer-as>
<peer>
<name>2001:db8::2:3</name>
<local-as or:origin="or:default">64501</local-as>
<peer-as or:origin="or:default">64502</peer-as>
<local-port or:origin="or:system">60794</local-port>
<remote-port or:origin="or:default">179</remote-port>
<state>closing</state>
</peer>
</bgp>
Once resources are released and the connection is closed, the peer's
data is removed from <operational>.
<span class="h3"><a class="selflink" id="appendix-C.3" href="#appendix-C.3">C.3</a>. Interface Example</span>
In this section, we will use this simple interface data model:
container interfaces {
list interface {
key name;
leaf name {
type string;
}
leaf description {
type string;
}
leaf mtu {
type uint16;
}
leaf-list ip-address {
type inet:ip-address;
}
}
}
<span class="grey">Bjorklund, et al. Standards Track [Page 40]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-41" ></span>
<span class="grey"><a href="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h4"><a class="selflink" id="appendix-C.3.1" href="#appendix-C.3.1">C.3.1</a>. Pre-provisioned Interfaces</span>
One common issue in networking devices is the support of Field
Replaceable Units (FRUs) that can be inserted and removed from the
device without requiring a reboot or interfering with normal
operation. These FRUs are typically interface cards, and the devices
support pre-provisioning of these interfaces.
If a client creates an interface "et-0/0/0" but the interface does
not physically exist at this point, then <intended> might contain the
following:
<interfaces>
<interface>
<name>et-0/0/0</name>
<description>Test interface</description>
</interface>
</interfaces>
Since the interface does not exist, this data does not appear in
<operational>.
When a FRU containing this interface is inserted, the system will
detect it and process the associated configuration. <operational>
will contain the data from <intended>, as well as nodes added by the
system, such as the current value of the interface's MTU.
<interfaces xmlns:or="urn:ietf:params:xml:ns:yang:ietf-origin"
or:origin="or:intended">
<interface>
<name>et-0/0/0</name>
<description>Test interface</description>
<mtu or:origin="or:system">1500</mtu>
</interface>
</interfaces>
If the FRU is removed, the interface data is removed from
<operational>.
<span class="grey">Bjorklund, et al. Standards Track [Page 41]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-42" ></span>
<span class="grey"><a href="./rfc8342">RFC 8342</a> NMDA March 2018</span>
<span class="h4"><a class="selflink" id="appendix-C.3.2" href="#appendix-C.3.2">C.3.2</a>. System-Provided Interface</span>
Imagine that the system provides a loopback interface (named "lo0")
with a default IPv4 address of "127.0.0.1" and a default IPv6 address
of "::1". The system will only provide configuration for this
interface if there is no data for it in <intended>.
When no configuration for "lo0" appears in <intended>, <operational>
will show the system-provided data:
<interfaces xmlns:or="urn:ietf:params:xml:ns:yang:ietf-origin"
or:origin="or:intended">
<interface or:origin="or:system">
<name>lo0</name>
<ip-address>127.0.0.1</ip-address>
<ip-address>::1</ip-address>
</interface>
</interfaces>
When configuration for "lo0" does appear in <intended>, <operational>
will show that data with the origin set to "intended". If the
"ip-address" is not provided, then the system-provided value will
appear as follows:
<interfaces xmlns:or="urn:ietf:params:xml:ns:yang:ietf-origin"
or:origin="or:intended">
<interface>
<name>lo0</name>
<description>loopback</description>
<ip-address or:origin="or:system">127.0.0.1</ip-address>
<ip-address>::1</ip-address>
</interface>
</interfaces>
<span class="grey">Bjorklund, et al. Standards Track [Page 42]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-43" ></span>
<span class="grey"><a href="./rfc8342">RFC 8342</a> NMDA March 2018</span>
Acknowledgments
This document grew out of many discussions that took place since
2010. Several documents ([<a href="#ref-NETMOD-Operational">NETMOD-Operational</a>] [<a href="#ref-With-config-state">With-config-state</a>]
[<a href="#ref-OpState-Reqs">OpState-Reqs</a>] [<a href="#ref-OpState-Enhance">OpState-Enhance</a>] [<a href="#ref-OpState-Modeling">OpState-Modeling</a>], as well as
[<a href="./rfc6244" title=""An Architecture for Network Management Using NETCONF and YANG"">RFC6244</a>]), touched on some of the problems of the original datastore
model. The following people were authors of these works in progress
or were otherwise actively involved in the discussions that led to
this document:
o Lou Berger, LabN Consulting, L.L.C., <lberger@labn.net>
o Andy Bierman, YumaWorks, <andy@yumaworks.com>
o Marcus Hines, Google, <hines@google.com>
o Christian Hopps, Deutsche Telekom, <chopps@chopps.org>
o Balazs Lengyel, Ericsson, <balazs.lengyel@ericsson.com>
o Ladislav Lhotka, CZ.NIC, <lhotka@nic.cz>
o Acee Lindem, Cisco Systems, <acee@cisco.com>
o Thomas Nadeau, Brocade Networks, <tnadeau@lucidvision.com>
o Tom Petch, Engineering Networks Ltd, <ietfc@btconnect.com>
o Anees Shaikh, Google, <aashaikh@google.com>
o Rob Shakir, Google, <robjs@google.com>
o Jason Sterne, Nokia, <jason.sterne@nokia.com>
Juergen Schoenwaelder was partly funded by Flamingo, a Network of
Excellence project (ICT-318488) supported by the European Commission
under its Seventh Framework Programme.
<span class="grey">Bjorklund, et al. Standards Track [Page 43]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-44" ></span>
<span class="grey"><a href="./rfc8342">RFC 8342</a> NMDA March 2018</span>
Authors' Addresses
Martin Bjorklund
Tail-f Systems
Email: mbj@tail-f.com
Juergen Schoenwaelder
Jacobs University
Email: j.schoenwaelder@jacobs-university.de
Phil Shafer
Juniper Networks
Email: phil@juniper.net
Kent Watsen
Juniper Networks
Email: kwatsen@juniper.net
Robert Wilton
Cisco Systems
Email: rwilton@cisco.com
Bjorklund, et al. Standards Track [Page 44]
</pre>
|