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 disable-osgi-service-registration {
34 "YANG language extension that can be associated with a Service identity that
35 disables advertising the service instances to the OSGi registry.";
38 extension required-identity {
40 "YANG language extension which indicates that a particular
41 leafref, which points to a identityref, should additionally
42 require the target node is actually set to a descendant to
43 of a particular identity.
45 This is a workaround to two YANG deficiencies:
46 1) not being able to leafref instances of identityref
47 2) not being able to refine an identityref
49 This extension takes one argument, name, which MUST be the name
50 of an identity. Furthermore, that identity MUST be based,
51 directly or indirectly, on the identity, which is referenced by
52 the leaf reference, which is annotated with this extension.";
57 extension inner-state-bean {
59 "YANG language extension which indicates that a particular
60 list located under module's state should be treated as a list
61 of child state beans instead of just an ordinary list attribute";
64 extension provided-service {
66 "YANG language extension which indicates that a particular
67 module provides certain service. This extension can be placed
68 on identities that are based on module-type. Zero or more services
70 This extension takes one argument - name - which MUST be the name
71 of an identity. Furthermore, this identity MUST be based on
77 extension java-name-prefix {
79 "YANG language extension carrying java simple class name prefix
80 that will be taken into account when generating java code from
81 identities that are based on module-type.";
82 argument "java-prefix";
85 identity module-type {
87 "Module identity base type. All module identities must be derived
88 from this type. A module type uniquely defines a single atomic
89 component, such as an application. Each such component is assumed
90 to have its unique, stable and versioned configuration structure.";
93 identity service-type {
95 "Service identity base type. All service identities must be
96 derived from this type. A service type uniquely defines a single
97 atomic API contract, such as a Java interface, a set of C
98 function declarations, or similar.
100 If the service type has a corresponding Java interface, the name
101 of that interface should be attached to the derived identity MUST
102 include a java-class keyword, whose name argument points to that
106 typedef service-type-ref {
108 "Internal type of references to service type identity.";
115 grouping service-ref {
117 "Type of references to a particular service instance. This type
118 can be used when defining module configuration to refer to a
119 particular service instance. Containers using this grouping
120 should not define anything else. The run-time implementation
121 is expected to inject a reference to the service as the value
126 "Type of the service being referenced. Users of this grouping
127 should refine this leaf with required-identity pointing to
128 the actual service-type which is actually required.";
132 path "/config:services/config:service/config:type";
139 path "/config:services/config:service[config:type=current()/../type]/config:instance/config:name";
146 "Top level container encapsulating configuration of all modules.";
151 description "Unique module instance name";
163 choice configuration {
179 type service-type-ref;
190 path "/modules/module/name";