Bug 3067: Fixed missing argument in message.
[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     extension mountpoint {
13         description "enter point";
14         argument "name" {
15             yin-element "true";
16         }
17     }
18
19     typedef access-operations-type {
20         type bits {
21             bit create {
22                 description "Any protocol operation that creates a new data node.";
23             }
24             bit read {
25                 description "Any protocol operation or notification that returns the value of a data node.";
26                 position 500;
27             }
28             bit update {
29                 description "Any protocol operation that alters an existing data node.";
30             }
31             bit delete {
32                 description "Any protocol operation that removes a data node.";
33                 position 365;
34             }
35             bit exec {
36                 description "Execution access to the specified protocol operation.";
37             }
38         }
39         description "NETCONF Access Operation.";
40     }
41
42     leaf inst-id-leaf1 {
43         type instance-identifier {
44             require-instance false;
45         }
46         iit:mountpoint "mnt-extension";
47     }
48
49     leaf inst-id-leaf2 {
50         type instance-identifier;
51     }
52
53     leaf type {
54         type service-type-ref;
55     }
56
57     identity crypto-id {
58         base "crypto-base";
59         description "crypto-id description";
60         iit:mountpoint "mnt-extension";
61     }
62
63     identity crypto-base {
64         description "crypto-base description";
65     }
66
67     identity crypto-alg {
68         base "crypto-base";
69         description "crypto-alg description";
70     }
71
72     identity crypto-def {
73         base "crypto-base";
74         description "crypto-def description";
75     }
76
77     leaf mybits {
78         type bits {
79             bit disable-nagle {
80                 position 0;
81             }
82             bit auto-sense-speed {
83                 position 1;
84             }
85             bit 10-Mb-only {
86                 position 2;
87             }
88         }
89         default "auto-sense-speed";
90     }
91
92     typedef ip-version {
93         type enumeration {
94             enum unknown {
95                 description "An unknown or unspecified version of the Internet protocol.";
96             }
97             enum ipv4 {
98                 value "19";
99                 description "The IPv4 protocol as defined in RFC 791.";
100             }
101             enum ipv6 {
102                 value "7";
103                 description "The IPv6 protocol as defined in RFC 2460.";
104             }
105             enum default {
106                 description "default ip";
107             }
108         }
109     }
110
111     identity service-type {
112         description
113             "Service identity base type. All service identities must be
114              derived from this type. A service type uniquely defines a single
115              atomic API contract, such as a Java interface, a set of C
116              function declarations, or similar.
117
118              If the service type has a corresponding Java interface, the name
119              of that interface should be attached to the derived identity MUST
120              include a java-class keyword, whose name argument points to that
121              interface.";
122     }
123
124     typedef service-type-ref {
125         description
126             "Internal type of references to service type identity.";
127         type identityref {
128             base service-type;
129         }
130     }
131
132 }