Bug 6714 - Use singleton service in clustered netconf topology
[netconf.git] / netconf / netconf-topology / src / main / yang / clustered-netconf-topology.yang
1 module clustered-netconf-topology {
2
3     yang-version 1;
4     namespace "urn:opendaylight:params:xml:ns:yang:controller:clustered:netconf:topology";
5     prefix "nt";
6
7     import config { prefix config; revision-date 2013-04-05; }
8     import threadpool {prefix th;}
9     import netty {prefix netty;}
10     import opendaylight-md-sal-dom {prefix dom;}
11     import opendaylight-md-sal-binding {prefix md-sal-binding; revision-date 2013-10-28;}
12     import odl-netconf-cfg { prefix cfg-net; revision-date 2014-04-08; }
13     import shared-schema-repository { prefix sh; revision-date 2015-07-27; }
14     import netconf-topology { prefix topo; revision-date 2015-07-27; }
15     import opendaylight-entity-ownership-service { prefix eos; revision-date 2015-08-10; }
16     import actor-system-provider-service { prefix asp; revision-date 2015-10-05; }
17
18     description
19             "Module definition for Netconf topolgy. Netconf topology provides a set of common configuration ";
20
21     revision "2015-11-04" {
22         description
23             "Initial revision";
24     }
25
26     identity clustered-netconf-topology-impl {
27         base config:module-type;
28         config:java-name-prefix ClusteredNetconfTopology;
29         config:provided-service topo:netconf-topology;
30     }
31
32     augment "/config:modules/config:module/config:configuration" {
33         case clustered-netconf-topology-impl {
34             when "/config:modules/config:module/config:type = 'clustered-netconf-topology-impl'";
35
36             leaf topology-id {
37                 mandatory true;
38                 type string;
39             }
40
41             container dom-registry {
42                 uses config:service-ref {
43                     refine type {
44                         mandatory true;
45                         config:required-identity dom:dom-broker-osgi-registry;
46                     }
47                 }
48             }
49
50             container binding-registry {
51                 uses config:service-ref {
52                     refine type {
53                         mandatory true;
54                         config:required-identity md-sal-binding:binding-broker-osgi-registry;
55                     }
56                 }
57             }
58
59             container event-executor {
60                 uses config:service-ref {
61                     refine type {
62                         mandatory true;
63                         config:required-identity netty:netty-event-executor;
64                     }
65                 }
66             }
67
68             container processing-executor {
69                 uses config:service-ref {
70                     refine type {
71                         mandatory true;
72                         config:required-identity th:threadpool;
73                     }
74                 }
75
76                 description "Makes up for flaws in netty threading design";
77             }
78
79             container client-dispatcher {
80                 uses config:service-ref {
81                     refine type {
82                         mandatory false;
83                         config:required-identity cfg-net:netconf-client-dispatcher;
84                     }
85                 }
86             }
87
88             container keepalive-executor {
89                 uses config:service-ref {
90                     refine type {
91                         mandatory false;
92                         config:required-identity th:scheduled-threadpool;
93                     }
94                 }
95
96                 description "Dedicated solely to keepalive execution";
97             }
98
99             container shared-schema-repository {
100                 uses config:service-ref {
101                     refine type {
102                         mandatory true;
103                         config:required-identity sh:shared-schema-repository;
104                     }
105                 }
106             }
107
108             container entity-ownership-service {
109                 uses config:service-ref {
110                     refine type {
111                         mandatory true;
112                         config:required-identity eos:entity-ownership-service;
113                     }
114                 }
115             }
116
117             container actor-system-provider-service {
118                 uses config:service-ref {
119                     refine type {
120                         mandatory true;
121                         config:required-identity asp:actor-system-provider-service;
122                     }
123                 }
124             }
125         }
126     }
127 }