Fixed generation of Transfer Objects;
[controller.git] / opendaylight / sal / yang-prototype / code-generator / binding-java-api-generator / src / test / resources / list-composite-key.yang
1 module list-composite-key {
2     yang-version 1;
3     namespace "urn:composite.key";
4     prefix "scd";
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-27" {
17         reference " WILL BE DEFINED LATER";
18     }
19
20     container list-parent-container {
21
22         list composite-key-list {
23             key "key1 key2";
24
25             leaf key1 {
26                 type int8;
27             }
28             
29             leaf key2 {
30                 type string;
31             }
32             
33             list inner-list {
34                 key "key1";
35                 
36                 leaf key1 {
37                     type uint16;
38                 }
39                 
40                 leaf foo {
41                     type int32;
42                 }
43             }
44             
45             leaf foo {
46                 type int32;
47             }
48         }
49         
50         list no-key-list {
51             leaf foo {
52                 type int32;
53             }
54             
55             leaf bar {
56                 type decimal64 {
57                     fraction-digits 2;
58                 }
59             }
60         }
61     }
62 }