Adjust test suite parser update to conform with API changes
[yangtools.git] / yang / yang-parser-impl / src / test / resources / semantic-statement-parser / types.yang
1 module custom-types-test {
2
3     yang-version 1;
4     namespace "urn:custom.types.demo";
5     prefix "iit";
6
7     organization "opendaylight";
8     contact "WILL-BE-DEFINED-LATER";
9         revision 2012-04-16 {
10     }
11
12     import identity-ref-test {
13             prefix "irt";
14     }
15
16     extension mountpoint {
17         description "enter point";
18         argument "name" {
19             yin-element "true";
20         }
21     }
22
23     typedef access-operations-type {
24         type bits {
25             bit create {
26                 description "Any protocol operation that creates a new data node.";
27             }
28             bit read {
29                 description "Any protocol operation or notification that returns the value of a data node.";
30                 position 500;
31             }
32             bit update {
33                 description "Any protocol operation that alters an existing data node.";
34             }
35             bit delete {
36                 description "Any protocol operation that removes a data node.";
37                 position 365;
38             }
39             bit exec {
40                 description "Execution access to the specified protocol operation.";
41             }
42         }
43         description "NETCONF Access Operation.";
44     }
45
46     leaf inst-id-leaf1 {
47         type instance-identifier {
48             require-instance false;
49         }
50         iit:mountpoint "mnt-extension";
51     }
52
53     leaf inst-id-leaf2 {
54         type instance-identifier;
55     }
56
57     leaf type {
58         type service-type-ref;
59     }
60
61     leaf type2 {
62         type service-type2-ref;
63     }
64
65     leaf type3 {
66         type service-type3-ref;
67     }
68
69     identity crypto-id {
70         base "crypto-base";
71         description "crypto-id description";
72         iit:mountpoint "mnt-extension";
73     }
74
75     identity crypto-base {
76         description "crypto-base description";
77     }
78
79     identity crypto-alg {
80         base "crypto-base";
81         description "crypto-alg description";
82     }
83
84     identity crypto-def {
85         base "crypto-base";
86         description "crypto-def description";
87     }
88
89     leaf mybits {
90         type bits {
91             bit disable-nagle {
92                 position 0;
93             }
94             bit auto-sense-speed {
95                 position 1;
96             }
97             bit 10-Mb-only {
98                 position 2;
99             }
100         }
101         default "auto-sense-speed";
102     }
103
104     typedef ip-version {
105         type enumeration {
106             enum unknown {
107                 description "An unknown or unspecified version of the Internet protocol.";
108             }
109             enum ipv4 {
110                 value "19";
111                 description "The IPv4 protocol as defined in RFC 791.";
112             }
113             enum ipv6 {
114                 value "7";
115                 description "The IPv6 protocol as defined in RFC 2460.";
116             }
117             enum default {
118                 description "default ip";
119             }
120         }
121     }
122
123     identity service-type {
124         description
125             "Service identity base type. All service identities must be
126              derived from this type. A service type uniquely defines a single
127              atomic API contract, such as a Java interface, a set of C
128              function declarations, or similar.
129
130              If the service type has a corresponding Java interface, the name
131              of that interface should be attached to the derived identity MUST
132              include a java-class keyword, whose name argument points to that
133              interface.";
134     }
135
136     typedef service-type-ref {
137         description
138             "Internal type of references to service type identity.";
139         type identityref {
140             base service-type;
141         }
142     }
143
144     typedef service-type2-ref {
145         description
146             "Internal type of references to service type2 identity.";
147         type identityref {
148             base irt:my-type;
149         }
150     }
151
152     typedef service-type3-ref {
153         description
154                 "Internal type of references to service type3 identity.";
155         type service-type-ref;
156     }
157
158 }