Merge "Improve netconf negotiator messages"
[controller.git] / opendaylight / config / config-module-archetype / src / main / resources / archetype-resources / src / main / yang / __module-name__-impl.yang
1 // vi: set smarttab et sw=4 tabstop=4:
2 module ${module-name}-${module-implementation-name} {
3
4     yang-version 1;
5     namespace "urn:opendaylight:params:xml:ns:yang:controller:config:${module-name}:${module-implementation-name}";
6     prefix "${module-name}-${module-implementation-name}";
7
8     import config { prefix config; revision-date ${config-api-yang-revision}; }
9     import ${module-name} { prefix ${module-name}; revision-date ${revision}; }
10
11     description
12         "This module contains the base YANG definitions for
13         ${module-name} ${module-implementation-name} implementation.";
14
15     revision "${revision}" {
16         description
17             "Initial revision.";
18     }
19
20     // This is the definition of a service implementation
21     identity ${module-name}-${module-implementation-name} {
22             base config:module-type;
23             config:provided-service ${module-name}:${module-name};
24             config:java-name-prefix ${module-name-java-prefix};
25     }
26
27     augment "/config:modules/config:module/config:configuration" {
28         case ${module-name}-${module-implementation-name} {
29             when "/config:modules/config:module/config:type = '${module-name}-${module-implementation-name}'";
30
31             leaf simple-attribute {
32                 type uint32;
33             }
34
35             container dto-attribute {
36                 leaf inner-attribute {
37                     type string;
38                 }
39             }
40
41             // Dependency attribute demonstration, the config:required-identity points to a service type
42             // In this case it is the same service type as this implementation provides: ${module-name}
43             container dependency-attribute {
44                 uses config:service-ref {
45                     refine type {
46                         mandatory false;
47                         config:required-identity ${module-name}:${module-name};
48                     }
49                 }
50             }
51
52         }
53     }
54 }