blob: 73d7ca1eab1f2be7b533a411cb9bad9ce45d41e4 [file] [log] [blame]
lishuai2ddc4692015-07-31 15:15:16 +08001package org.onosproject.ovsdb.rfc.table;
2
3import java.util.Map;
4import java.util.Set;
5
6import org.onosproject.ovsdb.rfc.notation.Column;
7import org.onosproject.ovsdb.rfc.notation.Row;
8import org.onosproject.ovsdb.rfc.notation.UUID;
9import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
10import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService;
11import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
12
13/**
14 * This class provides operations of Open_vSwitch Table.
15 */
16public class OpenVSwitch extends AbstractOvsdbTableService {
17
18 /**
19 * OpenVSwitch table column name.
20 */
21 public enum OpenVSwitchColumn {
22 BRIDGES("bridges"), MANAGERS("managers"),
23 MANAGEROPTIONS("manager_options"), SSL("ssl"),
24 OTHERCONFIG("other_config"), EXTERNALIDS("external_ids"),
25 NEXTCFG("next_cfg"), CURCFG("cur_cfg"), CAPABILITIES("capabilities"),
26 STATISTICS("statistics"), OVSVERSION("ovs_version"),
27 DBVERSION("db_version"), SYSTEMTYPE("system_type"),
28 SYSTEMVERSION("system_version");
29
30 private final String columnName;
31
32 private OpenVSwitchColumn(String columnName) {
33 this.columnName = columnName;
34 }
35
36 /**
37 * Returns the table column name for OpenVSwitchColumn.
38 * @return the table column name
39 */
40 public String columnName() {
41 return columnName;
42 }
43 }
44
45 /**
46 * Constructs a OpenVSwitch object. Generate Open_vSwitch Table Description.
47 * @param dbSchema DatabaseSchema
48 * @param row Row
49 */
50 public OpenVSwitch(DatabaseSchema dbSchema, Row row) {
51 super(dbSchema, row, OvsdbTable.OPENVSWITCH, VersionNum.VERSION100);
52 }
53
54 /**
55 * Get the Column entity which column name is "bridges" from the Row entity
56 * of attributes.
57 * @return the Column entity which column name is "bridges"
58 */
59 public Column getBridgesColumn() {
60 ColumnDescription columndesc = new ColumnDescription(
61 OpenVSwitchColumn.BRIDGES
62 .columnName(),
63 "getBridgesColumn",
64 VersionNum.VERSION100);
65 return (Column) super.getColumnHandler(columndesc);
66 }
67
68 /**
69 * Add a Column entity which column name is "bridges" to the Row entity of
70 * attributes.
71 * @param bridges the column data which column name is "bridges"
72 */
73 public void setBridges(Set<UUID> bridges) {
74 ColumnDescription columndesc = new ColumnDescription(
75 OpenVSwitchColumn.BRIDGES
76 .columnName(),
77 "setBridges",
78 VersionNum.VERSION100);
79 super.setDataHandler(columndesc, bridges);
80 }
81
82 /**
83 * Get the Column entity which column name is "managers" from the Row entity
84 * of attributes.
85 * @return the Column entity which column name is "managers"
86 */
87 public Column getManagersColumn() {
88 ColumnDescription columndesc = new ColumnDescription(
89 OpenVSwitchColumn.MANAGERS
90 .columnName(),
91 "getManagersColumn",
92 VersionNum.VERSION100,
93 VersionNum.VERSION200);
94 return (Column) super.getDataHandler(columndesc);
95 }
96
97 /**
98 * Add a Column entity which column name is "managers" to the Row entity of
99 * attributes.
100 * @param managers the column data which column name is "managers"
101 */
102 public void setManagers(Set<UUID> managers) {
103 ColumnDescription columndesc = new ColumnDescription(
104 OpenVSwitchColumn.MANAGERS
105 .columnName(),
106 "setManagers",
107 VersionNum.VERSION100,
108 VersionNum.VERSION200);
109 super.setDataHandler(columndesc, managers);
110 }
111
112 /**
113 * Get the Column entity which column name is "manager_options" from the Row
114 * entity of attributes.
115 * @return the Column entity which column name is "manager_options"
116 */
117 public Column getManagerOptionsColumn() {
118 ColumnDescription columndesc = new ColumnDescription(
119 OpenVSwitchColumn.MANAGEROPTIONS
120 .columnName(),
121 "getManagerOptionsColumn",
122 VersionNum.VERSION100);
123 return (Column) super.getDataHandler(columndesc);
124 }
125
126 /**
127 * Add a Column entity which column name is "manager_options" to the Row
128 * entity of attributes.
129 * @param managerOptions the column data which column name is
130 * "manager_options"
131 */
132 public void setManagerOptions(Set<UUID> managerOptions) {
133 ColumnDescription columndesc = new ColumnDescription(
134 OpenVSwitchColumn.MANAGEROPTIONS
135 .columnName(),
136 "setManagerOptions",
137 VersionNum.VERSION100);
138 super.setDataHandler(columndesc, managerOptions);
139 }
140
141 /**
142 * Get the Column entity which column name is "ssl" from the Row entity of
143 * attributes.
144 * @return the Column entity which column name is "ssl"
145 */
146 public Column getSslColumn() {
147 ColumnDescription columndesc = new ColumnDescription(
148 OpenVSwitchColumn.SSL
149 .columnName(),
150 "getSslColumn",
151 VersionNum.VERSION100);
152 return (Column) super.getDataHandler(columndesc);
153 }
154
155 /**
156 * Add a Column entity which column name is "ssl" to the Row entity of
157 * attributes.
158 * @param ssl the column data which column name is "ssl"
159 */
160 public void setSsl(Set<UUID> ssl) {
161 ColumnDescription columndesc = new ColumnDescription(
162 OpenVSwitchColumn.SSL
163 .columnName(),
164 "setSsl",
165 VersionNum.VERSION100);
166 super.setDataHandler(columndesc, ssl);
167 }
168
169 /**
170 * Get the Column entity which column name is "other_config" from the Row
171 * entity of attributes.
172 * @return the Column entity which column name is "other_config"
173 */
174 public Column getOtherConfigColumn() {
175 ColumnDescription columndesc = new ColumnDescription(
176 OpenVSwitchColumn.OTHERCONFIG
177 .columnName(),
178 "getOtherConfigColumn",
179 VersionNum.VERSION510);
180 return (Column) super.getColumnHandler(columndesc);
181 }
182
183 /**
184 * Add a Column entity which column name is "other_config" to the Row entity
185 * of attributes.
186 * @param otherConfig the column data which column name is "other_config"
187 */
188 public void setOtherConfig(Map<String, String> otherConfig) {
189 ColumnDescription columndesc = new ColumnDescription(
190 OpenVSwitchColumn.OTHERCONFIG
191 .columnName(),
192 "setOtherConfig",
193 VersionNum.VERSION510);
194 super.setDataHandler(columndesc, otherConfig);
195 }
196
197 /**
198 * Get the Column entity which column name is "external_ids" from the Row
199 * entity of attributes.
200 * @return the Column entity which column name is "external_ids"
201 */
202 public Column getExternalIdsColumn() {
203 ColumnDescription columndesc = new ColumnDescription(
204 OpenVSwitchColumn.EXTERNALIDS
205 .columnName(),
206 "getExternalIdsColumn",
207 VersionNum.VERSION100);
208 return (Column) super.getColumnHandler(columndesc);
209 }
210
211 /**
212 * Add a Column entity which column name is "external_ids" to the Row entity
213 * of attributes.
214 * @param externalIds the column data which column name is "external_ids"
215 */
216 public void setExternalIds(Map<String, String> externalIds) {
217 ColumnDescription columndesc = new ColumnDescription(
218 OpenVSwitchColumn.EXTERNALIDS
219 .columnName(),
220 "setExternalIds",
221 VersionNum.VERSION100);
222 super.setDataHandler(columndesc, externalIds);
223 }
224
225 /**
226 * Get the Column entity which column name is "next_cfg" from the Row entity
227 * of attributes.
228 * @return the Column entity which column name is "next_cfg"
229 */
230 public Column getNextConfigColumn() {
231 ColumnDescription columndesc = new ColumnDescription(
232 OpenVSwitchColumn.NEXTCFG
233 .columnName(),
234 "getNextConfigColumn",
235 VersionNum.VERSION100);
236 return (Column) super.getColumnHandler(columndesc);
237 }
238
239 /**
240 * Add a Column entity which column name is "next_cfg" to the Row entity of
241 * attributes.
242 * @param nextConfig the column data which column name is "next_cfg"
243 */
244 public void setNextConfig(Long nextConfig) {
245 ColumnDescription columndesc = new ColumnDescription(
246 OpenVSwitchColumn.NEXTCFG
247 .columnName(),
248 "setNextConfig",
249 VersionNum.VERSION100);
250 super.setDataHandler(columndesc, nextConfig);
251 }
252
253 /**
254 * Get the Column entity which column name is "cur_cfg" from the Row entity
255 * of attributes.
256 * @return the Column entity which column name is "cur_cfg"
257 */
258 public Column getCurrentConfigColumn() {
259 ColumnDescription columndesc = new ColumnDescription(
260 OpenVSwitchColumn.CURCFG
261 .columnName(),
262 "getCurrentConfigColumn",
263 VersionNum.VERSION100);
264 return (Column) super.getColumnHandler(columndesc);
265 }
266
267 /**
268 * Add a Column entity which column name is "cur_cfg" to the Row entity of
269 * attributes.
270 * @param currentConfig the column data which column name is "cur_cfg"
271 */
272 public void setCurrentConfig(Long currentConfig) {
273 ColumnDescription columndesc = new ColumnDescription(
274 OpenVSwitchColumn.CURCFG
275 .columnName(),
276 "setCurrentConfig",
277 VersionNum.VERSION100);
278 super.setDataHandler(columndesc, currentConfig);
279 }
280
281 /**
282 * Get the Column entity which column name is "capabilities" from the Row
283 * entity of attributes.
284 * @return the Column entity which column name is "capabilities"
285 */
286 public Column getCapabilitiesColumn() {
287 ColumnDescription columndesc = new ColumnDescription(
288 OpenVSwitchColumn.CAPABILITIES
289 .columnName(),
290 "getCapabilitiesColumn",
291 VersionNum.VERSION100,
292 VersionNum.VERSION670);
293 return (Column) super.getColumnHandler(columndesc);
294 }
295
296 /**
297 * Add a Column entity which column name is "capabilities" to the Row entity
298 * of attributes.
299 * @param capabilities the column data which column name is "capabilities"
300 */
301 public void setCapabilities(Map<String, UUID> capabilities) {
302 ColumnDescription columndesc = new ColumnDescription(
303 OpenVSwitchColumn.CAPABILITIES
304 .columnName(),
305 "setCapabilities",
306 VersionNum.VERSION100,
307 VersionNum.VERSION670);
308 super.setDataHandler(columndesc, capabilities);
309 }
310
311 /**
312 * Get the Column entity which column name is "statistics" from the Row
313 * entity of attributes.
314 * @return the Column entity which column name is "statistics"
315 */
316 public Column getStatisticsColumn() {
317 ColumnDescription columndesc = new ColumnDescription(
318 OpenVSwitchColumn.STATISTICS
319 .columnName(),
320 "getStatisticsColumn",
321 VersionNum.VERSION100);
322 return (Column) super.getColumnHandler(columndesc);
323 }
324
325 /**
326 * Add a Column entity which column name is "statistics" to the Row entity
327 * of attributes.
328 * @param statistics the column data which column name is "statistics"
329 */
330 public void setStatistics(Map<String, Long> statistics) {
331 ColumnDescription columndesc = new ColumnDescription(
332 OpenVSwitchColumn.STATISTICS
333 .columnName(),
334 "setStatistics",
335 VersionNum.VERSION100);
336 super.setDataHandler(columndesc, statistics);
337 }
338
339 /**
340 * Get the Column entity which column name is "ovs_version" from the Row
341 * entity of attributes.
342 * @return the Column entity which column name is "ovs_version"
343 */
344 public Column getOvsVersionColumn() {
345 ColumnDescription columndesc = new ColumnDescription(
346 OpenVSwitchColumn.OVSVERSION
347 .columnName(),
348 "getOvsVersionColumn",
349 VersionNum.VERSION100);
350 return (Column) super.getColumnHandler(columndesc);
351 }
352
353 /**
354 * Add a Column entity which column name is "ovs_version" to the Row entity
355 * of attributes.
356 * @param ovsVersion the column data which column name is "ovs_version"
357 */
358 public void setOvsVersion(Set<String> ovsVersion) {
359 ColumnDescription columndesc = new ColumnDescription(
360 OpenVSwitchColumn.OVSVERSION
361 .columnName(),
362 "setOvsVersion",
363 VersionNum.VERSION100);
364 super.setDataHandler(columndesc, ovsVersion);
365 }
366
367 /**
368 * Get the Column entity which column name is "db_version" from the Row
369 * entity of attributes.
370 * @return the Column entity which column name is "db_version"
371 */
372 public Column getDbVersionColumn() {
373 ColumnDescription columndesc = new ColumnDescription(
374 OpenVSwitchColumn.DBVERSION
375 .columnName(),
376 "getDbVersionColumn",
377 VersionNum.VERSION100);
378 return (Column) super.getColumnHandler(columndesc);
379 }
380
381 /**
382 * Add a Column entity which column name is "db_version" to the Row entity
383 * of attributes.
384 * @param dbVersion the column data which column name is "db_version"
385 */
386 public void setDbVersion(Set<String> dbVersion) {
387 ColumnDescription columndesc = new ColumnDescription(
388 OpenVSwitchColumn.DBVERSION
389 .columnName(),
390 "setDbVersion",
391 VersionNum.VERSION100);
392 super.setDataHandler(columndesc, dbVersion);
393 }
394
395 /**
396 * Get the Column entity which column name is "system_type" from the Row
397 * entity of attributes.
398 * @return the Column entity which column name is "system_type"
399 */
400 public Column getSystemTypeColumn() {
401 ColumnDescription columndesc = new ColumnDescription(
402 OpenVSwitchColumn.SYSTEMTYPE
403 .columnName(),
404 "getSystemTypeColumn",
405 VersionNum.VERSION100);
406 return (Column) super.getColumnHandler(columndesc);
407 }
408
409 /**
410 * Add a Column entity which column name is "system_type" to the Row entity
411 * of attributes.
412 * @param systemType the column data which column name is "system_type"
413 */
414 public void setSystemType(Set<String> systemType) {
415 ColumnDescription columndesc = new ColumnDescription(
416 OpenVSwitchColumn.SYSTEMTYPE
417 .columnName(),
418 "setSystemType",
419 VersionNum.VERSION100);
420 super.setDataHandler(columndesc, systemType);
421 }
422
423 /**
424 * Get the Column entity which column name is "system_version" from the Row
425 * entity of attributes.
426 * @return the Column entity which column name is "system_version"
427 */
428 public Column getSystemVersionColumn() {
429 ColumnDescription columndesc = new ColumnDescription(
430 OpenVSwitchColumn.SYSTEMVERSION
431 .columnName(),
432 "getSystemVersionColumn",
433 VersionNum.VERSION100);
434 return (Column) super.getColumnHandler(columndesc);
435 }
436
437 /**
438 * Add a Column entity which column name is "system_version" to the Row
439 * entity of attributes.
440 * @param systemVersion the column data which column name is
441 * "system_version"
442 */
443 public void setSystemVersion(Set<String> systemVersion) {
444 ColumnDescription columndesc = new ColumnDescription(
445 OpenVSwitchColumn.SYSTEMVERSION
446 .columnName(),
447 "setSystemVersion",
448 VersionNum.VERSION100);
449 super.setDataHandler(columndesc, systemVersion);
450 }
451}