Merge "OF plugin classes must have a strict dependency on Connection Service"
[controller.git] / opendaylight / sal / yang-prototype / code-generator / binding-java-api-generator / src / test / resources / abstract-topology.yang
1 // vi: set smarttab sw=4 tabstop=4:
2 module abstract-topology {
3         yang-version 1;
4     namespace "";
5     prefix "tp";
6
7         import ietf-inet-types { prefix "inet"; }
8     import abstract-prefixes { prefix "abs-pref"; }
9     
10         organization "OPEN DAYLIGHT";
11     contact "http://www.opendaylight.org/";
12
13     description "
14                 This module contains the definitions of elements that creates network 
15                 topology i.e. definition of network nodes and links. This module is
16                 not designed to be used solely for network representation. This module
17                 SHOULD be used as base module in defining the network topology.
18         ";
19
20     revision "2013-02-08" {
21                 reference " WILL BE DEFINED LATER";
22         }
23
24     revision "2013-03-08" {
25         reference " WILL BE DEFINED LATER";
26     }
27     
28     revision "2012-02-08" {
29         reference " WILL BE DEFINED LATER";
30     }
31
32     typedef topology-id-ref {
33         type leafref {
34                 path "/tp:topology/tp:topology-id";
35         }
36         description "This type is used for leafs that reference topology identifier instance.";
37     }
38
39         typedef network-node-id-ref {
40                 type leafref {
41                         path "/tp:topology/tp:network-nodes/tp:network-node/tp:node-id";
42                 }
43                 description "This type is used for leafs that reference network node instance.";
44         }
45
46         typedef link-id-ref {
47                 type leafref {
48                         path "/tp:topology/tp:network-links/tp:network-link/tp:link-id";
49                 }
50                 description "This type is used for leafs that reference network link instance.";
51         }
52
53         container topology {
54         description "
55                         This is the model of abstract topology which contains only Network
56                         Nodes and Network Links. Each topology MUST be identified by
57                         unique topology-id for reason that the store could contain many
58                         topologies.
59                 ";
60
61         leaf topology-id {
62             type inet:uri;
63             description "
64                                 It is presumed that datastore will contain many topologies. To
65                                 distinguish between topologies it is vital to have UNIQUE
66                                 topology identifier.
67                         ";
68         }
69
70         container network-nodes {
71                 list network-node {
72                     description "The list of network nodes defined for topology.";
73
74                         key "node-id";
75
76                         leaf node-id {
77                                 type inet:uri;
78                                 description "The Topology identifier of network-node.";
79                         }
80
81                     container attributes {
82                                         description "
83                                                 Additional attributes that can Network Node contains.
84                                         ";
85                                 }
86                 }
87         }
88         
89         container network-links {
90                 list network-link {
91                     description "
92                                         The Network Link which is defined by Local (Source) and
93                                         Remote (Destination) Network Nodes. Every link MUST be
94                                         defined either by identifier and his local and remote
95                                         Network Nodes (in real applications it is common that many
96                                         links are originated from one node and end up in same
97                                         remote node). To ensure that we would always know to
98                                         distinguish between links, every link SHOULD have
99                                         identifier.
100                                 ";
101                         key "link-id";
102
103                         leaf link-id {
104                                 type inet:uri;
105                                 description "";
106                         }
107
108                     container source {
109                                         leaf node-id {
110                                                 type node-id-ref;
111                                                 description "Source node identifier.";
112                                         }
113                                 }
114
115                                 container destination {
116                                         leaf node-id {
117                                                 type node-id-ref;
118                                                 description "Destination node identifier.";
119                                         }
120                                 }
121
122                                 container attributes {
123                                         description "Aditional attributes that can Network Link contains.";
124                                 }
125                     }
126         }
127     }
128
129     //TODO: add base operations
130 }