Adjust test suite parser update to conform with API changes
[yangtools.git] / yang / yang-parser-rfc7950 / src / test / resources / semantic-statement-parser / yin / modules / config.yin
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <module name="config"\r
3         xmlns="urn:ietf:params:xml:ns:yang:yin:1"\r
4         xmlns:config="urn:opendaylight:params:xml:ns:yang:controller:config">\r
5   <yang-version value="1"/>\r
6   <namespace uri="urn:opendaylight:params:xml:ns:yang:controller:config"/>\r
7   <prefix value="config"/>\r
8   <description>\r
9     <text>This module contains the base YANG definitions for NS-OS\r
10 configuration subsystem. The system modeled revolves around two\r
11 major concepts: modules and services.</text>\r
12   </description>\r
13   <revision date="2013-04-05">\r
14     <description>\r
15       <text>Reworked to give modules their own space.</text>\r
16     </description>\r
17   </revision>\r
18   <revision date="2013-04-03">\r
19     <description>\r
20       <text>Initial revision.</text>\r
21     </description>\r
22   </revision>\r
23   <extension name="java-class">\r
24     <description>\r
25       <text>YANG language extension carrying the fully-qualified name of\r
26 a Java class. Code generation tools use the provided reference\r
27 to tie a specific construct to its Java representation.</text>\r
28     </description>\r
29     <argument name="name"/>\r
30   </extension>\r
31   <extension name="required-identity">\r
32     <description>\r
33       <text>YANG language extension which indicates that a particular\r
34 leafref, which points to a identityref, should additionally\r
35 require the target node is actually set to a descendant to\r
36 of a particular identity.\r
37 \r
38 This is a workaround to two YANG deficiencies:\r
39 1) not being able to leafref instances of identityref\r
40 2) not being able to refine an identityref\r
41 \r
42 This extension takes one argument, name, which MUST be the name\r
43 of an identity. Furthermore, that identity MUST be based,\r
44 directly or indirectly, on the identity, which is referenced by\r
45 the leaf reference, which is annotated with this extension.</text>\r
46     </description>\r
47     <argument name="name"/>\r
48   </extension>\r
49   <extension name="inner-state-bean">\r
50     <description>\r
51       <text>YANG language extension which indicates that a particular\r
52 list located under module's state should be treated as a list\r
53 of child state beans instead of just an ordinary list attribute</text>\r
54     </description>\r
55   </extension>\r
56   <extension name="provided-service">\r
57     <description>\r
58       <text>YANG language extension which indicates that a particular\r
59 module provides certain service. This extension can be placed\r
60 on identities that are based on module-type. Zero or more services\r
61 can be provided.\r
62 This extension takes one argument - name - which MUST be the name\r
63 of an identity. Furthermore, this identity MUST be based on\r
64 service-type.</text>\r
65     </description>\r
66     <argument name="name"/>\r
67   </extension>\r
68   <extension name="java-name-prefix">\r
69     <description>\r
70       <text>YANG language extension carrying java simple class name prefix\r
71 that will be taken into account when generating java code from\r
72 identities that are based on module-type.</text>\r
73     </description>\r
74     <argument name="java-prefix"/>\r
75   </extension>\r
76   <identity name="module-type">\r
77     <description>\r
78       <text>Module identity base type. All module identities must be derived\r
79 from this type. A module type uniquely defines a single atomic\r
80 component, such as an application. Each such component is assumed\r
81 to have its unique, stable and versioned configuration structure.</text>\r
82     </description>\r
83   </identity>\r
84   <identity name="service-type">\r
85     <description>\r
86       <text>Service identity base type. All service identities must be\r
87 derived from this type. A service type uniquely defines a single\r
88 atomic API contract, such as a Java interface, a set of C\r
89 function declarations, or similar.\r
90 \r
91 If the service type has a corresponding Java interface, the name\r
92 of that interface should be attached to the derived identity MUST\r
93 include a java-class keyword, whose name argument points to that\r
94 interface.</text>\r
95     </description>\r
96   </identity>\r
97   <typedef name="service-type-ref">\r
98     <description>\r
99       <text>Internal type of references to service type identity.</text>\r
100     </description>\r
101     <type name="identityref">\r
102       <base name="service-type"/>\r
103     </type>\r
104   </typedef>\r
105   <grouping name="service-ref">\r
106     <description>\r
107       <text>Type of references to a particular service instance. This type\r
108 can be used when defining module configuration to refer to a\r
109 particular service instance. Containers using this grouping\r
110 should not define anything else. The run-time implementation\r
111 is expected to inject a reference to the service as the value\r
112 of the container.</text>\r
113     </description>\r
114     <leaf name="type">\r
115       <description>\r
116         <text>Type of the service being referenced. Users of this grouping\r
117 should refine this leaf with required-identity pointing to\r
118 the actual service-type which is actually required.</text>\r
119       </description>\r
120       <mandatory value="true"/>\r
121       <type name="service-type-ref"/>\r
122     </leaf>\r
123     <leaf name="name">\r
124       <mandatory value="true"/>\r
125       <type name="leafref">\r
126         <path value="/config:services/config:service[config:type=current()/../type]/config:instance/config:name"/>\r
127       </type>\r
128     </leaf>\r
129   </grouping>\r
130   <container name="modules">\r
131     <description>\r
132       <text>Top level container encapsulating configuration of all modules.</text>\r
133     </description>\r
134     <list name="module">\r
135       <key value="name"/>\r
136       <leaf name="name">\r
137         <description>\r
138           <text>Unique module instance name</text>\r
139         </description>\r
140         <type name="string"/>\r
141         <mandatory value="true"/>\r
142       </leaf>\r
143       <leaf name="type">\r
144         <type name="identityref">\r
145           <base name="module-type"/>\r
146         </type>\r
147         <mandatory value="true"/>\r
148       </leaf>\r
149       <choice name="configuration">\r
150         <mandatory value="true"/>\r
151         <config value="true"/>\r
152       </choice>\r
153       <choice name="state">\r
154         <config value="false"/>\r
155       </choice>\r
156     </list>\r
157   </container>\r
158   <container name="services">\r
159     <list name="service">\r
160       <key value="type"/>\r
161       <leaf name="type">\r
162         <type name="service-type-ref"/>\r
163       </leaf>\r
164       <list name="instance">\r
165         <key value="name"/>\r
166         <leaf name="name">\r
167           <type name="string"/>\r
168         </leaf>\r
169         <leaf name="provider">\r
170           <mandatory value="true"/>\r
171           <type name="leafref">\r
172             <path value="/modules/module/name"/>\r
173           </type>\r
174         </leaf>\r
175       </list>\r
176     </list>\r
177   </container>\r
178 </module>\r