2 * Copyright (C) 2014 Red Hat, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 * Authors : Madhu Venugopal
11 package org.opendaylight.ovsdb.integrationtest.ovsdbclient;
15 import org.opendaylight.ovsdb.lib.notation.Column;
16 import org.opendaylight.ovsdb.lib.notation.UUID;
17 import org.opendaylight.ovsdb.lib.schema.GenericTableSchema;
18 import org.opendaylight.ovsdb.lib.schema.typed.MethodType;
19 import org.opendaylight.ovsdb.lib.schema.typed.TypedBaseTable;
20 import org.opendaylight.ovsdb.lib.schema.typed.TypedColumn;
21 import org.opendaylight.ovsdb.lib.schema.typed.TypedTable;
24 * Statically Typed Bridge Table as defined in ovs-vswitchd.conf.db
28 * Interface name was set to TestBridge on purpose to test the @TypeTable annotation
29 * functionality of TyperHelper.java
31 @TypedTable(name="Bridge", database="Open_vSwitch")
32 public interface TestBridge extends TypedBaseTable {
34 * Its a good practice to set the @TypedColumn to these Statically typed Tables & Columns.
35 * Implementations can choose to use GETDATA or GETCOLUMN or both to get the data.
36 * But GETCOLUMN gives more info on ColumnSchema.
37 * The following "name" column is decorated with both GETDATA and GETCOLUMN and the corresponding test
38 * will test both the options.
40 @TypedColumn(name="name", method=MethodType.GETDATA)
43 @TypedColumn(name="name", method=MethodType.GETCOLUMN)
44 Column<GenericTableSchema, String> getNameColumn();
46 @TypedColumn(name="name", method=MethodType.SETDATA)
47 void setName(String name);
50 * Annotations are NOT added to the Status column on purpose to test the backup
51 * functionality on getter, setter, column name derivation etc. TyperHelper.java.
53 Column<GenericTableSchema, Map<String, String>> getStatusColumn();
54 void setStatus(Map<String, String> status);
57 * TypedColumn's name Annotation should override the method name based Column derivation.
58 * The method name and TypedColumn name was kept different on purpose to test the name
59 * resolution priority of TyperHelper.java
61 @TypedColumn(name="flood_vlans", method=MethodType.GETCOLUMN)
62 Column<GenericTableSchema, Set<Integer>> getFloodVlansColumn();
64 @TypedColumn(name="flood_vlans", method=MethodType.SETDATA)
65 void setFloodVlans(Set<Integer> vlans);
68 @TypedColumn(name="ports", method=MethodType.GETCOLUMN)
69 Column<GenericTableSchema, Set<UUID>> getPortsColumn();
71 @TypedColumn(name="ports", method=MethodType.SETDATA)
72 void setPorts(Set<UUID> ports);
75 @TypedColumn(name="mirrors", method=MethodType.GETCOLUMN)
76 Column<GenericTableSchema, Set<UUID>> getMirrorsColumn();
78 @TypedColumn(name="mirrors", method=MethodType.SETDATA)
79 void setMirrors(Set<UUID> mirrors);
82 @TypedColumn(name="controller", method=MethodType.GETCOLUMN)
83 Column<GenericTableSchema, Set<UUID>> getControllerColumn();
85 @TypedColumn(name="controller", method=MethodType.SETDATA)
86 void setController(Set<UUID> controller);
89 @TypedColumn(name="datapath_id", method=MethodType.GETCOLUMN)
90 Column<GenericTableSchema, Set<String>> getDatapathIdColumn();
92 @TypedColumn(name="datapath_id", method=MethodType.SETDATA)
93 void setDatapathId(Set<String> datapathId);
96 @TypedColumn(name="datapath_type", method=MethodType.GETCOLUMN)
97 Column<GenericTableSchema, String> getDatapathTypeColumn();
99 @TypedColumn(name="datapath_type", method=MethodType.SETDATA)
100 void setDatapathType(String datapathType);
103 @TypedColumn(name="fail_mode", method=MethodType.GETCOLUMN)
104 Column<GenericTableSchema, Set<String>> getFailModeColumn();
106 @TypedColumn(name="fail_mode", method=MethodType.SETDATA)
107 void setFailMode(Set<String> failMode);
110 @TypedColumn(name="sflow", method=MethodType.GETCOLUMN)
111 Column<GenericTableSchema, Set<UUID>> getSflowColumn();
113 @TypedColumn(name="sflow", method=MethodType.SETDATA)
114 void setSflow(Set<UUID> sflow);
117 @TypedColumn(name="netflow", method=MethodType.GETCOLUMN)
118 Column<GenericTableSchema, Set<UUID>> getNetflowColumn();
120 @TypedColumn(name="netflow", method=MethodType.SETDATA)
121 void setNetflow(Set<UUID> netflow);
124 @TypedColumn(name="flow_tables", method=MethodType.GETCOLUMN)
125 Column<GenericTableSchema, Map<Integer, UUID>> getFlowTablesColumn();
127 @TypedColumn(name="flow_tables", method=MethodType.SETDATA)
128 void setFlowTables(Map<Integer, UUID> flowTables);
131 @TypedColumn(name="stp_enable", method=MethodType.GETCOLUMN)
132 Column<GenericTableSchema, Boolean> getStpEnableColumn();
134 @TypedColumn(name="stp_enable", method=MethodType.SETDATA)
135 void setStpEnable(Boolean stp_enable);
138 @TypedColumn(name="protocols", method=MethodType.GETCOLUMN)
139 Column<GenericTableSchema, Set<String>> getProtocolsColumn();
141 @TypedColumn(name="protocols", method=MethodType.SETDATA)
142 void setProtocols(Set<String> protocols);
145 @TypedColumn(name="other_config", method=MethodType.GETCOLUMN)
146 Column<GenericTableSchema, Map<String, String>> getOtherConfigColumn();
148 @TypedColumn(name="other_config", method=MethodType.SETDATA)
149 void setOtherConfig(Map<String, String> other_config);
152 @TypedColumn(name="external_ids", method=MethodType.GETCOLUMN)
153 Column<GenericTableSchema, Map<String, String>> getExternalIdsColumn();
155 @TypedColumn(name="external_ids", method=MethodType.SETDATA)
156 void setExternalIds(Map<String, String> externalIds);
159 @TypedColumn(name="ipfix", method=MethodType.GETCOLUMN)
160 Column<GenericTableSchema, Set<UUID>> getIpfixColumn();
162 @TypedColumn(name="ipfix", method=MethodType.SETDATA)
163 void setIpfix(Set<UUID> ipfix);