Merge "BUG-868: Migrate to SchemaContextListener"
[controller.git] / opendaylight / md-sal / 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 dom-registry {
62                 uses config:service-ref {
63                     refine type {
64                         mandatory true;
65                         config:required-identity dom:dom-broker-osgi-registry;
66                     }
67                 }
68             }
69
70             container binding-registry {
71                 uses config:service-ref {
72                     refine type {
73                         mandatory true;
74                         config:required-identity md-sal-binding:binding-broker-osgi-registry;
75                     }
76                 }
77             }
78
79             container event-executor {
80                 uses config:service-ref {
81                     refine type {
82                         mandatory true;
83                         config:required-identity netty:netty-event-executor;
84                     }
85                 }
86             }
87
88             container processing-executor {
89                 uses config:service-ref {
90                     refine type {
91                         mandatory true;
92                         config:required-identity th:threadpool;
93                     }
94                 }
95
96                 description "Makes up for flaws in netty threading design";
97             }
98
99             container client-dispatcher {
100                 uses config:service-ref {
101                     refine type {
102                         mandatory false;
103                         config:required-identity cfg-net:netconf-client-dispatcher;
104                     }
105                 }
106             }
107
108             leaf connection-timeout-millis {
109                 description "Specifies timeout in milliseconds after which connection must be established.";
110                 type uint32;
111                 default 20000;
112             }
113
114             leaf max-connection-attempts {
115                 description "Maximum number of connection retries. Non positive value or null is interpreted as infinity.";
116                 type uint32;
117                 default 0; // retry forever
118             }
119
120             leaf between-attempts-timeout-millis {
121                 description "Initial timeout in milliseconds to wait between connection attempts. Will be multiplied by sleep-factor with every additional attempt";
122                 type uint16;
123                 default 2000;
124             }
125
126             leaf sleep-factor {
127                 type decimal64 {
128                     fraction-digits 1;
129                 }
130                 default 1.5;
131             }
132         }
133     }
134 }