Introduce top-level pom file.
[mdsal.git] / code-generator / maven-sal-api-gen-plugin / src / test / resources / wadl-gen / demo-topology.yang
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 module demo-topology {
9         yang-version 1;
10     namespace "urn:model.1demo-275topology.4.5.my";
11     prefix "tp";
12
13     organization "OPEN DAYLIGHT";
14     contact "http://www.opendaylight.org/";
15
16     description "
17                 This module contains the definitions of elements that creates network 
18                 topology i.e. definition of network nodes and links. This module is
19                 not designed to be used solely for network representation. This module
20                 SHOULD be used as base module in defining the network topology.
21         ";
22
23     revision "2013-02-08"{
24                 reference " WILL BE DEFINED LATER";
25         }
26
27         container topology {
28         description "
29                         This is the model of abstract topology which contains only Network
30                         Nodes and Network Links. Each topology MUST be identified by
31                         unique topology-id for reason that the store could contain many
32                         topologies.
33                 ";
34
35         leaf topology-id {
36             type string;
37             description "
38                                 It is presumed that datastore will contain many topologies. To
39                                 distinguish between topologies it is vital to have UNIQUE
40                                 topology identifier.
41                         ";
42         }
43
44         container network-nodes {
45                 list network-node {
46                     description "The list of network nodes defined for topology.";
47
48                         key "node-id";
49
50                         leaf node-id {
51                                 type string;
52                                 description "The Topology identifier of network-node.";
53                         }
54                 
55                 list network-interface {
56                     key "interface-id";
57                     
58                     leaf interface-id {
59                         type uint8;
60                     }
61                     
62                     leaf interface-address {
63                         type string;
64                     }
65                 }
66                 
67                     container node-attributes {
68                                         description "
69                                                 Additional attributes that can Network Node contains.
70                                         ";
71
72                                         leaf geo-latitude {
73                                                 type decimal64 {
74                                                         fraction-digits 2;
75                                                 }
76                                                 config true;
77                                         }
78
79                                         leaf geo-longitude {
80                                                 type decimal64 {
81                                                         fraction-digits 2;
82                                                 }
83                                                 config true;
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 string;
105                                 description "";
106                         }
107
108                     container source {
109                                         leaf node-id {
110                                                 type string;
111                                                 description "Source node identifier.";
112                                         }
113                                 }
114
115                                 container destination {
116                                         leaf node-id {
117                                                 type string;
118                                                 description "Destination node identifier.";
119                                         }
120                                 }
121
122                                 container link-attributes {
123                                         description "Aditional attributes that can Network Link contains.";
124                                 }
125                     }
126         }
127     }
128 }