Merge from development repository.
[controller.git] / opendaylight / sal / yang-prototype / code-generator / binding-generator-impl / 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 "Cisco";
7
8     contact "WILL-BE-DEFINED-LATER";
9
10     description "
11         This module contains the definitions of elements that creates network 
12         topology i.e. definition of network nodes and links. This module is
13         not designed to be used solely for network representation. This module
14         SHOULD be used as base module in defining the network topology.
15     ";
16
17     revision "2013-02-27" {
18         reference " WILL BE DEFINED LATER";
19     }
20
21     container list-parent-container {
22
23         list composite-key-list {
24             key "key1 key2";
25
26             leaf key1 {
27                 type int8;
28             }
29             
30             leaf key2 {
31                 type string;
32             }
33             
34             list inner-list {
35                 key "key1";
36                 
37                 leaf key1 {
38                     type uint16;
39                 }
40                 
41                 leaf foo {
42                     type int32;
43                 }
44             }
45             
46             leaf foo {
47                 type int32;
48             }
49         }
50         
51         list no-key-list {
52             leaf foo {
53                 type int32;
54             }
55             
56             leaf bar {
57                 type decimal64 {
58                     fraction-digits 2;
59                 }
60             }
61         }
62     }
63 }