blob: 3080c9114f37a40e6e1d42e4740fa2196c851322 [file] [log] [blame]
Michal Vasko60ea6352020-06-29 13:39:39 +02001module ietf-origin {
2 yang-version 1.1;
3 namespace "urn:ietf:params:xml:ns:yang:ietf-origin";
4 prefix or;
5
6 import ietf-yang-metadata {
7 prefix md;
8 }
9
10 organization
11 "IETF Network Modeling (NETMOD) Working Group";
12
13 contact
14 "WG Web: <https://datatracker.ietf.org/wg/netmod/>
15
16 WG List: <mailto:netmod@ietf.org>
17
18 Author: Martin Bjorklund
19 <mailto:mbj@tail-f.com>
20
21 Author: Juergen Schoenwaelder
22 <mailto:j.schoenwaelder@jacobs-university.de>
23
24 Author: Phil Shafer
25 <mailto:phil@juniper.net>
26
27 Author: Kent Watsen
28 <mailto:kwatsen@juniper.net>
29
30 Author: Rob Wilton
31 <rwilton@cisco.com>";
32
33 description
34 "This YANG module defines an 'origin' metadata annotation and a
35 set of identities for the origin value.
36
37 Copyright (c) 2018 IETF Trust and the persons identified as
38 authors of the code. All rights reserved.
39
40 Redistribution and use in source and binary forms, with or
41 without modification, is permitted pursuant to, and subject to
42 the license terms contained in, the Simplified BSD License set
43 forth in Section 4.c of the IETF Trust's Legal Provisions
44 Relating to IETF Documents
45 (https://trustee.ietf.org/license-info).
46
47 This version of this YANG module is part of RFC 8342
48 (https://www.rfc-editor.org/info/rfc8342); see the RFC itself
49 for full legal notices.";
50
51 revision 2018-02-14 {
52 description
53 "Initial revision.";
54 reference
55 "RFC 8342: Network Management Datastore Architecture (NMDA)";
56 }
57
58 /*
59 * Identities
60 */
61
62 identity origin {
63 description
64 "Abstract base identity for the origin annotation.";
65 }
66
67 identity intended {
68 base origin;
69 description
70 "Denotes configuration from the intended configuration
71 datastore.";
72 }
73
74 identity dynamic {
75 base origin;
76 description
77 "Denotes configuration from a dynamic configuration
78 datastore.";
79 }
80
81 identity system {
82 base origin;
83 description
84 "Denotes configuration originated by the system itself.
85
86 Examples of system configuration include applied configuration
87 for an always-existing loopback interface, or interface
88 configuration that is auto-created due to the hardware
89 currently present in the device.";
90 }
91
92 identity learned {
93 base origin;
94 description
95 "Denotes configuration learned from protocol interactions with
96 other devices, instead of via either the intended
97 configuration datastore or any dynamic configuration
98 datastore.
99
100 Examples of protocols that provide learned configuration
101 include link-layer negotiations, routing protocols, and
102 DHCP.";
103 }
104
105 identity default {
106 base origin;
107 description
108 "Denotes configuration that does not have a configured or
109 learned value but has a default value in use. Covers both
110 values defined in a 'default' statement and values defined
111 via an explanation in a 'description' statement.";
112 }
113
114 identity unknown {
115 base origin;
116 description
117 "Denotes configuration for which the system cannot identify the
118 origin.";
119 }
120
121 /*
122 * Type definitions
123 */
124
125 typedef origin-ref {
126 type identityref {
127 base origin;
128 }
129 description
130 "An origin identity reference.";
131 }
132
133 /*
134 * Metadata annotations
135 */
136
137 md:annotation origin {
138 type origin-ref;
139 description
140 "The 'origin' annotation can be present on any configuration
141 data node in the operational state datastore. It specifies
142 from where the node originated. If not specified for a given
143 configuration data node, then the origin is the same as the
144 origin of its parent node in the data tree. The origin for
145 any top-level configuration data nodes must be specified.";
146 }
147}