Merge "OF plugin classes must have a strict dependency on Connection Service"
[controller.git] / opendaylight / sal / yang-prototype / model / model-topology / src / main / yang / topology.yang
1 module topology {
2     yang-version 1;
3     namespace "urn:ietf:params:xml:ns:yang:topology";
4     prefix "tp";
5
6     import ietf-inet-types { prefix "inet"; }
7     
8     organization "TBD";
9
10     contact "WILL-BE-DEFINED-LATER";
11
12     description "";
13     
14     revision 2013-06-11 {
15         description "Updated model with review comments. 
16             Removed top-level container network.
17             Moved network elements to separate module.";
18     }
19
20     typedef topology-id {
21         type inet:uri;
22     }
23
24     typedef node-id {
25         description "Node abstract identifier, schema for URI will be defined by augmentation";
26         type inet:uri;
27     }
28
29     typedef link-id {
30         description "Node abstract identifier, schema for URI will be defined by augmentation";
31         type inet:uri;
32     }
33
34     typedef tp-id {
35         type inet:uri;
36         description "identifier for termination points on a port";
37     }
38
39     typedef tp-ref {
40         type leafref {
41             path "/topologies/topology/nodes/node/termination-points/termination-point/tp-id";
42         }
43     }
44     typedef topology-ref {
45         type leafref {
46             path "/topologies/topology/topology-id";
47         }
48         description "This type is used for leafs that reference topology identifier instance.";
49         // currently not used
50     }
51
52     typedef node-ref {
53         type leafref {
54             path "/topologies/topology/nodes/node/node-id";
55         }
56         description "This type is used for leafs that reference a node instance.";
57     }
58
59     typedef link-ref {
60         type leafref {
61             path "/topologies/topology/links/link/link-id";
62         }
63         description "This type is used for leafs that reference a link instance.";
64         // currently not used
65     }
66
67     container topologies {
68         list topology {
69             description "
70                 This is the model of abstract topology which contains only Network
71                 Nodes and Network Links. Each topology MUST be identified by
72                 unique topology-id for reason that the store could contain many
73                 topologies.
74             ";
75             key "topology-id";
76             leaf topology-id {
77                 type topology-id; 
78                 description "
79                     It is presumed that datastore will contain many topologies. To
80                     distinguish between topologies it is vital to have UNIQUE
81                     topology identifier.
82                 ";
83             }
84
85             container types {
86                 description "
87                     The container for definition of topology types.
88                     The augmenting modules should add empty optional leaf 
89                     to this container to signalize topology type.
90                 ";
91             }
92
93             container nodes {
94                 list node {
95                     description "The list of network nodes defined for topology.";
96
97                     key "node-id";
98                     leaf node-id {
99                         type node-id;
100                         description "The Topology identifier of network-node.";
101                     }
102
103                     //leaf supporting-ne {
104                     //  type network-element-ref;
105                     //}
106                     
107                     container termination-points {
108                         list termination-point {
109                             key "tp-id";
110                             leaf tp-id {
111                                 type tp-id;
112                             }
113                         }
114                     }
115                 }
116             }
117     
118             container links {
119                 list link {
120                     description "
121                         The Network Link which is defined by Local (Source) and
122                         Remote (Destination) Network Nodes. Every link MUST be
123                         defined either by identifier and his local and remote
124                         Network Nodes (in real applications it is common that many
125                         links are originated from one node and end up in same
126                         remote node). To ensure that we would always know to
127                         distinguish between links, every link SHOULD have
128                         identifier.
129                     ";
130                     key "link-id";
131     
132                     leaf link-id {
133                         type link-id;
134                         description "";
135                     }
136
137                     container source { 
138                         leaf source-node {
139                             type node-ref;
140                             description "Source node identifier.";
141                         }
142                         leaf source-tp {
143                             type tp-ref;
144                         }
145                     }
146                 
147                     container destination { 
148                         leaf dest-node {
149                             type node-ref;
150                             description "Destination node identifier.";
151                         }
152                         leaf dest-tp {
153                             type tp-ref;
154                         }
155                     }
156                 }
157             }
158         }
159     }
160 }