blob: e2bff774f5d55af3538ba0edad908781e600bb85 [file] [log] [blame]
Radek Krejci86d106e2018-10-18 09:53:19 +02001module yang {
2 namespace "urn:ietf:params:xml:ns:yang:1";
3 prefix yang;
4
5 import ietf-yang-metadata {
6 prefix md;
7 revision-date 2016-08-05;
8 }
9
10 organization
11 "libyang";
12
13 contact
14 "Web: <https://github.com/CESNET/libyang/>
15 Author: Radek Krejci <rkrejci@cesnet.cz>";
16
17 description
18 "This is a kind of fake model with no data, typedefs or anything
19 else. libyang uses this module to implement various YANG attributes
20 defined in RFC 6020.";
21
22 revision 2017-02-20 {
23 description
24 "Added metadata for NETCONF's edit-config manipulation with ordered
25 lists and leaf-lists.";
26 reference
27 "RFC 7950: The YANG 1.1 Data Modeling Language";
28 }
29
30 revision 2016-02-11 {
31 description
32 "Initial revision";
33 reference
34 "RFC 6020: YANG - A Data Modeling Language for
35 the Network Configuration Protocol (NETCONF)";
36 }
37
38 md:annotation insert {
39 type enumeration {
40 enum first;
41 enum last;
42 enum before;
43 enum after;
44 }
45 reference "RFC7950 section 7.8.6. and section 7.7.9.";
46 description
47 "In user ordered leaf-list, the attribute can be used to control
48 where in the leaf-list the entry is inserted. It can be used during
49 the NETCONF <edit-config> \"create\" operations to insert a new list or
50 leaf-list entry, or during \"merge\" or \"replace\" operations to insert
51 a new list or leaf-list entry or move an existing one.
52
53 If the value is \"before\" or \"after\", the \"value\"/\"key\" attribute
54 MUST also be used to specify an existing entry in the list or leaf-list.
55
56 If no \"insert\" attribute is present in the \"create\" operation, it
57 defaults to \"last\".";
58 }
59
60 md:annotation value {
61 type string;
62 reference "RFC7950 section 7.7.9.";
63 description
64 "In user ordered leaf-list, the attribute must be used if the attribute
65 insert is used and specifies before/after which existing instance the
66 new instance should be inserted.";
67 }
68
69 md:annotation key {
70 type string;
71 reference "RFC7950 section 7.8.6.";
72 description
73 "In user ordered list, the attribute must be used if the attribute
74 insert is used and specifies before/after which existing instance the
75 new instance should be inserted.";
76 }
77}