Add method to register listener for unknown msg
[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 2013-07-15; }
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         status deprecated;
25     }
26
27     identity statistics-collection-service-impl {
28         description
29             "This is the definition of statistics collection module identity.";
30         base config:module-type;
31         config:provided-service openflow-switch-connection-provider:statistics-collection-service;
32         config:java-name-prefix StatisticsCollection;
33     }
34
35     augment "/config:modules/config:module/config:configuration" {
36         case openflow-switch-connection-provider-impl {
37             when "/config:modules/config:module/config:type = 'openflow-switch-connection-provider-impl'";
38
39             leaf use-barrier {
40                 description "Enable barrier in Openflow java";
41                 type boolean;
42                 default true;
43             }
44
45             leaf port {
46                 description "local listening port";
47                 type uint16;
48                 mandatory true;
49             }
50             leaf address {
51                 description "address of local listening interface";
52                 type ietf-inet:ip-address;
53             }
54             leaf transport-protocol {
55                 description "Transport protocol used for communication.";
56                 type of-config:transport-protocol;
57                 mandatory true;
58             }
59             leaf switch-idle-timeout {
60                 description "idle timeout in [ms]";
61                 type uint32;
62                 mandatory true;
63             }
64             container tls {
65                 leaf keystore {
66                     description "keystore location";
67                     type string;
68                 }
69                 leaf keystore-type {
70                     description "keystore type (JKS or PKCS12)";
71                     type of-config:keystore-type;
72                 }
73                 leaf keystore-path-type {
74                     description "keystore path type (CLASSPATH or PATH)";
75                     type of-config:path-type;
76                 }
77                 leaf keystore-password {
78                     description "password protecting keystore";
79                     type string;
80                 }
81                 leaf certificate-password {
82                     description "password protecting certificate";
83                     type string;
84                 }
85                 leaf truststore {
86                     description "truststore location";
87                     type string;
88                 }
89                 leaf truststore-type {
90                     description "truststore type (JKS or PKCS12)";
91                     type of-config:keystore-type;
92                 }
93                 leaf truststore-path-type {
94                     description "truststore path type (CLASSPATH or PATH)";
95                     type of-config:path-type;
96                 }
97                 leaf truststore-password {
98                     description "password protecting truststore";
99                     type string;
100                 }
101                 leaf-list cipher-suites {
102                     description "combination of cryptographic algorithms used by TLS connection";
103                     type string;
104                 }
105             }
106             container threads {
107                 leaf boss-threads {
108                     type uint16;
109                 }
110                 leaf worker-threads {
111                     type uint16;
112                 }
113             }
114         }
115
116         case statistics-collection-service-impl {
117             when "/config:modules/config:module/config:type = 'statistics-collection-service-impl'";
118
119             container statistics {
120                 leaf statistics-collect {
121                     description "Toggle statistics collecting";
122                     type boolean;
123                 }
124                 leaf log-report-delay {
125                     description "Delay between statistics logs";
126                     type uint16;
127                 }
128             }
129             list openflow-switch-connection-provider {
130                 uses config:service-ref {
131                     refine type {
132                         mandatory true;
133                         config:required-identity openflow-switch-connection-provider:openflow-switch-connection-provider;
134                     }
135                 }
136             }
137         }
138     }
139
140     augment "/config:modules/config:module/config:state" {
141         case statistics-collection-service-impl {
142             when "/config:modules/config:module/config:type = 'statistics-collection-service-impl'";
143
144             description
145                 "MXBean designed for Message Statistic providing to JConsole.";
146
147             leaf msgStatistics {
148                 type string;
149             }
150
151             rpcx:rpc-context-instance "print-ofjava-statistics-rpc";
152             rpcx:rpc-context-instance "reset-ofjava-statistics-rpc";
153         }
154     }
155
156     identity print-ofjava-statistics-rpc;
157     identity reset-ofjava-statistics-rpc;
158
159     rpc print-ofjava-statistics {
160         description
161             "Shortcut JMX call to printOfjavaStatistics.";
162         input {
163             uses rpcx:rpc-context-ref {
164                 refine context-instance {
165                     rpcx:rpc-context-instance print-ofjava-statistics-rpc;
166                 }
167             }
168         }
169         output {
170             leaf result {
171                 type string;
172             }
173         }
174     }
175
176     rpc reset-ofjava-statistics {
177         description
178             "Shortcut JMX call to resetOfjavaStatistics.";
179         input {
180             uses rpcx:rpc-context-ref {
181                 refine context-instance {
182                     rpcx:rpc-context-instance reset-ofjava-statistics-rpc;
183                 }
184             }
185         }
186         output {
187             leaf result {
188                 type string;
189             }
190         }
191     }
192 }