1 package org.opendaylight.ovsdb.openstack.netvirt.api;
4 import java.util.concurrent.ConcurrentMap;
5 import java.util.concurrent.ExecutionException;
6 import org.opendaylight.ovsdb.lib.notation.Row;
7 import org.opendaylight.ovsdb.lib.notation.UUID;
8 import org.opendaylight.ovsdb.lib.schema.GenericTableSchema;
9 import org.opendaylight.ovsdb.lib.schema.typed.TypedBaseTable;
10 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation;
11 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node;
14 * Created by shague on 4/20/15.
16 public interface OvsdbConfigurationService {
19 * @deprecated This version of insertRow is a short-term replacement for the older & now deprecated method of the same name.
20 * This API assumes an Open_vSwitch database Schema.
22 * This API is replaced by
23 * {@link #insertRow(Node, String, String, String, Row < GenericTableSchema >) insertRow} and
24 * {@link #insertTree(Node, String, String, String, Row<GenericTableSchema>) insertTree}
26 * @param node OVSDB Node
27 * @param tableName Table on which the row is inserted
28 * @param parentUuid UUID of the parent table to which this operation will result in attaching/mutating.
29 * @param row Row of table Content to be inserted
30 * @return UUID of the inserted Row
33 public StatusWithUuid insertRow(Node node, String tableName, String parentUuid, Row<GenericTableSchema> row);
36 * @deprecated This version of updateRow is a short-term replacement for the older & now deprecated method of the same name.
37 * This API assumes an Open_vSwitch database Schema.
39 * This API is replaced by
40 * {@link #updateRow(Node, String, String, UUID, Row<GenericTableSchema>, boolean) updateRow}
42 * @param node OVSDB Node
43 * @param tableName Table on which the row is Updated
44 * @param parentUuid UUID of the parent row on which this operation might result in mutating.
45 * @param rowUuid UUID of the row that is being updated
46 * @param row Row of table Content to be Updated. Include just those columns that needs to be updated.
49 public Status updateRow (Node node, String tableName, String parentUuid, String rowUuid, Row row);
52 * @deprecated This version of deleteRow is a short-term replacement for the older & now deprecated method of the same name.
53 * This API assumes an Open_vSwitch database Schema.
55 * This API is replaced by {@link #deleteRow(Node, String, String, UUID) deleteRow}
57 * @param node OVSDB Node
58 * @param tableName Table on which the row is Updated
59 * @param rowUuid UUID of the row that is being deleted
62 public Status deleteRow (Node node, String tableName, String rowUuid);
65 * @deprecated This version of getRow is a short-term replacement for the older & now deprecated method of the same name.
66 * This API assumes an Open_vSwitch database Schema.
68 * This API is replaced by {@link #getRow(Node, String, String, UUID) getRow}
70 * @param node OVSDB Node
71 * @param tableName Table Name
72 * @param rowUuid UUID of the row being queried
73 * @return a row with a list of Column data that corresponds to an unique Row-identifier called uuid in a given table.
76 public Row getRow(Node node, String tableName, String uuid);
79 * Returns a Row from a table for the specified uuid.
81 * @param node OVSDB Node
82 * @param databaseName Database Name that represents the Schema supported by the node.
83 * @param tableName Table Name
84 * @param uuid UUID of the row being queried
85 * @throws OvsdbPluginException Any failure during the get operation will result in a specific exception.
86 * @return a row with a list of Column data that corresponds to an unique Row-identifier called uuid in a given table.
88 public Row<GenericTableSchema> getRow(Node node, String databaseName, String tableName, UUID uuid) throws OvsdbPluginException;
91 * @Deprecated This version of getRows is a short-term replacement for the older & now deprecated method of the same name.
92 * This API assumes an Open_vSwitch database Schema.
94 * This API is replaced by
95 * {@link #getRows(Node, String, String) getRows} and {@link #getRows(Node, String, String, String) getRows}
97 * @param node OVSDB Node
98 * @param tableName Table Name
99 * @return List of rows that makes the entire Table.
102 public ConcurrentMap<String, Row> getRows(Node node, String tableName);
105 * Returns all rows of a table.
107 * @param node OVSDB Node
108 * @param databaseName Database Name that represents the Schema supported by the node.
109 * @param tableName Table Name
110 * @throws OvsdbPluginException Any failure during the get operation will result in a specific exception.
111 * @return Map of rows to its UUID that makes the entire Table.
113 public ConcurrentMap<UUID, Row<GenericTableSchema>> getRows(Node node, String databaseName, String tableName) throws OvsdbPluginException;
116 * Returns all rows of a table filtered by query string.
118 * @param node OVSDB Node
119 * @param databaseName Database Name that represents the Schema supported by the node.
120 * @param tableName Table Name
121 * @param fiqlQuery FIQL style String Query {@link http://tools.ietf.org/html/draft-nottingham-atompub-fiql-00} to filter rows
122 * @throws OvsdbPluginException Any failure during the get operation will result in a specific exception.
123 * @return Map of rows to its UUID that makes the entire Table.
125 public ConcurrentMap<UUID, Row<GenericTableSchema>> getRows(Node node, String databaseName, String tableName, String fiqlQuery) throws OvsdbPluginException;
128 * @Deprecated Returns all the Tables in a given Ndoe.
129 * This API assumes an Open_vSwitch database Schema.
131 * This API is replaced by
132 * {@link #getTables(Node, String) getTables}
133 * @param node OVSDB node
134 * @return List of Table Names that make up Open_vSwitch schema.
137 public List<String> getTables(Node node);
140 * setOFController is a convenience method used by existing applications to setup Openflow Controller on
141 * a Open_vSwitch Bridge.
142 * This API assumes an Open_vSwitch database Schema.
145 * @param bridgeUUID uuid of the Bridge for which the ip-address of Openflow Controller should be programmed.
146 * @return Boolean representing success or failure of the operation.
148 * @throws InterruptedException
149 * @throws ExecutionException
151 public Boolean setOFController(Node node, String bridgeUUID) throws InterruptedException, ExecutionException;
153 public <T extends TypedBaseTable<?>> String getTableName(Node node, Class<T> typedClass);
154 public <T extends TypedBaseTable<?>> T getTypedRow(Node node, Class<T> typedClass, Row row);
155 public <T extends TypedBaseTable<?>> T createTypedRow(Node node, Class<T> typedClass);
157 public ConcurrentMap<String, OvsdbTerminationPointAugmentation> getInterfaces(Node node);