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