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