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