Initial opendaylight infrastructure commit!!
[controller.git] / opendaylight / sal / yang-prototype / code-generator / code-generator-demo / src / main / resources / demo / types1.yang
1 module types1 {
2         yang-version 1;
3     namespace "urn:simple.container.demo";
4     prefix "t1";
5     
6
7     organization "Cisco";
8
9     contact "WILL-BE-DEFINED-LATER";
10     
11     
12     leaf mybits {
13          type bits {
14              bit disable-nagle {
15                  position 0;
16              }
17              bit auto-sense-speed {
18                  position 1;
19              }
20              bit 10-Mb-only {
21                  position 2;
22              }
23          }
24          default "auto-sense-speed";
25      }
26     
27     container interfaces {
28          list ifEntry {
29              key "ifIndex";
30
31              leaf ifIndex {
32                  type uint32;
33              }
34              leaf ifDescr {
35                  type string;
36              }
37              leaf ifType {
38                  type uint8;
39              }
40              leaf ifMtu {
41                  type int32;
42              }
43          }
44      }
45     
46     
47         container topology {
48                 leaf name {
49                         type string;
50                 }
51         }
52         
53         
54         
55         
56         
57         
58         
59 //      typedef my-string {
60 //              type string {
61 //                      length "0..4";
62 //              pattern "[0-9a-fA-F]*";
63 //              }
64 //      }
65
66
67 //      leaf completed {
68 //              type types2:percent;
69 //  }
70
71 //      leaf testleaf {
72 //              type data:my-base-int32-type;
73 //      }
74
75 //      leaf-list domain-search {
76 //              type string;
77 //              description "List of domain names to search";
78 //      }
79         
80 }