Merge "Fix upload size to be greater than 1MB"
[cps.git] / cps-service / src / test / resources / ietf / ietf-network-state@2018-02-26.yang
1 module ietf-network-state {
2   yang-version 1.1;
3   namespace "urn:ietf:params:xml:ns:yang:ietf-network-state";
4   prefix nw-s;
5
6   import ietf-network {
7     prefix nw;
8     reference
9       "RFC 8345: A YANG Data Model for Network Topologies";
10   }
11
12   organization
13     "IETF I2RS (Interface to the Routing System) Working Group";
14
15   contact
16     "WG Web:    <https://datatracker.ietf.org/wg/i2rs/>
17      WG List:   <mailto:i2rs@ietf.org>
18
19      Editor:    Alexander Clemm
20                 <mailto:ludwig@clemm.org>
21
22      Editor:    Jan Medved
23                 <mailto:jmedved@cisco.com>
24
25      Editor:    Robert Varga
26                 <mailto:robert.varga@pantheon.tech>
27
28      Editor:    Nitin Bahadur
29                 <mailto:nitin_bahadur@yahoo.com>
30      Editor:    Hariharan Ananthakrishnan
31                 <mailto:hari@packetdesign.com>
32
33      Editor:    Xufeng Liu
34                 <mailto:xufeng.liu.ietf@gmail.com>";
35
36   description
37     "This module defines a common base data model for a collection
38      of nodes in a network.  Node definitions are further used
39      in network topologies and inventories.  It represents
40      information that either (1) is learned and automatically
41      populated or (2) results from applying network information
42      that has been configured per the 'ietf-network' data model,
43      mirroring the corresponding data nodes in this data model.
44
45      The data model mirrors 'ietf-network' but contains only
46      read-only state data.  The data model is not needed when the
47      underlying implementation infrastructure supports the Network
48      Management Datastore Architecture (NMDA).
49
50      Copyright (c) 2018 IETF Trust and the persons identified as
51      authors of the code.  All rights reserved.
52
53      Redistribution and use in source and binary forms, with or
54      without modification, is permitted pursuant to, and subject
55      to the license terms contained in, the Simplified BSD License
56      set forth in Section 4.c of the IETF Trust's Legal Provisions
57      Relating to IETF Documents
58      (https://trustee.ietf.org/license-info).
59
60      This version of this YANG module is part of RFC 8345;
61      see the RFC itself for full legal notices.";
62
63   revision 2018-02-26 {
64     description
65       "Initial revision.";
66     reference
67       "RFC 8345: A YANG Data Model for Network Topologies";
68   }
69
70   grouping network-ref {
71     description
72       "Contains the information necessary to reference a network --
73        for example, an underlay network.";
74     leaf network-ref {
75       type leafref {
76         path "/nw-s:networks/nw-s:network/nw-s:network-id";
77       require-instance false;
78       }
79       description
80         "Used to reference a network -- for example, an underlay
81          network.";
82     }
83   }
84
85   grouping node-ref {
86     description
87       "Contains the information necessary to reference a node.";
88     leaf node-ref {
89       type leafref {
90         path "/nw-s:networks/nw-s:network[nw-s:network-id=current()"+
91           "/../network-ref]/nw-s:node/nw-s:node-id";
92         require-instance false;
93       }
94       description
95         "Used to reference a node.
96          Nodes are identified relative to the network that
97          contains them.";
98     }
99     uses network-ref;
100   }
101
102   container networks {
103     config false;
104     description
105       "Serves as a top-level container for a list of networks.";
106     list network {
107       key "network-id";
108       description
109         "Describes a network.
110          A network typically contains an inventory of nodes,
111          topological information (augmented through the
112          network-topology data model), and layering information.";
113       container network-types {
114         description
115           "Serves as an augmentation target.
116            The network type is indicated through corresponding
117            presence containers augmented into this container.";
118       }
119       leaf network-id {
120         type nw:network-id;
121         description
122           "Identifies a network.";
123       }
124       list supporting-network {
125         key "network-ref";
126         description
127           "An underlay network, used to represent layered network
128            topologies.";
129         leaf network-ref {
130           type leafref {
131             path "/nw-s:networks/nw-s:network/nw-s:network-id";
132           require-instance false;
133           }
134           description
135             "References the underlay network.";
136         }
137       }
138
139       list node {
140         key "node-id";
141         description
142           "The inventory of nodes of this network.";
143         leaf node-id {
144           type nw:node-id;
145           description
146             "Uniquely identifies a node within the containing
147              network.";
148         }
149         list supporting-node {
150           key "network-ref node-ref";
151           description
152             "Represents another node that is in an underlay network
153              and that supports this node.  Used to represent layering
154              structure.";
155           leaf network-ref {
156             type leafref {
157               path "../../../nw-s:supporting-network/nw-s:network-ref";
158             require-instance false;
159             }
160             description
161               "References the underlay network of which the
162                underlay node is a part.";
163           }
164           leaf node-ref {
165             type leafref {
166               path "/nw-s:networks/nw-s:network/nw-s:node/nw-s:node-id";
167             require-instance false;
168             }
169             description
170               "References the underlay node itself.";
171           }
172         }
173       }
174     }
175   }
176 }