Merge branch 'topic/master/neutron-yang-migration' to branch 'master'
[ovsdb.git] / library / it / src / test / java / org / opendaylight / ovsdb / integrationtest / ovsdbclient / TestBridge.java
1 /*
2  * Copyright (C) 2014 Red Hat, Inc. and others.  All rights reserved.
3  *
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
7  *
8  * Authors : Madhu Venugopal
9  */
10
11 package org.opendaylight.ovsdb.integrationtest.ovsdbclient;
12
13 import java.util.Map;
14 import java.util.Set;
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;
22
23 /**
24  * Statically Typed Bridge Table as defined in ovs-vswitchd.conf.db
25  */
26
27 /*
28  * Interface name was set to TestBridge on purpose to test the @TypeTable annotation
29  * functionality of TyperHelper.java
30  */
31 @TypedTable(name="Bridge", database="Open_vSwitch")
32 public interface TestBridge extends TypedBaseTable {
33     /*
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.
39      */
40     @TypedColumn(name="name", method=MethodType.GETDATA)
41     String getName();
42
43     @TypedColumn(name="name", method=MethodType.GETCOLUMN)
44     Column<GenericTableSchema, String> getNameColumn();
45
46     @TypedColumn(name="name", method=MethodType.SETDATA)
47     void setName(String name);
48
49    /*
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.
52     */
53    Column<GenericTableSchema, Map<String, String>> getStatusColumn();
54     void setStatus(Map<String, String> status);
55
56     /*
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
60      */
61     @TypedColumn(name="flood_vlans", method=MethodType.GETCOLUMN)
62     Column<GenericTableSchema, Set<Integer>> getFloodVlansColumn();
63
64     @TypedColumn(name="flood_vlans", method=MethodType.SETDATA)
65     void setFloodVlans(Set<Integer> vlans);
66
67
68     @TypedColumn(name="ports", method=MethodType.GETCOLUMN)
69     Column<GenericTableSchema, Set<UUID>> getPortsColumn();
70
71     @TypedColumn(name="ports", method=MethodType.SETDATA)
72     void setPorts(Set<UUID> ports);
73
74
75     @TypedColumn(name="mirrors", method=MethodType.GETCOLUMN)
76     Column<GenericTableSchema, Set<UUID>> getMirrorsColumn();
77
78     @TypedColumn(name="mirrors", method=MethodType.SETDATA)
79     void setMirrors(Set<UUID> mirrors);
80
81
82     @TypedColumn(name="controller", method=MethodType.GETCOLUMN)
83     Column<GenericTableSchema, Set<UUID>> getControllerColumn();
84
85     @TypedColumn(name="controller", method=MethodType.SETDATA)
86     void setController(Set<UUID> controller);
87
88
89     @TypedColumn(name="datapath_id", method=MethodType.GETCOLUMN)
90     Column<GenericTableSchema, Set<String>> getDatapathIdColumn();
91
92     @TypedColumn(name="datapath_id", method=MethodType.SETDATA)
93     void setDatapathId(Set<String> datapathId);
94
95
96     @TypedColumn(name="datapath_type", method=MethodType.GETCOLUMN)
97     Column<GenericTableSchema, String> getDatapathTypeColumn();
98
99     @TypedColumn(name="datapath_type", method=MethodType.SETDATA)
100     void setDatapathType(String datapathType);
101
102
103     @TypedColumn(name="fail_mode", method=MethodType.GETCOLUMN)
104     Column<GenericTableSchema, Set<String>> getFailModeColumn();
105
106     @TypedColumn(name="fail_mode", method=MethodType.SETDATA)
107     void setFailMode(Set<String> failMode);
108
109
110     @TypedColumn(name="sflow", method=MethodType.GETCOLUMN)
111     Column<GenericTableSchema, Set<UUID>> getSflowColumn();
112
113     @TypedColumn(name="sflow", method=MethodType.SETDATA)
114     void setSflow(Set<UUID> sflow);
115
116
117     @TypedColumn(name="netflow", method=MethodType.GETCOLUMN)
118     Column<GenericTableSchema, Set<UUID>> getNetflowColumn();
119
120     @TypedColumn(name="netflow", method=MethodType.SETDATA)
121     void setNetflow(Set<UUID> netflow);
122
123
124     @TypedColumn(name="flow_tables", method=MethodType.GETCOLUMN)
125     Column<GenericTableSchema, Map<Integer, UUID>> getFlowTablesColumn();
126
127     @TypedColumn(name="flow_tables", method=MethodType.SETDATA)
128     void setFlowTables(Map<Integer, UUID> flowTables);
129
130
131     @TypedColumn(name="stp_enable", method=MethodType.GETCOLUMN)
132     Column<GenericTableSchema, Boolean> getStpEnableColumn();
133
134     @TypedColumn(name="stp_enable", method=MethodType.SETDATA)
135     void setStpEnable(Boolean stp_enable);
136
137
138     @TypedColumn(name="protocols", method=MethodType.GETCOLUMN)
139     Column<GenericTableSchema, Set<String>> getProtocolsColumn();
140
141     @TypedColumn(name="protocols", method=MethodType.SETDATA)
142     void setProtocols(Set<String> protocols);
143
144
145     @TypedColumn(name="other_config", method=MethodType.GETCOLUMN)
146     Column<GenericTableSchema, Map<String, String>> getOtherConfigColumn();
147
148     @TypedColumn(name="other_config", method=MethodType.SETDATA)
149     void setOtherConfig(Map<String, String> other_config);
150
151
152     @TypedColumn(name="external_ids", method=MethodType.GETCOLUMN)
153     Column<GenericTableSchema, Map<String, String>> getExternalIdsColumn();
154
155     @TypedColumn(name="external_ids", method=MethodType.SETDATA)
156     void setExternalIds(Map<String, String> externalIds);
157
158
159     @TypedColumn(name="ipfix", method=MethodType.GETCOLUMN)
160     Column<GenericTableSchema, Set<UUID>> getIpfixColumn();
161
162     @TypedColumn(name="ipfix", method=MethodType.SETDATA)
163     void setIpfix(Set<UUID> ipfix);
164 }