blob: b56f6cf4075ce45f76862adf3cace961a63989ff [file] [log] [blame]
sonu gupta1bb37b82016-11-11 16:51:18 +05301 module yms-ietf-network {
2 yang-version 1;
3 namespace "urn:ietf:params:xml:ns:yang:ietf-network";
4 prefix nd;
5
6 import yms-ietf-inet-types {
7 prefix inet;
8 }
9
10 organization
11 "IETF I2RS (Interface to the Routing System) Working Group";
12
13 contact
14 "WG Web: <http://tools.ietf.org/wg/i2rs/>
15 WG List: <mailto:i2rs@ietf.org>
16
17 WG Chair: Susan Hares
18 <mailto:shares@ndzh.com>
19
20 WG Chair: Jeffrey Haas
21 <mailto:jhaas@pfrc.org>
22
23 Editor: Alexander Clemm
24 <mailto:alex@cisco.com>
25
26 Editor: Jan Medved
27 <mailto:jmedved@cisco.com>
28
29 Editor: Robert Varga
30 <mailto:rovarga@cisco.com>
31
32 Editor: Tony Tkacik
33 <mailto:ttkacik@cisco.com>
34
35 Editor: Nitin Bahadur
36 <mailto:nitin_bahadur@yahoo.com>
37
38 Editor: Hariharan Ananthakrishnan
39 <mailto:hari@packetdesign.com>";
40
41 description
42 "This module defines a common base model for a collection
43 of nodes in a network. Node definitions are further used
44 in network topologies and inventories.
45
46 Copyright (c) 2015 IETF Trust and the persons identified as
47 authors of the code. All rights reserved.
48
49 Redistribution and use in source and binary forms, with or
50 without modification, is permitted pursuant to, and subject
51 to the license terms contained in, the Simplified BSD License
52 set forth in Section 4.c of the IETF Trust's Legal Provisions
53 Relating to IETF Documents
54 (http://trustee.ietf.org/license-info).
55
56 This version of this YANG module is part of
57 draft-ietf-i2rs-yang-network-topo-02;
58 see the RFC itself for full legal notices.
59
60 NOTE TO RFC EDITOR: Please replace above reference to
61 draft-ietf-i2rs-yang-network-topo-02 with RFC
62 number when published (i.e. RFC xxxx).";
63
64 revision 2015-12-08 {
65 description
66 "Initial revision.
67 NOTE TO RFC EDITOR: Please replace the following reference
68 to draft-ietf-i2rs-yang-network-topo-02 with
69 RFC number when published (i.e. RFC xxxx).";
70 reference
71 "draft-ietf-i2rs-yang-network-topo-02";
72 }
73
74 typedef node-id {
75 type inet:uri;
76 description
77 "Identifier for a node.";
78 }
79
80 typedef network-id {
81 type inet:uri;
82 description
83 "Identifier for a network.";
84 }
85 grouping network-ref {
86 description
87 "Contains the information necessary to reference a network,
88 for example an underlay network.";
89 leaf network-ref {
90 type leafref {
91 path "/nd:networks/nd:network/nd:network-id";
92 require-instance false;
93 }
94 description
95 "Used to reference a network, for example an underlay
96 network.";
97 }
98 }
99
100 grouping node-ref {
101 description
102 "Contains the information necessary to reference a node.";
103 leaf node-ref {
104 type leafref {
105 path "/nd:networks/nd:network[nd:network-id=current()/../"+
106 "network-ref]/nd:node/nd:node-id";
107 require-instance false;
108 }
109 description
110 "Used to reference a node.
111 Nodes are identified relative to the network they are
112 contained in.";
113 }
114 uses network-ref;
115 }
116
117 container networks {
118 description
119 "Serves as top-level container for a list of networks.";
120 list network {
121 key "network-id";
122 description
123 "Describes a network.
124 A network typically contains an inventory of nodes,
125 topological information (augmented through
126 network-topology model), as well as layering
127 information.";
128 container network-types {
129 description
130 "Serves as an augmentation target.
131 The network type is indicated through corresponding
132 presence containers augmented into this container.";
133 }
134 leaf network-id {
135 type inet:uri;
136 description
137 "Identifies a network.";
138 }
139 list supporting-network {
140 key "network-ref";
141 description
142 "An underlay network, used to represent layered network
143 topologies.";
144 leaf network-ref {
145 type leafref {
146 path "/networks/network/network-id";
147 require-instance false;
148 }
149 description
150 "References the underlay network.";
151 }
152 }
153 list node {
154 key "node-id";
155 description
156 "The inventory of nodes of this network.";
157 leaf node-id {
158 type node-id;
159 description
160 "Identifies a node uniquely within the containing
161 network.";
162 }
163 list supporting-node {
164 key "network-ref node-ref";
165 description
166 "Represents another node, in an underlay network, that
167 this node is supported by. Used to represent layering
168 structure.";
169 leaf network-ref {
170 type leafref {
171 path "../../../supporting-network/network-ref";
172 require-instance false;
173 }
174 description
175 "References the underlay network that the
176 underlay node is part of.";
177 }
178 leaf node-ref {
179 type leafref {
180 path "/networks/network/node/node-id";
181 require-instance false;
182 }
183 description
184 "References the underlay node itself.";
185 }
186 }
187 }
188 }
189 }
190 container networks-state {
191 config false;
192 description
193 "Serves as top-level container for a list of state information
194 for networks";
195 list network {
196 key "network-ref";
197 description
198 "Data nodes representing operational data and state of
199 networks.
200 An instance is automatically created for every network
201 in the corresponding list under the networks container.";
202 uses network-ref;
203 leaf server-provided {
204 type boolean;
205 description
206 "Indicates whether the information concerning this
207 particular network is populated by the server
208 (server-provided true, the general case for network
209 information discovered from the server),
210 or whether it is configured by a client
211 (server-provided true, possible e.g. for
212 service overlays managed through a controller).";
213 }
214 }
215 }
216 }