1 // vi: set smarttab et sw=4 tabstop=4:
4 namespace "urn:opendaylight:params:xml:ns:yang:controller:config";
9 "This module contains the base YANG definitions for NS-OS
10 configuration subsystem. The system modeled revolves around two
11 major concepts: modules and services.";
13 revision "2013-04-05" {
15 "Reworked to give modules their own space.";
18 revision "2013-04-03" {
23 extension java-class {
25 "YANG language extension carrying the fully-qualified name of
26 a Java class. Code generation tools use the provided reference
27 to tie a specific construct to its Java representation.";
32 extension required-identity {
34 "YANG language extension which indicates that a particular
35 leafref, which points to a identityref, should additionally
36 require the target node is actually set to a descendant to
37 of a particular identity.
39 This is a workaround to two YANG deficiencies:
40 1) not being able to leafref instances of identityref
41 2) not being able to refine an identityref
43 This extension takes one argument, name, which MUST be the name
44 of an identity. Furthermore, that identity MUST be based,
45 directly or indirectly, on the identity, which is referenced by
46 the leaf reference, which is annotated with this extension.";
51 extension inner-state-bean {
53 "YANG language extension which indicates that a particular
54 list located under module's state should be treated as a list
55 of child state beans instead of just an ordinary list attribute";
58 extension provided-service {
60 "YANG language extension which indicates that a particular
61 module provides certain service. This extension can be placed
62 on identities that are based on module-type. Zero or more services
64 This extension takes one argument - name - which MUST be the name
65 of an identity. Furthermore, this identity MUST be based on
71 extension java-name-prefix {
73 "YANG language extension carrying java simple class name prefix
74 that will be taken into account when generating java code from
75 identities that are based on module-type.";
76 argument "java-prefix";
79 identity module-type {
81 "Module identity base type. All module identities must be derived
82 from this type. A module type uniquely defines a single atomic
83 component, such as an application. Each such component is assumed
84 to have its unique, stable and versioned configuration structure.";
87 identity service-type {
89 "Service identity base type. All service identities must be
90 derived from this type. A service type uniquely defines a single
91 atomic API contract, such as a Java interface, a set of C
92 function declarations, or similar.
94 If the service type has a corresponding Java interface, the name
95 of that interface should be attached to the derived identity MUST
96 include a java-class keyword, whose name argument points to that
100 typedef service-type-ref {
102 "Internal type of references to service type identity.";
109 grouping service-ref {
111 "Type of references to a particular service instance. This type
112 can be used when defining module configuration to refer to a
113 particular service instance. Containers using this grouping
114 should not define anything else. The run-time implementation
115 is expected to inject a reference to the service as the value
120 "Type of the service being referenced. Users of this grouping
121 should refine this leaf with required-identity pointing to
122 the actual service-type which is actually required.";
126 path "/config:services/config:service/config:type";
133 path "/config:services/config:service[config:type=current()/../type]/config:instance/config:name";
140 "Top level container encapsulating configuration of all modules.";
145 description "Unique module instance name";
157 choice configuration {
173 type service-type-ref;
184 path "/modules/module/name";