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