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