Refactor manotypes:vnf-configuration
[osm/IM.git] / models / yang / ietf-network.yang
1
2 /*
3  * NO RW COPYRIGHT
4  *
5  */
6
7 module ietf-network {
8   yang-version 1;
9   namespace "urn:ietf:params:xml:ns:yang:ietf-network";
10   prefix nd;
11
12   import ietf-inet-types {
13     prefix inet;
14   }
15
16   import rw-pb-ext {
17     prefix "rwpb";
18   }
19
20   organization "TBD";
21   contact
22     "WILL-BE-DEFINED-LATER";
23   description
24     "This module defines a common base model for a collection
25      of nodes in a network. Node definitions s are further used
26      in network topologies and inventories.";
27
28   revision 2015-06-08 {
29     description
30       "Initial revision.";
31     reference "draft-ietf-i2rs-yang-network-topo-01";
32   }
33
34   typedef node-id {
35     type inet:uri;
36     description
37       "Identifier for a node.";
38   }
39
40   typedef network-id {
41     type inet:uri;
42     description
43       "Identifier for a network.";
44   }
45
46   grouping network-ref {
47     description
48       "Contains the information necessary to reference a network,
49        for example an underlay network.";
50     leaf network-ref {
51       type leafref {
52         path "/network/network-id";
53       }
54       description
55         "Used to reference a network, for example an underlay
56          network.";
57     }
58   }
59
60   grouping node-ref {
61     description
62       "Contains the information necessary to reference a node.";
63     leaf node-ref {
64       type leafref {
65         path "/network[network-id=current()/../network-ref]"+
66           "/node/node-id";
67       }
68       description
69         "Used to reference a node.
70          Nodes are identified relative to the network they are
71          contained in.";
72     }
73     uses network-ref;
74   }
75
76   list network {
77     config false;
78     key "network-id";
79     description
80       "Describes a network.
81        A network typically contains an inventory of nodes,
82        topological information (augmented through
83        network-topology model), as well as layering
84        information.";
85     container network-types {
86       description
87         "Serves as an augmentation target.
88          The network type is indicated through corresponding
89          presence containers augmented into this container.";
90     }
91     leaf network-id {
92       type network-id;
93       description
94         "Identifies a network.";
95     }
96     leaf server-provided {
97       type boolean;
98       config false;
99       description
100         "Indicates whether the information concerning this
101          particular network is populated by the server
102          (server-provided true, the general case for network
103          information discovered from the server),
104          or whether it is configured by a client
105          (server-provided true, possible e.g. for
106          service overlays managed through a controller).";
107     }
108     list supporting-network {
109       key "network-ref";
110       description
111         "An underlay network, used to represent layered network
112          topologies.";
113
114       leaf network-ref {
115         type leafref {
116           path "/network/network-id";
117         }
118         description
119           "References the underlay network.";
120       }
121     }
122     list node {
123       key "node-id";
124       description
125         "The inventory of nodes of this network.";
126       leaf node-id {
127         type node-id;
128         description
129           "Identifies a node uniquely within the containing
130            network.";
131       }
132       list supporting-node {
133         key "network-ref node-ref";
134         description
135           "Represents another node, in an underlay network, that
136            this node is supported by.  Used to represent layering
137            structure.";
138         leaf network-ref {
139           type leafref {
140             path "../../../supporting-network/network-ref";
141           }
142           description
143             "References the underlay network that the
144              underlay node is part of.";
145         }
146         leaf node-ref {
147           type leafref {
148             path "/network/node/node-id";
149           }
150           description
151             "References the underlay node itself.";
152         }
153       }
154     }
155   }
156 }
157