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 / demo-topology.yang
1 module demo-topology {
2         yang-version 1;
3     namespace "";
4     prefix "tp";
5
6     organization "OPEN DAYLIGHT";
7     contact "http://www.opendaylight.org/";
8
9     description "
10                 This module contains the definitions of elements that creates network 
11                 topology i.e. definition of network nodes and links. This module is
12                 not designed to be used solely for network representation. This module
13                 SHOULD be used as base module in defining the network topology.
14         ";
15
16     revision "2013-02-08"{
17                 reference " WILL BE DEFINED LATER";
18         }
19
20         container topology {
21         description "
22                         This is the model of abstract topology which contains only Network
23                         Nodes and Network Links. Each topology MUST be identified by
24                         unique topology-id for reason that the store could contain many
25                         topologies.
26                 ";
27
28         leaf topology-id {
29             type string;
30             description "
31                                 It is presumed that datastore will contain many topologies. To
32                                 distinguish between topologies it is vital to have UNIQUE
33                                 topology identifier.
34                         ";
35         }
36
37         container network-nodes {
38                 list network-node {
39                     description "The list of network nodes defined for topology.";
40
41                         key "node-id";
42
43                         leaf node-id {
44                                 type string;
45                                 description "The Topology identifier of network-node.";
46                         }
47                 
48                 list network-interface {
49                     key "interface-id";
50                     
51                     leaf interface-id {
52                         type uint8;
53                     }
54                     
55                     leaf interface-address {
56                         type string;
57                     }
58                 }
59                 
60                     container node-attributes {
61                                         description "
62                                                 Additional attributes that can Network Node contains.
63                                         ";
64
65                                         leaf geo-latitude {
66                                                 type decimal64 {
67                                                         fraction-digits 2;
68                                                 }
69                                                 config true;
70                                         }
71
72                                         leaf geo-longitude {
73                                                 type decimal64 {
74                                                         fraction-digits 2;
75                                                 }
76                                                 config true;
77                                         }
78                                 }
79                 }
80         }
81         
82         container network-links {
83                 list network-link {
84                     description "
85                                         The Network Link which is defined by Local (Source) and
86                                         Remote (Destination) Network Nodes. Every link MUST be
87                                         defined either by identifier and his local and remote
88                                         Network Nodes (in real applications it is common that many
89                                         links are originated from one node and end up in same
90                                         remote node). To ensure that we would always know to
91                                         distinguish between links, every link SHOULD have
92                                         identifier.
93                                 ";
94                         key "link-id";
95
96                         leaf link-id {
97                                 type string;
98                                 description "";
99                         }
100
101                     container source {
102                                         leaf node-id {
103                                                 type string;
104                                                 description "Source node identifier.";
105                                         }
106                                 }
107
108                                 container destination {
109                                         leaf node-id {
110                                                 type string;
111                                                 description "Destination node identifier.";
112                                         }
113                                 }
114
115                                 container link-attributes {
116                                         description "Aditional attributes that can Network Link contains.";
117                                 }
118                     }
119         }
120     }
121 }