Remove netconf from commons/opendaylight pom
[controller.git] / opendaylight / netconf / sal-netconf-connector / src / main / yang / odl-sal-netconf-connector-cfg.yang
1 module odl-sal-netconf-connector-cfg {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:controller:md:sal:connector:netconf";
4     prefix "sal-netconf";
5
6     import config { prefix config; revision-date 2013-04-05; }
7     import threadpool {prefix th;}
8     import netty {prefix netty;}
9     import opendaylight-md-sal-dom {prefix dom;}
10     import opendaylight-md-sal-binding {prefix md-sal-binding; revision-date 2013-10-28;}
11     import odl-netconf-cfg { prefix cfg-net; revision-date 2014-04-08; }
12     import ietf-inet-types {prefix inet; revision-date "2010-09-24";}
13
14     description
15         "Service definition for Binding Aware MD-SAL.";
16
17     revision "2013-10-28" {
18         description
19             "Initial revision";
20     }
21
22     identity sal-netconf-connector {
23         base config:module-type;
24         config:java-name-prefix NetconfConnector;
25     }
26
27     grouping server {
28         leaf address {
29             type string;
30         }
31
32         leaf port {
33             type uint32;
34         }
35     }
36
37     augment "/config:modules/config:module/config:configuration" {
38         case sal-netconf-connector {
39             when "/config:modules/config:module/config:type = 'sal-netconf-connector'";
40
41             leaf address {
42                 type inet:host;
43             }
44
45             leaf port {
46                 type inet:port-number;
47             }
48
49             leaf tcp-only {
50                 type boolean;
51             }
52
53             leaf username {
54                 type string;
55             }
56
57             leaf password {
58                 type string;
59             }
60
61             container yang-module-capabilities {
62                 leaf-list capability {
63                     type string;
64                     description "Set a list of capabilities to override capabilities provided in device's hello message.
65                                  Can be used for devices that do not report any yang modules in their hello message";
66                 }
67             }
68
69             leaf reconnect-on-changed-schema {
70                 type boolean;
71                 default false;
72                 description "If true, the connector would auto disconnect/reconnect when schemas are changed in the remote device.
73                              The connector subscribes (right after connect) to base netconf notifications and listens for netconf-capability-change notification";
74             }
75
76             container dom-registry {
77                 uses config:service-ref {
78                     refine type {
79                         mandatory true;
80                         config:required-identity dom:dom-broker-osgi-registry;
81                     }
82                 }
83             }
84
85             container binding-registry {
86                 uses config:service-ref {
87                     refine type {
88                         mandatory true;
89                         config:required-identity md-sal-binding:binding-broker-osgi-registry;
90                     }
91                 }
92             }
93
94             container event-executor {
95                 uses config:service-ref {
96                     refine type {
97                         mandatory true;
98                         config:required-identity netty:netty-event-executor;
99                     }
100                 }
101             }
102
103             container processing-executor {
104                 uses config:service-ref {
105                     refine type {
106                         mandatory true;
107                         config:required-identity th:threadpool;
108                     }
109                 }
110
111                 description "Makes up for flaws in netty threading design";
112             }
113
114             container client-dispatcher {
115                 uses config:service-ref {
116                     refine type {
117                         mandatory false;
118                         config:required-identity cfg-net:netconf-client-dispatcher;
119                     }
120                 }
121             }
122
123             leaf connection-timeout-millis {
124                 description "Specifies timeout in milliseconds after which connection must be established.";
125                 type uint32;
126                 default 20000;
127             }
128
129             leaf default-request-timeout-millis {
130                 description "Timeout for blocking operations within transactions.";
131                 type uint32;
132                 default 60000;
133             }
134
135             leaf max-connection-attempts {
136                 description "Maximum number of connection retries. Non positive value or null is interpreted as infinity.";
137                 type uint32;
138                 default 0; // retry forever
139             }
140
141             leaf between-attempts-timeout-millis {
142                 description "Initial timeout in milliseconds to wait between connection attempts. Will be multiplied by sleep-factor with every additional attempt";
143                 type uint16;
144                 default 2000;
145             }
146
147             leaf sleep-factor {
148                 type decimal64 {
149                     fraction-digits 1;
150                 }
151                 default 1.5;
152             }
153
154             // Keepalive configuration
155             leaf keepalive-delay {
156                 type uint32;
157                 default 120;
158                 description "Netconf connector sends keepalive RPCs while the session is idle, this delay specifies the delay between keepalive RPC in seconds
159                              If a value <1 is provided, no keepalives will be sent";
160             }
161
162             container keepalive-executor {
163                 uses config:service-ref {
164                     refine type {
165                         mandatory false;
166                         config:required-identity th:scheduled-threadpool;
167                     }
168                 }
169
170                 description "Dedicated solely to keepalive execution";
171             }
172         }
173     }
174 }