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