2 * Copyright (C) 2013 Red Hat, Inc.
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, Brent Salisbury
10 package org.opendaylight.ovsdb.plugin;
12 import java.util.List;
13 import java.util.concurrent.ConcurrentMap;
14 import java.util.concurrent.ExecutionException;
16 import org.opendaylight.controller.sal.core.Node;
17 import org.opendaylight.controller.sal.utils.Status;
18 import org.opendaylight.ovsdb.lib.notation.Row;
19 import org.opendaylight.ovsdb.lib.schema.GenericTableSchema;
21 public interface OVSDBConfigService {
24 * This version of insertRow is a short-term replacement for the older & now deprecated method of the same name.
25 * This API assumes an Open_vSwitch database Schema.
27 * @param node OVSDB Node
28 * @param tableName Table on which the row is inserted
29 * @param parentUuid UUID of the parent table to which this operation will result in attaching/mutating.
30 * @param row Row of table Content to be inserted
31 * @return UUID of the inserted Row
33 public StatusWithUuid insertRow(Node node, String tableName, String parentUuid, Row<GenericTableSchema> row);
36 * 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 * @param node OVSDB Node
40 * @param tableName Table on which the row is Updated
41 * @param parentUuid UUID of the parent row on which this operation might result in mutating.
42 * @param rowUuid UUID of the row that is being updated
43 * @param row Row of table Content to be Updated. Include just those columns that needs to be updated.
45 public Status updateRow (Node node, String tableName, String parentUuid, String rowUuid, Row row);
48 * This version of deleteRow is a short-term replacement for the older & now deprecated method of the same name.
49 * This API assumes an Open_vSwitch database Schema.
51 * @param node OVSDB Node
52 * @param tableName Table on which the row is Updated
53 * @param rowUuid UUID of the row that is being deleted
56 public Status deleteRow (Node node, String tableName, String rowUUID);
59 * This version of getRow is a short-term replacement for the older & now deprecated method of the same name.
60 * This API assumes an Open_vSwitch database Schema.
62 * @param node OVSDB Node
63 * @param tableName Table Name
64 * @param rowUuid UUID of the row being queried
65 * @return a row with a list of Column data that corresponds to an unique Row-identifier called uuid in a given table.
68 public Row getRow(Node node, String tableName, String uuid);
71 * This version of getRows is a short-term replacement for the older & now deprecated method of the same name.
72 * This API assumes an Open_vSwitch database Schema.
74 * @param node OVSDB Node
75 * @param tableName Table Name
76 * @return List of rows that makes the entire Table.
79 public ConcurrentMap<String, Row> getRows(Node node, String tableName);
82 * Returns all the Tables in a given Ndoe.
83 * This API assumes an Open_vSwitch database Schema.
85 * @param node OVSDB node
86 * @return List of Table Names that make up Open_vSwitch schema.
88 public List<String> getTables(Node node);
91 * setOFController is a convenience method used by existing applications to setup Openflow Controller on
92 * a Open_vSwitch Bridge.
93 * This API assumes an Open_vSwitch database Schema.
96 * @param bridgeUUID uuid of the Bridge for which the ip-address of Openflow Controller should be programmed.
97 * @return Boolean representing success or failure of the operation.
99 * @throws InterruptedException
100 * @throws ExecutionException
102 Boolean setOFController(Node node, String bridgeUUID) throws InterruptedException, ExecutionException;