Remove trailing whitespace
[openflowjava.git] / openflow-protocol-impl / src / main / yang / openflow-switch-connection-provider-impl.yang
1 module openflow-switch-connection-provider-impl {
2         yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:openflow:switch:connection:provider:impl";
4     prefix "openflow-switch-connection-provider-impl";
5
6     import config {prefix config; revision-date 2013-04-05; }
7     import openflow-switch-connection-provider {prefix openflow-switch-connection-provider; revision-date 2014-03-28; }
8     import ietf-inet-types {prefix ietf-inet; revision-date 2010-09-24; }
9     import openflow-configuration {prefix of-config; revision-date 2014-06-30; }
10     import rpc-context { prefix rpcx; revision-date 2013-06-17; }
11
12     description
13         "openflow-switch-connection-provider";
14
15     revision "2014-03-28" {
16         description
17             "Initial revision";
18     }
19
20     identity openflow-switch-connection-provider-impl {
21         base "config:module-type";
22         config:provided-service openflow-switch-connection-provider:openflow-switch-connection-provider;
23         config:java-name-prefix SwitchConnectionProvider;
24     }
25
26     identity statistics-collection-service-impl {
27         description
28             "This is the definition of statistics collection module identity.";
29         base config:module-type;
30         config:provided-service openflow-switch-connection-provider:statistics-collection-service;
31         config:java-name-prefix StatisticsCollection;
32     }
33
34     augment "/config:modules/config:module/config:configuration" {
35         case openflow-switch-connection-provider-impl {
36             when "/config:modules/config:module/config:type = 'openflow-switch-connection-provider-impl'";
37
38             leaf port {
39                 description "local listening port";
40                 type uint16;
41                 mandatory true;
42             }
43             leaf address {
44                 description "address of local listening interface";
45                 type ietf-inet:ip-address;
46             }
47             leaf transport-protocol {
48                 description "Transport protocol used for communication.";
49                 type of-config:transport-protocol;
50                 mandatory true;
51             }
52             leaf switch-idle-timeout {
53                 description "idle timeout in [ms]";
54                 type uint32;
55                 mandatory true;
56             }
57             container tls {
58                 leaf keystore {
59                     description "keystore location";
60                     type string;
61                 }
62                 leaf keystore-type {
63                     description "keystore type (JKS or PKCS12)";
64                     type of-config:keystore-type;
65                 }
66                 leaf keystore-path-type {
67                     description "keystore path type (CLASSPATH or PATH)";
68                     type of-config:path-type;
69                 }
70                 leaf keystore-password {
71                     description "password protecting keystore";
72                     type string;
73                 }
74                 leaf certificate-password {
75                     description "password protecting certificate";
76                     type string;
77                 }
78                 leaf truststore {
79                     description "truststore location";
80                     type string;
81                 }
82                 leaf truststore-type {
83                     description "truststore type (JKS or PKCS12)";
84                     type of-config:keystore-type;
85                 }
86                 leaf truststore-path-type {
87                     description "truststore path type (CLASSPATH or PATH)";
88                     type of-config:path-type;
89                 }
90                 leaf truststore-password {
91                     description "password protecting truststore";
92                     type string;
93                 }
94             }
95             container threads {
96                 leaf boss-threads {
97                     type uint16;
98                 }
99                 leaf worker-threads {
100                     type uint16;
101                 }
102             }
103         }
104
105         case statistics-collection-service-impl {
106             when "/config:modules/config:module/config:type = 'statistics-collection-service-impl'";
107
108             container statistics {
109                 leaf statistics-collect {
110                     description "Toggle statistics collecting";
111                     type boolean;
112                 }
113                 leaf log-report-delay {
114                     description "Delay between statistics logs";
115                     type uint16;
116                 }
117             }
118             list openflow-switch-connection-provider {
119                 uses config:service-ref {
120                     refine type {
121                         mandatory true;
122                         config:required-identity openflow-switch-connection-provider:openflow-switch-connection-provider;
123                     }
124                 }
125             }
126         }
127     }
128
129     augment "/config:modules/config:module/config:state" {
130         case statistics-collection-service-impl {
131             when "/config:modules/config:module/config:type = 'statistics-collection-service-impl'";
132
133             description
134                 "MXBean designed for Message Statistic providing to JConsole.";
135
136             leaf msgStatistics {
137                 type string;
138             }
139
140             rpcx:rpc-context-instance "print-ofjava-statistics-rpc";
141             rpcx:rpc-context-instance "reset-ofjava-statistics-rpc";
142         }
143     }
144
145     identity print-ofjava-statistics-rpc;
146     identity reset-ofjava-statistics-rpc;
147
148     rpc print-ofjava-statistics {
149         description
150             "Shortcut JMX call to printOfjavaStatistics.";
151         input {
152             uses rpcx:rpc-context-ref {
153                 refine context-instance {
154                     rpcx:rpc-context-instance print-ofjava-statistics-rpc;
155                 }
156             }
157         }
158         output {
159             leaf result {
160                 type string;
161             }
162         }
163     }
164
165     rpc reset-ofjava-statistics {
166         description
167             "Shortcut JMX call to resetOfjavaStatistics.";
168         input {
169             uses rpcx:rpc-context-ref {
170                 refine context-instance {
171                     rpcx:rpc-context-instance reset-ofjava-statistics-rpc;
172                 }
173             }
174         }
175         output {
176             leaf result {
177                 type string;
178             }
179         }
180     }
181 }