f38e3488cff82b387fd937e6ab25a7687820ce8e
[controller.git] / opendaylight / sal / yang-prototype / code-generator / yang-model-parser-impl / src / test / resources / model / testfile1.yang
1 module types1 {
2     yang-version 1;
3     namespace "urn:simple.container.demo";
4     prefix "t1";
5     
6     import types2 {
7          prefix "data";
8          revision-date 2013-02-27;
9      }
10     
11     organization "opendaylight";
12     contact "WILL-BE-DEFINED-LATER";
13     
14     revision "2013-02-27" {
15         reference " WILL BE DEFINED LATER";
16     }
17     
18     container interfaces {
19          list ifEntry {
20              key "ifIndex";
21
22              leaf ifIndex {
23                  type uint32;
24                  units minutes;
25              }
26              
27              leaf ifMtu {
28                  type int32;
29              }
30          }
31     }
32      
33     leaf testleaf {
34         type data:my-type1 {
35             range "min..max";
36         }
37     }
38     
39     leaf test-string-leaf {
40         type data:my-string-type-ext;
41     }
42     
43     leaf leaf-with-length {
44         type data:my-string-type {
45                 length "7..max";
46         }
47     }
48     
49     leaf test-int-leaf {
50         type data:my-int-type-ext;
51     }
52     
53     leaf test-decimal-leaf {
54         type data:my-decimal-type {
55             fraction-digits 4;
56         }
57     }
58     
59     leaf test-decimal-leaf2 {
60         type data:my-decimal-type-ext;
61     }
62     
63     container ext {
64         data:c-define "MY_INTERFACES";
65     }
66     
67     leaf union-leaf {
68         type data:my-union-ext;
69     }
70     
71     deviation /data:system/data:user {
72         deviate add {
73             default "admin"; // new users are 'admin' by default
74         }
75     }
76     
77     leaf nested-union-leaf {
78         type data:nested-union1;
79     }
80
81 }