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