}
if (debugit) {
log.debug("Do some debugging because some bundle is unresolved");
+ Thread.sleep(600000);
}
// Assert if true, if false we are good to go!
<Bundle-Activator>org.opendaylight.ovsdb.lib.Activator</Bundle-Activator>
<Embed-Transitive>true</Embed-Transitive>
<Export-Package>org.opendaylight.ovsdb.lib,
- org.opendaylight.ovsdb.lib.table,
org.opendaylight.ovsdb.lib.jsonrpc,
org.opendaylight.ovsdb.lib.notation,
- org.opendaylight.ovsdb.lib.database,
org.opendaylight.ovsdb.lib.operations,
org.opendaylight.ovsdb.lib.message,
-
- <!-- TODO : Remove the following temp package switfly once the plugin migration is complete -->
- org.opendaylight.ovsdb.lib.message.temp,
org.opendaylight.ovsdb.lib.schema,
org.opendaylight.ovsdb.lib.schema.typed</Export-Package>
</instructions>
+++ /dev/null
-/*
- * Copyright (C) 2014 EBay Software Foundation
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Ashwin Raveendran
- */
-package org.opendaylight.ovsdb.lib.database;
-
-
-public class Column<E extends Table> {
- ColumnSchema schema;
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.database;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-public class ColumnSchema {
-
- String name;
-
- @JsonProperty("type")
- private OvsdbType type;
-
- @JsonProperty("ephemeral")
- private Boolean ephemeral;
-
- @JsonProperty("mutable")
- private Boolean mutable;
-
- public OvsdbType getType() {
- return type;
- }
-
- public Boolean getEphemeral() {
- return ephemeral;
- }
-
- public Boolean getMutable() {
- return mutable;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
-
- @Override
- public String toString() {
- return "ColumnType [type=" + type + ", ephemeral=" + ephemeral
- + ", mutable=" + mutable + "]";
- }
-
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.database;
-
-import java.util.Map;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-public class DatabaseSchema {
- @JsonProperty("name")
- private String name;
-
- @JsonProperty("version")
- private String version;
-
- @JsonProperty("cksum")
- private String cksum;
-
- @JsonProperty("tables")
- private Map<String, TableSchema> tables;
-
- public String getName() {
- return name;
- }
-
- public String getVersion() {
- return version;
- }
-
- public String getCksum() {
- return cksum;
- }
-
- public Map<String, TableSchema> getTables() {
- return tables;
- }
-
- public TableSchema getTable(String tableName) {
- return tables.get(tableName);
- }
-
- @Override
- public String toString() {
- return "DatabaseSchema [name=" + name + ", version=" + version
- + ", cksum=" + cksum + ", tables=" + tables + "]";
- }
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.database;
-
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class OVSBridge {
-
- private String uuid;
- private String name;
-
- public OVSBridge(String uuid, String name){
- this.uuid = uuid;
- this.name = name;
- }
-
- public String getUuid(){
- return this.uuid;
- }
-
- public String getName(){
- return this.name;
- }
-
- @SuppressWarnings("unchecked")
- public static Map<String, OVSBridge> monitorBridge(){
- List<String> columns = new ArrayList<String>();
- columns.add("_uuid");
- columns.add("name");
-
- Map<String, List<String>> row = new HashMap<String, List<String>>();
- row.put("columns", columns);
-
- Map<String, Map> tables = new HashMap<String, Map>();
- tables.put("Bridge", row);
-
- Object[] params = {"Open_vSwitch", null, tables};
-
- Map<String, Object> monitorResponse = new HashMap<String, Object>();
- Map<String, Object> bridgeTable = (Map) monitorResponse.get("Bridge");
-
- Object[] uuidObjects = bridgeTable.keySet().toArray();
- String[] uuids = Arrays.copyOf(uuidObjects, uuidObjects.length, String[].class);
-
- Map<String, OVSBridge> result = new HashMap<String, OVSBridge>();
-
- for(String uuid : uuids){
- Map<String, Object> newRow = (Map) bridgeTable.get(uuid);
- Map<String, Object> newColumns = (Map) newRow.get("new");
- String name = (String) newColumns.get("name");
- result.put(name, new OVSBridge(uuid, name));
- }
-
- return result;
- }
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.database;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class OVSInstance {
- private String uuid;
-
- public OVSInstance(){
- this.uuid = null;
- }
-
- public OVSInstance(String uuid){
- this.uuid = uuid;
- }
-
- @SuppressWarnings("unchecked")
- public static OVSInstance monitorOVS(){
- List<String> columns = new ArrayList<String>();
- columns.add("_uuid");
- columns.add("bridges");
-
- Map<String, List<String>> row = new HashMap<String, List<String>>();
- row.put("columns", columns);
-
- Map<String, Map> tables = new HashMap<String, Map>();
- tables.put("Open_vSwitch", row);
-
- Object[] params = {"Open_vSwitch", null, tables};
-
- Map<String, Object> monitorResponse = new HashMap<String, Object>();
-
- Map<String, Object> vSwitchTable = (Map) monitorResponse.get("Open_vSwitch");
- if(vSwitchTable != null){
- String uuid = (String) vSwitchTable.keySet().toArray()[0];
- return new OVSInstance(uuid);
- }
- return null;
- }
-
- public String getUuid(){
- return this.uuid;
- }
-
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.database;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-
-public class OvsdbType {
- public enum PortType {
- VLAN("vlan"),
- TUNNEL("Tunnel"),
- BONDING("Bonding"),
- PATCH("patch"),
- INTERNAL("internal");
-
- private PortType(String name) {
- this.name = name;
- }
-
- private String name;
-
- @Override
- public String toString() {
- return name;
- }
- }
- public OvsdbType(String type){
- this.key = new BaseType(type);
- }
-
- public OvsdbType(@JsonProperty("key") BaseType key, @JsonProperty("value") BaseType value,
- @JsonProperty("min") Integer min, @JsonProperty("max") Object max){
- this.key = key;
- this.value = value;
- this.min = min;
- this.max = max;
- }
-
- public BaseType key;
- public BaseType value;
- public Integer min;
- public Object max;
-
- public static class BaseType{
-
- public BaseType(String type){
- this.type = type;
- }
-
- public BaseType(@JsonProperty("type") String type, @JsonProperty("enum") Object ovsdbEnum,
- @JsonProperty("minInteger") Integer minInteger, @JsonProperty("maxInteger") Integer maxInteger,
- @JsonProperty("minReal") Double minReal, @JsonProperty("maxReal") Double maxReal,
- @JsonProperty("minLength") Integer minLength, @JsonProperty("maxLength") Integer maxLength,
- @JsonProperty("refTable") String refTable, @JsonProperty("refType") String refType){
- this.type = type;
- this.ovsdbEnum = ovsdbEnum;
- this.minInteger = minInteger;
- this.maxInteger = maxInteger;
- this.minReal = minReal;
- this.maxReal = maxReal;
- this.minLength = minLength;
- this.maxLength = maxLength;
- this.refTable = refTable;
- this.refType = refType;
- }
-
- public String type;
- public Object ovsdbEnum;
- public Integer minInteger;
- public Integer maxInteger;
- public Double minReal;
- public Double maxReal;
- public Integer minLength;
- public Integer maxLength;
- public String refTable;
- public String refType;
- @Override
- public String toString() {
- return "BaseType [type=" + type + ", ovsdbEnum="
- + ovsdbEnum + ", minInteger=" + minInteger
- + ", maxInteger=" + maxInteger + ", minReal=" + minReal
- + ", maxReal=" + maxReal + ", minLength=" + minLength
- + ", maxLength=" + maxLength + ", refTable=" + refTable
- + ", refType=" + refType + "]";
- }
- }
-
- @Override
- public String toString() {
- return "OvsdbType [key=" + key + ", value=" + value + ", min=" + min
- + ", max=" + max + "]";
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2014 EBay Software Foundation
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Ashwin Raveendran
- */
-package org.opendaylight.ovsdb.lib.database;
-
-
-public class Table<E extends Table> {
- TableSchema schema;
-
-
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.database;
-
-import java.util.Map;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-public class TableSchema {
-
- @JsonProperty("columns")
- private Map<String, ColumnSchema> columns;
-
- @JsonProperty("maxRows")
- private Integer maxRows;
-
- @JsonProperty("isRoot")
- private Boolean isRoot;
-
- @JsonProperty("indexes")
- private Object indexes;
-
- public Map<String, ColumnSchema> getColumns() {
- return this.columns;
- }
-
- public ColumnSchema getColumn(String columnName) {
- return this.columns.get(columnName);
- }
-
- public Integer getMaxRows() {
- return maxRows;
- }
-
- public Boolean getIsRoot() {
- return isRoot;
- }
-
- public Object getIndexes() {
- return indexes;
- }
-
- @Override
- public String toString() {
- return "TableSchema [columns=" + columns + ", maxRows=" + maxRows
- + ", isRoot=" + isRoot + ", indexes=" + indexes + "]";
- }
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.database;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-public class Uuid {
- @JsonProperty("uuid")
- public String[] uuid;
-}
+++ /dev/null
-/*
- * Copyright (C) 2013 EBay Software Foundation
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Ashwin Raveendran, Madhu Venugopal
- */
-package org.opendaylight.ovsdb.lib.message;
-
-import java.io.IOException;
-
-import org.opendaylight.ovsdb.lib.operations.InsertOperation;
-
-import com.fasterxml.jackson.core.JsonGenerator;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonSerializer;
-import com.fasterxml.jackson.databind.SerializerProvider;
-
-public class InsertSerializer extends JsonSerializer<InsertOperation> {
- @Override
- public void serialize(InsertOperation condition, JsonGenerator generator,
- SerializerProvider provider) throws IOException,
- JsonProcessingException {
- generator.writeStartArray();
-
- generator.writeEndArray();
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2013 EBay Software Foundation
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Ashwin Raveendran, Madhu Venugopal
- */
-package org.opendaylight.ovsdb.lib.message.temp;
-
-import com.fasterxml.jackson.annotation.JsonAnyGetter;
-import com.fasterxml.jackson.annotation.JsonAnySetter;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.google.common.collect.Maps;
-
-import java.util.Collection;
-import java.util.Map;
-
-import org.opendaylight.ovsdb.lib.table.Table;
-
-
-public class TableUpdate<T extends Table> {
- /*This could have been done as a map, but doing so would expose the inner wrapper class in type signature*/
-
- Map<String, Row<T>> map = Maps.newHashMap();
-
- @JsonAnyGetter
- public Row<T> get(String rowId) {
- return map.get(rowId);
- }
-
- @JsonAnySetter
- public void set(String rowId, Row<T> value) {
- map.put(rowId, value);
- value.setId(rowId);
- }
-
- public Collection<Row<T>> getRows() {
- return map.values();
- }
-
- @Override
- public String toString() {
- return "TableUpdate [map=" + map + "]";
- }
-
- public static class Row<T> {
-
- @JsonIgnore
- String id;
-
- @JsonProperty("new")
- T _new;
- T old;
-
- public String getId() {
- return id;
- }
-
- public T getNew() {
- return _new;
- }
-
- public void setNew(T neww) {
- this._new = neww;
- }
-
- public T getOld() {
- return old;
- }
-
- public void setOld(T old) {
- this.old = old;
- }
-
- void setId(String id) {
- this.id = id;
- }
-
- @Override
- public String toString() {
- return "Row{" +
- "id='" + id + '\'' +
- ", _new=" + _new.toString() +
- '}';
- }
-
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2013 EBay Software Foundation
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Ashwin Raveendran, Madhu Venugopal
- */
-package org.opendaylight.ovsdb.lib.message.temp;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.google.common.collect.Maps;
-
-import org.opendaylight.ovsdb.lib.message.Response;
-import org.opendaylight.ovsdb.lib.schema.GenericTableSchema;
-import org.opendaylight.ovsdb.lib.table.Bridge;
-import org.opendaylight.ovsdb.lib.table.Capability;
-import org.opendaylight.ovsdb.lib.table.Interface;
-import org.opendaylight.ovsdb.lib.table.Port;
-import org.opendaylight.ovsdb.lib.table.Controller;
-import org.opendaylight.ovsdb.lib.table.Manager;
-import org.opendaylight.ovsdb.lib.table.Mirror;
-import org.opendaylight.ovsdb.lib.table.NetFlow;
-import org.opendaylight.ovsdb.lib.table.Open_vSwitch;
-import org.opendaylight.ovsdb.lib.table.Qos;
-import org.opendaylight.ovsdb.lib.table.Queue;
-import org.opendaylight.ovsdb.lib.table.SFlow;
-import org.opendaylight.ovsdb.lib.table.SSL;
-import org.opendaylight.ovsdb.lib.table.Flow_Sample_Collector_Set;
-import org.opendaylight.ovsdb.lib.table.Flow_Table;
-import org.opendaylight.ovsdb.lib.table.IPFIX;
-import org.opendaylight.ovsdb.lib.table.Table;
-
-import java.util.Map;
-import java.util.Set;
-
-
-public class TableUpdates extends Response {
-
- public Map<Table.Name, TableUpdate> map = Maps.newHashMap();
-
- public Set<Table.Name> availableUpdates() {
- return map.keySet();
- }
-
- @SuppressWarnings("unchecked")
- public <T extends Table> TableUpdate<T> getUpdate(Table.Name<T> name) {
- return map.get(name);
- }
-
- private <T extends Table> void put(Table.Name<T> name, TableUpdate<T> update) {
- map.put(name, update);
- }
-
- @JsonProperty("Interface")
- public TableUpdate<Interface> getInterfaceUpdate() {
- return getUpdate(Interface.NAME);
- }
-
- public void setInterfaceUpdate(TableUpdate<Interface> interfaceUpdate) {
- put(Interface.NAME, interfaceUpdate);
- }
-
- @JsonProperty("Bridge")
- TableUpdate<Bridge> getBridgeUpdate() {
- return getUpdate(Bridge.NAME);
- }
-
- public void setBridgeUpdate(TableUpdate<Bridge> bridgeUpdate) {
- put(Bridge.NAME, bridgeUpdate);
- }
-
- @JsonProperty("Port")
- TableUpdate<Port> getPortUpdate() {
- return getUpdate(Port.NAME);
- }
-
- void setPortUpdate(TableUpdate<Port> portUpdate) {
- put(Port.NAME, portUpdate);
- }
-
- @JsonProperty("Capability")
- public TableUpdate<Capability> getCapabilityUpdate() {
- return getUpdate(Capability.NAME);
- }
-
- public void setCapabilityUpdate(TableUpdate<Capability> capabilityUpdate) {
- put(Capability.NAME, capabilityUpdate);
- }
-
- @JsonProperty("Controller")
- public TableUpdate<Controller> getControllerUpdate() {
- return getUpdate(Controller.NAME);
- }
-
- public void setControllerUpdate(TableUpdate<Controller> controllerUpdate) {
- put(Controller.NAME, controllerUpdate);
- }
-
- @JsonProperty("Manager")
- public TableUpdate<Manager> getManagerUpdate() {
- return getUpdate(Manager.NAME);
- }
-
- public void setManagerUpdate(TableUpdate<Manager> managerUpdate) {
- put(Manager.NAME, managerUpdate);
- }
-
- @JsonProperty("Mirror")
- public TableUpdate<Mirror> getMirrorUpdate() {
- return getUpdate(Mirror.NAME);
- }
-
- public void setMirrorUpdate(TableUpdate<Mirror> mirrorUpdate) {
- put(Mirror.NAME, mirrorUpdate);
- }
-
- @JsonProperty("NetFlow")
- public TableUpdate<NetFlow> getNetFlowUpdate() {
- return getUpdate(NetFlow.NAME);
- }
-
- public void setNetFlowUpdate(TableUpdate<NetFlow> netFlowUpdate) {
- put(NetFlow.NAME, netFlowUpdate);
- }
-
- @JsonProperty("Open_vSwitch")
- public TableUpdate<Open_vSwitch> getOpen_vSwitchUpdate() {
- return getUpdate(Open_vSwitch.NAME);
- }
-
- public void setOpen_vSwitchUpdate(TableUpdate<Open_vSwitch> openVSwitchUpdate) {
- put(Open_vSwitch.NAME, openVSwitchUpdate);
- }
-
- @JsonProperty("QoS")
- public TableUpdate<Qos> getQosUpdate() {
- return getUpdate(Qos.NAME);
- }
-
- public void setQosUpdate(TableUpdate<Qos> qosUpdate) {
- put(Qos.NAME, qosUpdate);
- }
-
- @JsonProperty("Queue")
- public TableUpdate<Queue> getQueueUpdate() {
- return getUpdate(Queue.NAME);
- }
-
- public void setQueueUpdate(TableUpdate<Queue> queueUpdate) {
- put(Queue.NAME, queueUpdate);
- }
-
- @JsonProperty("sFlow")
- public TableUpdate<SFlow> getSFlowUpdate() {
- return getUpdate(SFlow.NAME);
- }
-
- public void setSFlowUpdate(TableUpdate<SFlow> sFlowUpdate) {
- put(SFlow.NAME, sFlowUpdate);
- }
-
- @JsonProperty("SSL")
- public TableUpdate<SSL> getSSLUpdate() {
- return getUpdate(SSL.NAME);
- }
-
- public void setSSLUpdate(TableUpdate<SSL> sslUpdate) {
- put(SSL.NAME, sslUpdate);
- }
-
- @JsonProperty("Flow_Table")
- public TableUpdate<Flow_Table> getFlow_TableUpdate() {
- return getUpdate(Flow_Table.NAME);
- }
-
- public void setFlow_TableUpdate(TableUpdate<Flow_Table> Flow_TableUpdate) {
- put(Flow_Table.NAME, Flow_TableUpdate);
- }
-
- @JsonProperty("Flow_Sample_Collector_Set")
- public TableUpdate<Flow_Sample_Collector_Set> getFlow_Sample_Collector_SetUpdate() {
- return getUpdate(Flow_Sample_Collector_Set.NAME);
- }
-
- public void setFlow_Sample_Collector_SetUpdate(TableUpdate<Flow_Sample_Collector_Set> Flow_Sample_Collector_SetUpdate) {
- put(Flow_Sample_Collector_Set.NAME, Flow_Sample_Collector_SetUpdate);
- }
-
- @JsonProperty("IPFIX")
- public TableUpdate<IPFIX> getIPFIXUpdate() {
- return getUpdate(IPFIX.NAME);
- }
-
- public void setIPFIXUpdate(TableUpdate<IPFIX> IPFIXUpdate) {
- put(IPFIX.NAME, IPFIXUpdate);
- }
-
- public TableUpdate getUpdate(GenericTableSchema table) {
- //todo Horrible just for time being, before this whole thing is refactored.
- for (Map.Entry<Table.Name, TableUpdate> s : this.map.entrySet()) {
- if (table.getName().equals(s.getKey().getName())) {
- return s.getValue();
- }
- }
- return null;
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2013 Red Hat, Inc.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Madhu Venugopal
- */
-package org.opendaylight.ovsdb.lib.operations;
-
-import org.opendaylight.ovsdb.lib.table.Table;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-// TODO Madhu : This is not complete. Getting it in to enable other committers to make progress
-public class InsertOperation extends Operation {
- String table;
- @JsonProperty("uuid-name")
- public String uuidName;
- public Table<?> row;
-
- public InsertOperation() {
- super();
- super.setOp("insert");
- }
-
- public InsertOperation(String table, String uuidName,
- Table<?> row) {
- this();
- this.table = table;
- this.uuidName = uuidName;
- this.row = row;
- }
-
- public String getTable() {
- return table;
- }
-
- public void setTable(String table) {
- this.table = table;
- }
-
- public String getUuidName() {
- return uuidName;
- }
-
- public void setUuidName(String uuidName) {
- this.uuidName = uuidName;
- }
-
- public Table<?> getRow() {
- return row;
- }
-
- public void setRow(Table<?> row) {
- this.row = row;
- }
-
- @Override
- public String toString() {
- return "InsertOperation [table=" + table + ", uuidName=" + uuidName
- + ", row=" + row + ", toString()=" + super.toString() + "]";
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2013 Red Hat, Inc.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Madhu Venugopal
- */
-package org.opendaylight.ovsdb.lib.operations;
-
-import java.util.List;
-
-import org.opendaylight.ovsdb.lib.notation.Condition;
-import org.opendaylight.ovsdb.lib.table.Table;
-//TODO Madhu : This is not complete. Getting it in to enable other committers to make progress
-public class UpdateOperation extends Operation {
- String table;
- List<Condition> where;
- Table<?> row;
-
- public UpdateOperation(String table, List<Condition> where, Table<?> row) {
- super();
- super.setOp("update");
- this.table = table;
- this.where = where;
- this.row = row;
- }
- public String getTable() {
- return table;
- }
- public void setTable(String table) {
- this.table = table;
- }
- public List<Condition> getWhere() {
- return where;
- }
- public void setWhere(List<Condition> where) {
- this.where = where;
- }
- public Table<?> getRow() {
- return row;
- }
- public void setRow(Table<?> row) {
- this.row = row;
- }
- @Override
- public String toString() {
- return "UpdateOperation [table=" + table + ", where=" + where
- + ", row=" + row + ", toString()=" + super.toString() + "]";
- }
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Madhu Venugopal, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.table;
-
-import org.opendaylight.ovsdb.lib.notation.OvsDBMap;
-import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
-import org.opendaylight.ovsdb.lib.notation.UUID;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public class Bridge extends Table<Bridge> {
- public static final Name<Bridge> NAME = new Name<Bridge>("Bridge"){};
- public enum Column implements org.opendaylight.ovsdb.lib.table.Column<Bridge>{controller, fail_mode, name, ports}
-
- private String name;
- private OvsDBSet<UUID> ports;
- private OvsDBSet<UUID> mirrors;
- private OvsDBSet<UUID> controller;
- private OvsDBSet<String> datapath_id;
- private String datapath_type;
- private OvsDBSet<String> fail_mode;
- private OvsDBSet<UUID> sflow;
- private OvsDBSet<UUID> netflow;
- private OvsDBSet<String> protocols;
- private OvsDBMap<String, String> status;
- private Boolean stp_enable;
- private OvsDBMap<String, String> other_config;
- private OvsDBMap<String, String> external_ids;
- private OvsDBSet<UUID> ipfix;
-
- public Bridge() {
- }
-
- @Override
- @JsonIgnore
- public Name<Bridge> getTableName() {
- return NAME;
- }
-
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public OvsDBSet<UUID> getPorts() {
- return ports;
- }
-
- public void setPorts(OvsDBSet<UUID> ports) {
- this.ports = ports;
- }
-
- public OvsDBSet<UUID> getMirrors() {
- return mirrors;
- }
-
- public void setMirrors(OvsDBSet<UUID> mirrors) {
- this.mirrors = mirrors;
- }
-
- public OvsDBSet<UUID> getController() {
- return controller;
- }
-
- public void setController(OvsDBSet<UUID> controller) {
- this.controller = controller;
- }
-
- public OvsDBSet<String> getDatapath_id() {
- return datapath_id;
- }
-
- public void setDatapath_id(OvsDBSet<String> datapath_id) {
- this.datapath_id = datapath_id;
- }
-
- public String getDatapath_type() {
- return datapath_type;
- }
-
- public void setDatapath_type(String datapath_type) {
- this.datapath_type = datapath_type;
- }
-
- public OvsDBSet<String> getFail_mode() {
- return fail_mode;
- }
-
- public void setFail_mode(OvsDBSet<String> fail_mode) {
- this.fail_mode = fail_mode;
- }
-
- public void setFlow(OvsDBSet<UUID> sflow){
- this.sflow = sflow;
- }
-
- public void setNetflow(OvsDBSet<UUID> netflow){
- this.netflow = netflow;
- }
-
- public OvsDBSet<UUID> getSflow() {
- return sflow;
- }
-
- public OvsDBSet<UUID> getNetflow() {
- return netflow;
- }
-
- public OvsDBMap<String, String> getStatus() {
- return status;
- }
-
- public void setStatus(OvsDBMap<String, String> status) {
- this.status = status;
- }
-
- public Boolean getStp_enable() {
- return stp_enable;
- }
-
- public OvsDBSet<String> getProtocols() {
- return protocols;
- }
-
- public void setProtocols(OvsDBSet<String> protocols) {
- this.protocols = protocols;
- }
-
- public void setStp_enable(Boolean stp_enable) {
- this.stp_enable = stp_enable;
- }
-
- public OvsDBMap<String, String> getOther_config() {
- return other_config;
- }
-
- public void setOther_config(OvsDBMap<String, String> other_config) {
- this.other_config = other_config;
- }
-
- public OvsDBMap<String, String> getExternal_ids() {
- return external_ids;
- }
-
- public void setExternal_ids(OvsDBMap<String, String> external_ids) {
- this.external_ids = external_ids;
- }
-
- public void setSflow(OvsDBSet<UUID> sflow) {
- this.sflow = sflow;
- }
-
- public OvsDBSet<UUID> getIpfix() {
- return ipfix;
- }
-
- public void setIpfix(OvsDBSet<UUID> ipfix) {
- this.ipfix = ipfix;
- }
-
- @Override
- public String toString() {
- return "Bridge [name=" + name + ", ports=" + ports + ", mirrors="
- + mirrors + ", controller=" + controller + ", datapath_id="
- + datapath_id + ", datapath_type=" + datapath_type
- + ", fail_mode=" + fail_mode + ", sflow=" + sflow
- + ", netflow=" + netflow + ", protocols=" + protocols
- + ", status=" + status + ", stp_enable=" + stp_enable
- + ", other_config=" + other_config + ", external_ids="
- + external_ids + ", ipfix=" + ipfix + "]";
- }
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Madhu Venugopal, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.table;
-
-import org.opendaylight.ovsdb.lib.notation.OvsDBMap;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public class Capability extends Table<Capability> {
-
- public static final Name<Capability> NAME = new Name<Capability>("Capability") {};
- private OvsDBMap<String, String> details;
-
-
- public OvsDBMap<String, String> getDetails() {
- return details;
- }
-
- public void setDetails(OvsDBMap<String, String> details) {
- this.details = details;
- }
-
- @Override
- @JsonIgnore
- public Name<Capability> getTableName() {
- return NAME;
- }
-
- @Override
- public String toString() {
- return "Capability [details=" + details + "]";
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2013 Ebay Software Foundation
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Ashwin Raveendran
- */
-package org.opendaylight.ovsdb.lib.table;
-
-
-public interface Column<E> {
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Madhu Venugopal, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.table;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public class Controller extends Table<Controller> {
-
- public static final Name<Controller> NAME = new Name<Controller>("Controller") {};
- private String target;
-
- public String getTarget() {
- return target;
- }
-
- public void setTarget(String target) {
- this.target = target;
- }
-
- @Override
- @JsonIgnore
- public Name<Controller> getTableName() {
- return NAME;
- }
-
- @Override
- public String toString() {
- return "Controller [target=" + target + "]";
- }
-}
+++ /dev/null
-package org.opendaylight.ovsdb.lib.table;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-import org.opendaylight.ovsdb.lib.notation.OvsDBMap;
-
-/**
- * Per ovs-vswitchd.conf.db 2.0.90
- *
- * A summary of the Flow_Sample_Collector_Set fields:
- * bridge Bridge
- * ipfix ipfix (optional)
- * external_ids map of string-string pairs
- */
-
-public class Flow_Sample_Collector_Set extends Table<Flow_Sample_Collector_Set> {
-
- public static final Name<Flow_Sample_Collector_Set> NAME = new Name<Flow_Sample_Collector_Set>("Flow_Sample_Collector_Set") {};
-
- private Integer id;
- private Bridge bridge;
- private IPFIX ipfix;
- private OvsDBMap<String, String> external_ids;
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public Bridge getBridge() {
- return bridge;
- }
-
- public void setBridge(Bridge bridge) {
- this.bridge = bridge;
- }
-
- public IPFIX getIpfix() {
- return ipfix;
- }
-
- public void setIpfix(IPFIX ipfix) {
- this.ipfix = ipfix;
- }
-
- public OvsDBMap<String, String> getExternal_ids() {
- return external_ids;
- }
-
- public void setExternal_ids(OvsDBMap<String, String> external_ids) {
- this.external_ids = external_ids;
- }
-
- @Override
- @JsonIgnore
- public Name<Flow_Sample_Collector_Set> getTableName() {
- return NAME;
- }
-
- @Override
- public String toString() {
- return "Flow_Sample_Collector_Set [" +
- "id=" + id +
- ", bridge=" + bridge +
- ", ipfix=" + ipfix +
- ", external_ids=" + external_ids +
- "]";
- }
-
- public enum Column implements org.opendaylight.ovsdb.lib.table.Column<Flow_Sample_Collector_Set> {
- id,
- bridge,
- external_ids,
- }
-}
+++ /dev/null
-package org.opendaylight.ovsdb.lib.table;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
-
-/**
- * Per ovs-vswitchd.conf.db 2.0.90
- *
- * Summary of the Flow_Table fields:
- * name optional string
- * flow_limit integer, at least 0 (optional)
- * overflow_policy optional string, either refuse or evict
- * groups set of strings
- */
-
-public class Flow_Table extends Table<Flow_Table> {
-
- public static final Name<Flow_Table> NAME = new Name<Flow_Table>("Flow_Table") {};
-
- private String name;
- private Integer flow_limit;
- private OvsDBSet<String> overflow_policy;
- private OvsDBSet<String> groups;
-
- public Flow_Table() {
- }
-
- public Integer getFlow_limit() {
- return flow_limit;
- }
-
- public void setFlow_limit(Integer flow_limit) {
- this.flow_limit = flow_limit;
- }
-
- public OvsDBSet<String> getOverflow_policy() {
- return overflow_policy;
- }
-
- public void setOverflow_policy(OvsDBSet<String> overflow_policy) {
- this.overflow_policy = overflow_policy;
- }
-
- public OvsDBSet<String> getGroups() {
- return groups;
- }
-
- public void setGroups(OvsDBSet<String> groups) {
- this.groups = groups;
- }
-
- @Override
- @JsonIgnore
- public Name<Flow_Table> getTableName() {
- return NAME;
- }
-
- @Override
- public String toString() {
- return "Flow_Table [" +
- "name=" + name +
- ", flow_limit=" + flow_limit +
- ", overflow_policy=" + overflow_policy +
- ", groups=" + groups +
- "]";
- }
-
-
- public enum Column implements org.opendaylight.ovsdb.lib.table.Column<Flow_Table> {
- name,
- flow_limit,
- overflow_policy,
- groups,
-
- }
-}
\ No newline at end of file
+++ /dev/null
-package org.opendaylight.ovsdb.lib.table;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-import org.opendaylight.ovsdb.lib.notation.OvsDBMap;
-import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
-
-/**
- * Per ovs-vswitchd.conf.db 2.0.90
- *
- * Summary of the IPFIX fields:
- * targets set of 1 or more strings
- * sampling integer, in range 1 to 4,294,967,295 (optional)
- * obs_domain_id integer, in range 0 to 4,294,967,295 (optional)
- * obs_point_id integer, in range 0 to 4,294,967,295 (optional)
- * cache_active_timeout integer, in range 0 to 4,200 (optional)
- * cache_max_flows integer, in range 0 to 4,294,967,295 (optional)
- */
-
-public class IPFIX extends Table<IPFIX> {
-
- public static final Name<IPFIX> NAME = new Name<IPFIX>("IPFIX") {};
-
- private OvsDBSet<String> targets;
- private OvsDBSet<Integer> sampling;
- private OvsDBSet<Integer> obs_domain_id;
- private OvsDBSet<Integer> obs_point_id;
- private OvsDBSet<Integer> cache_active_timeout;
- private OvsDBSet<Integer> cache_max_flows;
- private OvsDBMap<String, String> external_ids;
-
- public IPFIX() {
- }
-
- public OvsDBSet<String> getTargets() {
- return targets;
- }
-
- public void setTargets(OvsDBSet<String> targets) {
- this.targets = targets;
- }
-
- public OvsDBSet<Integer> getSampling() {
- return sampling;
- }
-
- public void setSampling(OvsDBSet<Integer> sampling) {
- this.sampling = sampling;
- }
-
- public OvsDBSet<Integer> getObs_domain_id() {
- return obs_domain_id;
- }
-
- public void setObs_domain_id(OvsDBSet<Integer> obs_domain_id) {
- this.obs_domain_id = obs_domain_id;
- }
-
- public OvsDBSet<Integer> getObs_point_id() {
- return obs_point_id;
- }
-
- public void setObs_point_id(OvsDBSet<Integer> obs_point_id) {
- this.obs_point_id = obs_point_id;
- }
-
- public OvsDBSet<Integer> getCache_active_timeout() {
- return cache_active_timeout;
- }
-
- public void setCache_active_timeout(OvsDBSet<Integer> cache_active_timeout) {
- this.cache_active_timeout = cache_active_timeout;
- }
-
- public OvsDBSet<Integer> getCache_max_flows() {
- return cache_max_flows;
- }
-
- public void setCache_max_flows(OvsDBSet<Integer> cache_max_flows) {
- this.cache_max_flows = cache_max_flows;
- }
-
- public OvsDBMap<String, String> getExternal_ids() {
- return external_ids;
- }
-
- public void setExternal_ids(OvsDBMap<String, String> external_ids) {
- this.external_ids = external_ids;
- }
-
- @Override
- @JsonIgnore
- public Name<IPFIX> getTableName() {
- return NAME;
- }
-
- @Override
- public String toString() {
- return "IPFIX [" +
- "targets=" + targets +
- ", sampling=" + sampling +
- ", obs_domain_id=" + obs_domain_id +
- ", obs_point_id=" + obs_point_id +
- ", cache_active_timeout=" + cache_active_timeout +
- ", cache_max_flows=" + cache_max_flows +
- ", external_ids=" + external_ids +
- "]";
- }
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Madhu Venugopal, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.table;
-
-import java.math.BigInteger;
-
-import org.opendaylight.ovsdb.lib.notation.OvsDBMap;
-import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public class Interface extends Table<Interface> {
-
- public static Name<Interface> NAME = new Name<Interface>("Interface") {};
-
- private String name;
- private OvsDBMap<String, String> options;
- private String type;
- private OvsDBSet<BigInteger> ofport;
- private OvsDBSet<String> mac;
- private OvsDBMap<String, Integer> statistics;
- private OvsDBMap<String, String> status;
- private OvsDBMap<String, String> other_config;
- private OvsDBMap<String, String> external_ids;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public OvsDBMap<String, String> getOptions() {
- return options;
- }
-
- public void setOptions(OvsDBMap<String, String> options) {
- this.options = options;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public OvsDBSet<BigInteger> getOfport() {
- return ofport;
- }
-
- public void setOfport(OvsDBSet<BigInteger> ofport) {
- this.ofport = ofport;
- }
-
- public OvsDBSet<String> getMac() {
- return mac;
- }
-
- public void setMac(OvsDBSet<String> mac) {
- this.mac = mac;
- }
-
- public OvsDBMap<String, Integer> getStatistics() {
- return statistics;
- }
-
- public void setStatistics(OvsDBMap<String, Integer> statistics) {
- this.statistics = statistics;
- }
-
- public OvsDBMap<String, String> getStatus() {
- return status;
- }
-
- public void setStatus(OvsDBMap<String, String> status) {
- this.status = status;
- }
-
- public OvsDBMap<String, String> getOther_config() {
- return other_config;
- }
-
- public void setOther_config(OvsDBMap<String, String> other_config) {
- this.other_config = other_config;
- }
-
- public OvsDBMap<String, String> getExternal_ids() {
- return external_ids;
- }
-
- public void setExternal_ids(OvsDBMap<String, String> external_ids) {
- this.external_ids = external_ids;
- }
-
- @Override
- @JsonIgnore
- public Name<Interface> getTableName() {
- return NAME;
- }
-
- @Override
- public String toString() {
- return "Interface [name=" + name + ", options=" + options + ", type="
- + type + ", ofport=" + ofport + ", mac=" + mac
- + ", statistics=" + statistics + ", status=" + status
- + ", other_config=" + other_config + ", external_ids="
- + external_ids + "]";
- }
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Madhu Venugopal, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.table;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public class Manager extends Table<Manager> {
-
- public static final Name<Manager> NAME = new Name<Manager>("Manager") {};
- private String target;
-
- public String getTarget() {
- return target;
- }
-
- public void setTarget(String target) {
- this.target = target;
- }
-
- @Override
- @JsonIgnore
- public Name<Manager> getTableName() {
- return NAME;
- }
-
- @Override
- public String toString() {
- return "Manager [target=" + target + "]";
- }
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Madhu Venugopal, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.table;
-
-import org.opendaylight.ovsdb.lib.notation.OvsDBMap;
-import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
-import org.opendaylight.ovsdb.lib.notation.UUID;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public class Mirror extends Table<Mirror> {
-
- public static final Name<Mirror> NAME = new Name<Mirror>("Mirror") {};
- private String name;
- private OvsDBSet<UUID> select_src_port;
- private OvsDBSet<UUID> select_dst_port;
- private OvsDBSet<Integer> select_vlan;
- private OvsDBSet<UUID> output_port;
- private OvsDBSet<Integer> output_vlan;
- private OvsDBMap<String, Integer> statistics;
- private OvsDBMap<String, String> external_ids;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public OvsDBSet<UUID> getSelect_src_port() {
- return select_src_port;
- }
-
- public void setSelect_src_port(OvsDBSet<UUID> select_src_port) {
- this.select_src_port = select_src_port;
- }
-
- public OvsDBSet<UUID> getSelect_dst_port() {
- return select_dst_port;
- }
-
- public void setSelect_dst_port(OvsDBSet<UUID> select_dst_port) {
- this.select_dst_port = select_dst_port;
- }
-
- public OvsDBSet<Integer> getSelect_vlan() {
- return select_vlan;
- }
-
- public void setSelect_vlan(OvsDBSet<Integer> select_vlan) {
- this.select_vlan = select_vlan;
- }
-
- public OvsDBSet<UUID> getOutput_port() {
- return output_port;
- }
-
- public void setOutput_port(OvsDBSet<UUID> output_port) {
- this.output_port = output_port;
- }
-
- public OvsDBSet<Integer> getOutput_vlan() {
- return output_vlan;
- }
-
- public void setOutput_vlan(OvsDBSet<Integer> output_vlan) {
- this.output_vlan = output_vlan;
- }
-
- public OvsDBMap<String, Integer> getStatistics() {
- return statistics;
- }
-
- public void setStatistics(OvsDBMap<String, Integer> statistics) {
- this.statistics = statistics;
- }
-
- public OvsDBMap<String, String> getExternal_ids() {
- return external_ids;
- }
-
- public void setExternal_ids(OvsDBMap<String, String> external_ids) {
- this.external_ids = external_ids;
- }
-
- @Override
- @JsonIgnore
- public Name<Mirror> getTableName() {
- return NAME;
- }
-
- @Override
- public String toString() {
- return "Mirror [name=" + name + ", select_src_port=" + select_src_port
- + ", select_dst_port=" + select_dst_port + ", select_vlan="
- + select_vlan + ", output_port=" + output_port
- + ", output_vlan=" + output_vlan + ", statistics=" + statistics
- + ", external_ids=" + external_ids + "]";
- }
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Madhu Venugopal, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.table;
-
-import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public class NetFlow extends Table<NetFlow> {
-
- public static final Name<NetFlow> NAME = new Name<NetFlow>("NetFlow") {};
- private OvsDBSet<String> targets;
- private Integer active_timeout;
-
- public OvsDBSet<String> getTargets() {
- return targets;
- }
-
- public Integer getActiveTimeout() {
- return active_timeout;
- }
-
- public void setTargets(OvsDBSet<String> targets) {
- this.targets = targets;
- }
-
- @Override
- @JsonIgnore
- public Name<NetFlow> getTableName() {
- return NAME;
- }
-
- @Override
- public String toString() {
- return "NetFlow [targets=" + targets + "]";
- }
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Madhu Venugopal, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.table;
-
-import org.opendaylight.ovsdb.lib.notation.OvsDBMap;
-import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
-import org.opendaylight.ovsdb.lib.notation.UUID;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public class Open_vSwitch extends Table<Open_vSwitch> {
-
- public static final Name<Open_vSwitch> NAME = new Name<Open_vSwitch>("Open_vSwitch"){};
-
- private OvsDBSet<UUID> bridges;
- private Integer curr_cfg;
- private OvsDBSet<String> db_version;
- private OvsDBSet<UUID> manager_options;
- private OvsDBMap<String, String> status;
- private Integer next_cfg;
- private OvsDBSet<String> ovs_version;
- private OvsDBSet<UUID> ssl;
- private OvsDBSet<String> system_type;
- private OvsDBSet<String> system_version;
- private OvsDBMap<String, UUID> capabilities;
- private OvsDBMap<String, String> other_config;
- private OvsDBMap<String, String> external_ids;
- private OvsDBMap<String, Integer> statistics;
-
- public Open_vSwitch() {
- }
-
- @Override
- @JsonIgnore
- public Name<Open_vSwitch> getTableName() {
- return NAME;
- }
-
- public OvsDBSet<UUID> getBridges() {
- return bridges;
- }
-
- public void setBridges(OvsDBSet<UUID> bridges) {
- this.bridges = bridges;
- }
-
- public Integer getCurr_cfg() {
- return curr_cfg;
- }
-
- public void setCurr_cfg(Integer curr_cfg) {
- this.curr_cfg = curr_cfg;
- }
-
- public OvsDBSet<String> getDb_version() {
- return db_version;
- }
-
- public void setDb_version(OvsDBSet<String> db_version) {
- this.db_version = db_version;
- }
-
- public OvsDBSet<UUID> getManager_options() {
- return manager_options;
- }
-
- public void setManager_options(OvsDBSet<UUID> manager_options) {
- this.manager_options = manager_options;
- }
-
- public OvsDBMap<String, String> getStatus() {
- return status;
- }
-
- public void setStatus(OvsDBMap<String, String> status) {
- this.status = status;
- }
-
- public Integer getNext_cfg() {
- return next_cfg;
- }
-
- public void setNext_cfg(Integer next_cfg) {
- this.next_cfg = next_cfg;
- }
-
- public OvsDBSet<String> getOvs_version() {
- return ovs_version;
- }
-
- public void setOvs_version(OvsDBSet<String> ovs_version) {
- this.ovs_version = ovs_version;
- }
-
- public OvsDBSet<UUID> getSsl() {
- return ssl;
- }
-
- public void setSsl(OvsDBSet<UUID> ssl) {
- this.ssl = ssl;
- }
-
- public OvsDBSet<String> getSystem_type() {
- return system_type;
- }
-
- public void setSystem_type(OvsDBSet<String> system_type) {
- this.system_type = system_type;
- }
-
- public OvsDBSet<String> getSystem_version() {
- return system_version;
- }
-
- public void setSystem_version(OvsDBSet<String> system_version) {
- this.system_version = system_version;
- }
-
- public OvsDBMap<String, UUID> getCapabilities() {
- return capabilities;
- }
-
- public void setCapabilities(OvsDBMap<String, UUID> capabilities) {
- this.capabilities = capabilities;
- }
-
- public OvsDBMap<String, String> getOther_config() {
- return other_config;
- }
-
- public void setOther_config(OvsDBMap<String, String> other_config) {
- this.other_config = other_config;
- }
-
- public OvsDBMap<String, String> getExternal_ids() {
- return external_ids;
- }
-
- public void setExternal_ids(OvsDBMap<String, String> external_ids) {
- this.external_ids = external_ids;
- }
-
- public OvsDBMap<String, Integer> getStatistics() {
- return statistics;
- }
-
- public void setStatistics(OvsDBMap<String, Integer> statistics) {
- this.statistics = statistics;
- }
-
- @Override
- public String toString() {
- return "Open_vSwitch [bridges=" + bridges + ", curr_cfg=" + curr_cfg
- + ", db_version=" + db_version + ", manager_options="
- + manager_options + ", status=" + status + ", next_cfg="
- + next_cfg + ", ovs_version=" + ovs_version + ", ssl=" + ssl
- + ", system_type=" + system_type + ", system_version="
- + system_version + ", capabilities=" + capabilities
- + ", other_config=" + other_config + ", external_ids="
- + external_ids + ", statistics=" + statistics + "]";
- }
-
- public enum Column implements org.opendaylight.ovsdb.lib.table.Column<Open_vSwitch>{ controller, fail_mode, name, ports}
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Madhu Venugopal, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.table;
-
-import java.math.BigInteger;
-
-import org.opendaylight.ovsdb.lib.notation.OvsDBMap;
-import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
-import org.opendaylight.ovsdb.lib.notation.UUID;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public class Port extends Table<Port> {
-
- public static final Name<Port> NAME = new Name<Port>("Port") {};
-
- private String name;
- private OvsDBSet<BigInteger> tag;
- private OvsDBSet<BigInteger> trunks;
- private OvsDBSet<UUID> interfaces;
- private OvsDBSet<String> mac;
- private OvsDBSet<UUID> qos;
- private OvsDBMap<String, String> other_config;
- private OvsDBMap<String, String> external_ids;
-
- public Port() {
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public OvsDBSet<BigInteger> getTag() {
- return tag;
- }
-
- public void setTag(OvsDBSet<BigInteger> tag) {
- this.tag = tag;
- }
-
- public OvsDBSet<BigInteger> getTrunks() {
- return trunks;
- }
-
- public void setTrunks(OvsDBSet<BigInteger> trunks) {
- this.trunks = trunks;
- }
-
- public OvsDBSet<UUID> getInterfaces() {
- return interfaces;
- }
-
- public void setInterfaces(OvsDBSet<UUID> interfaces) {
- this.interfaces = interfaces;
- }
-
- public OvsDBSet<String> getMac() {
- return mac;
- }
-
- public void setMac(OvsDBSet<String> mac) {
- this.mac = mac;
- }
-
- public OvsDBSet<UUID> getQos() {
- return qos;
- }
-
- public void setQos(OvsDBSet<UUID> qos) {
- this.qos = qos;
- }
-
- public OvsDBMap<String, String> getOther_config() {
- return other_config;
- }
-
- public void setOther_config(OvsDBMap<String, String> other_config) {
- this.other_config = other_config;
- }
-
- public OvsDBMap<String, String> getExternal_ids() {
- return external_ids;
- }
-
- public void setExternal_ids(OvsDBMap<String, String> external_ids) {
- this.external_ids = external_ids;
- }
-
- @Override
- @JsonIgnore
- public Name<Port> getTableName() {
- return NAME;
- }
-
- @Override
- public String toString() {
- return "Port [name=" + name + ", tag=" + tag + ", trunks=" + trunks
- + ", interfaces=" + interfaces + ", mac=" + mac + ", qos="
- + qos + ", other_config=" + other_config + ", external_ids="
- + external_ids + "]";
- }
-
- public enum Column implements org.opendaylight.ovsdb.lib.table.Column<Port> {
- interfaces,
- name,
- tag,
- trunks,
- mac,
- qos,
- statistics,
- other_config,
- external_ids}
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Madhu Venugopal, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.table;
-
-
-import org.opendaylight.ovsdb.lib.notation.OvsDBMap;
-import org.opendaylight.ovsdb.lib.notation.UUID;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public class Qos extends Table<Qos> {
-
- public static final Name<Qos> NAME = new Name<Qos>("QoS") {};
-
- private OvsDBMap<Integer, UUID> queues;
- private String type;
- private OvsDBMap<String, String> other_config;
- private OvsDBMap<String, String> external_ids;
-
- public Qos() {
- }
-
- public OvsDBMap<Integer, UUID> getQueues() {
- return queues;
- }
-
- public void setQueues(OvsDBMap<Integer, UUID> queues) {
- this.queues = queues;
- }
-
- public String getType() {
- return type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public OvsDBMap<String, String> getOther_config() {
- return other_config;
- }
-
- public void setOther_config(OvsDBMap<String, String> other_config) {
- this.other_config = other_config;
- }
-
- public OvsDBMap<String, String> getExternal_ids() {
- return external_ids;
- }
-
- public void setExternal_ids(OvsDBMap<String, String> external_ids) {
- this.external_ids = external_ids;
- }
-
- @Override
- @JsonIgnore
- public Name<Qos> getTableName() {
- return NAME;
- }
-
- @Override
- public String toString() {
- return "Qos [queues=" + queues + ", type=" + type + ", other_config="
- + other_config + ", external_ids=" + external_ids + "]";
- }
-
- public enum Column implements org.opendaylight.ovsdb.lib.table.Column<Qos> {
- queues,
- type,
- other_config,
- external_ids}
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Madhu Venugopal, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.table;
-
-
-import org.opendaylight.ovsdb.lib.notation.OvsDBMap;
-import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public class Queue extends Table<Queue> {
-
- public static final Name<Queue> NAME = new Name<Queue>("Queue") {};
-
- private OvsDBSet<Integer> dscp;
- private OvsDBMap<String, String> other_config;
- private OvsDBMap<String, String> external_ids;
-
- public Queue() {
- }
-
- public OvsDBSet<Integer> getDscp() {
- return dscp;
- }
-
- public void setDscp(OvsDBSet<Integer> dscp) {
- this.dscp = dscp;
- }
-
- public OvsDBMap<String, String> getOther_config() {
- return other_config;
- }
-
- public void setOther_config(OvsDBMap<String, String> other_config) {
- this.other_config = other_config;
- }
-
- public OvsDBMap<String, String> getExternal_ids() {
- return external_ids;
- }
-
- public void setExternal_ids(OvsDBMap<String, String> external_ids) {
- this.external_ids = external_ids;
- }
-
- @Override
- @JsonIgnore
- public Name<Queue> getTableName() {
- return NAME;
- }
-
- @Override
- public String toString() {
- return "Queue [dscp=" + dscp + ", other_config=" + other_config
- + ", external_ids=" + external_ids + "]";
- }
-
- public enum Column implements org.opendaylight.ovsdb.lib.table.Column<Queue> {
- dscp,
- other_config,
- external_ids}
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Madhu Venugopal, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.table;
-
-import org.opendaylight.ovsdb.lib.notation.OvsDBMap;
-import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public class SFlow extends Table<SFlow> {
-
- public static final Name<SFlow> NAME = new Name<SFlow>("sFlow") {};
- private OvsDBSet<String> agent;
- private OvsDBSet<String> targets;
- private OvsDBMap<String, String> external_ids;
- private OvsDBSet<Integer> header;
- private OvsDBSet<Integer> polling;
- private OvsDBSet<Integer> sampling;
-
- public OvsDBSet<String> getTargets() {
- return targets;
- }
-
- public void setTargets(OvsDBSet<String> targets) {
- this.targets = targets;
- }
-
- @Override
- @JsonIgnore
- public Name<SFlow> getTableName() {
- return NAME;
- }
-
- public OvsDBSet<String> getAgent() {
- return agent;
- }
-
- public void setAgent(OvsDBSet<String> agent) {
- this.agent = agent;
- }
-
- public OvsDBMap<String, String> getExternal_ids() {
- return external_ids;
- }
-
- public void setExternal_ids(OvsDBMap<String, String> external_ids) {
- this.external_ids = external_ids;
- }
-
- public OvsDBSet<Integer> getHeader() {
- return header;
- }
-
- public void setHeader(OvsDBSet<Integer> header) {
- this.header = header;
- }
-
- public OvsDBSet<Integer> getPolling() {
- return polling;
- }
-
- public void setPolling(OvsDBSet<Integer> polling) {
- this.polling = polling;
- }
-
- public OvsDBSet<Integer> getSampling() {
- return sampling;
- }
-
- public void setSampling(OvsDBSet<Integer> sampling) {
- this.sampling = sampling;
- }
-
- @Override
- public String toString() {
- return "SFlow [agent=" + agent + ", targets=" + targets
- + ", external_ids=" + external_ids + ", header=" + header
- + ", polling=" + polling + ", sampling=" + sampling + "]";
- }
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Madhu Venugopal, Evan Zeller
- */
-package org.opendaylight.ovsdb.lib.table;
-
-import org.opendaylight.ovsdb.lib.notation.OvsDBMap;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-public class SSL extends Table<SSL> {
-
- public static final Name<SSL> NAME = new Name<SSL>("SSL") {};
- private String ca_cert;
- private Boolean bootstrap_ca_cert;
- private String certificate;
- private String private_key;
- private OvsDBMap<String, String> external_ids;
-
- public String getCa_cert() {
- return ca_cert;
- }
- public void setCa_cert(String ca_cert) {
- this.ca_cert = ca_cert;
- }
- public OvsDBMap<String, String> getExternal_ids() {
- return external_ids;
- }
- public void setExternal_ids(OvsDBMap<String, String> external_ids) {
- this.external_ids = external_ids;
- }
- public Boolean getBootstrap_ca_cert() {
- return bootstrap_ca_cert;
- }
- public void setBootstrap_ca_cert(Boolean bootstrap_ca_cert) {
- this.bootstrap_ca_cert = bootstrap_ca_cert;
- }
- public String getCertificate() {
- return certificate;
- }
- public void setCertificate(String certificate) {
- this.certificate = certificate;
- }
- public String getPrivate_key() {
- return private_key;
- }
- public void setPrivate_key(String private_key) {
- this.private_key = private_key;
- }
-
- @Override
- @JsonIgnore
- public Name<SSL> getTableName() {
- return NAME;
- }
-
- @Override
- public String toString() {
- return "SSL [ca_cert=" + ca_cert + ", bootstrap_ca_cert="
- + bootstrap_ca_cert + ", certificate=" + certificate
- + ", private_key=" + private_key + ", external_ids="
- + external_ids + "]";
- }
-
- public enum Column implements org.opendaylight.ovsdb.lib.table.Column<SSL> {
- ca_cert,
- bootstrap_ca_cert,
- certificate,
- private_key,
- external_ids}
-}
+++ /dev/null
-/*
- * Copyright (C) 2013 Ebay Software Foundation
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Ashwin Raveendran
- */
-package org.opendaylight.ovsdb.lib.table;
-
-public abstract class Table<E extends Table> {
- public abstract Name<E> getTableName();
- @Override
- public abstract String toString();
- public Column<E> getColumns() {
- return null;
- }
-
- public static abstract class Name<E extends Table> {
- String name;
-
- protected Name(String name) {
- this.name = name;
- }
-
- public String getName() {
- return name;
- }
-
- @Override
- public String toString() {
- return "Table:" + name;
- }
- }
-}
+++ /dev/null
-/*
- * Copyright (C) 2013 Ebay Software Foundation
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Ashwin Raveendran
- */
-package org.opendaylight.ovsdb.lib.table;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class Tables {
- public static List<Table> tables = new ArrayList<Table>();
-
- static {
- tables.add(new Bridge());
- tables.add(new Port());
- tables.add(new Capability());
- tables.add(new Interface());
- tables.add(new Controller());
- tables.add(new Manager());
- tables.add(new Mirror());
- tables.add(new NetFlow());
- tables.add(new Open_vSwitch());
- tables.add(new Qos());
- tables.add(new Queue());
- tables.add(new SFlow());
- tables.add(new SSL());
- tables.add(new Flow_Sample_Collector_Set());
- tables.add(new Flow_Table());
- tables.add(new IPFIX());
- }
-
- public static List<Table> getTables() {
- return tables;
- }
-}
+++ /dev/null
-/*
- * [[ Authors will Fill in the Copyright header ]]
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Aswin Raveendran, Madhu Venugopal
- */
-package org.opendaylight.ovsdb.lib.message;
-
-import com.fasterxml.jackson.annotation.JsonAutoDetect;
-import com.fasterxml.jackson.annotation.PropertyAccessor;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.base.Function;
-import com.google.common.collect.Ordering;
-import com.google.common.io.InputSupplier;
-import com.google.common.io.Resources;
-
-import junit.framework.TestCase;
-
-import org.opendaylight.ovsdb.lib.message.temp.TableUpdate;
-import org.opendaylight.ovsdb.lib.message.temp.TableUpdates;
-import org.opendaylight.ovsdb.lib.notation.OvsDBMap;
-import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
-import org.opendaylight.ovsdb.lib.notation.UUID;
-import org.opendaylight.ovsdb.lib.table.Bridge;
-import org.opendaylight.ovsdb.lib.table.Interface;
-import org.opendaylight.ovsdb.lib.table.Port;
-import org.opendaylight.ovsdb.lib.table.Table;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-public class MonitorResponseTest extends TestCase {
-
- public void testDeser() throws IOException {
- URL resource = Resources.getResource(MonitorResponseTest.class, "monitor_response1.json");
- InputSupplier<InputStream> inputStreamInputSupplier = Resources.newInputStreamSupplier(resource);
- InputStream input = inputStreamInputSupplier.getInput();
- ObjectMapper mapper = new ObjectMapper();
- mapper.setVisibility(PropertyAccessor.GETTER, JsonAutoDetect.Visibility.ANY);
- TableUpdates updates = mapper.readValue(input, TableUpdates.class);
-
- Set<Table.Name> available = updates.availableUpdates();
- for (Table.Name name : available) {
- if (Bridge.NAME.equals(name)) {
- verifyBridge(updates);
- } else if (Port.NAME.equals(name)) {
- veriftyPort(updates);
- } else if (Interface.NAME.equals(name)) {
- verifyInterface(updates);
- }
- }
- }
-
- private void verifyInterface(TableUpdates updates) {
- TableUpdate<Interface> update = updates.getUpdate(Interface.NAME);
- for (TableUpdate.Row<Interface> interfaceRow : update.getRows()) {
- System.out.println("interfaceRow = " + interfaceRow);
- Interface aNew = interfaceRow.getNew();
- if (null != aNew) {
- OvsDBMap<String, String> options = aNew.getOptions();
- if (options != null) {
- for (Map.Entry<String, String> optE : options.entrySet()) {
- System.out.println("optE.getKey() = " + optE.getKey());
- System.out.println("optE.getValue() = " + optE.getValue());
- }
- }
- }
- }
- }
-
- private void verifyBridge(TableUpdates updates) {
- TableUpdate<Bridge> update = updates.getUpdate(Bridge.NAME);
- for (TableUpdate.Row<Bridge> row : update.getRows()) {
- assertEquals("788de61c-0e4f-43d8-a068-259e75aabbba", row.getId());
- Bridge bridge = row.getNew();
- assertNotNull(bridge);
- OvsDBSet<UUID> ports = bridge.getPorts();
- assertEquals(2, ports.size());
- List<UUID> uuids = Ordering.usingToString().sortedCopy(ports);
- assertEquals("f6018e7a-7ca5-4e72-a744-a9b434f47011", uuids.get(0).toString());
- assertEquals("fe3c89fd-2ff3-44d8-9f27-f9c7ac2a693d", uuids.get(1).toString());
- bridge = row.getOld();
- assertNull(bridge);
- }
- }
-
- private void veriftyPort(TableUpdates updates) {
- TableUpdate<Port> update = updates.getUpdate(Port.NAME);
- Collection<TableUpdate.Row<Port>> rows = update.getRows();
- assertEquals(2, rows.size());
- List<TableUpdate.Row<Port>> sorted = Ordering.natural().onResultOf(new Function<TableUpdate.Row<Port>, String>() {
- @Override
- public String apply(TableUpdate.Row<Port> input) {
- return input.getId();
- }
- }).sortedCopy(rows);
-
- TableUpdate.Row<Port> portRow = sorted.get(0);
- assertEquals("f6018e7a-7ca5-4e72-a744-a9b434f47011", portRow.getId());
- Port port = portRow.getNew();
- assertNotNull(port);
- List<UUID> interfaces = Ordering.usingToString().sortedCopy(port.getInterfaces());
- assertEquals("13548b08-dca3-4d4b-9e9b-f50c237dcb9e", interfaces.get(0).toString());
- port = portRow.getOld();
- assertNull(port);
-
- portRow = sorted.get(1);
- assertEquals("fe3c89fd-2ff3-44d8-9f27-f9c7ac2a693d", portRow.getId());
- port = portRow.getNew();
- assertNotNull(port);
- interfaces = Ordering.usingToString().sortedCopy(port.getInterfaces());
- assertEquals("88ae29fb-8c91-41a9-a14f-a74126e790c0", interfaces.get(0).toString());
- port = portRow.getOld();
- assertNull(port);
- }
-
-}
org.opendaylight.controller.sal.action,
org.opendaylight.ovsdb.plugin,
org.opendaylight.ovsdb.lib.notation,
- org.opendaylight.ovsdb.lib.table,
org.opendaylight.controller.sal.binding.api,
org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819,
org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes,
org.opendaylight.controller.sal.authorization,
org.opendaylight.ovsdb.plugin,
org.opendaylight.ovsdb.lib,
- org.opendaylight.ovsdb.lib.table,
org.opendaylight.ovsdb.lib.jsonrpc,
org.opendaylight.ovsdb.lib.notation,
- org.opendaylight.ovsdb.lib.database,
org.opendaylight.ovsdb.lib.operations,
org.opendaylight.ovsdb.lib.message,
org.opendaylight.ovsdb.lib.schema,
org.opendaylight.controller.sal.connection,
org.opendaylight.controller.clustering.services,
org.opendaylight.controller.sal.networkconfig.bridgedomain,
- org.opendaylight.ovsdb.lib.table,
org.opendaylight.ovsdb.lib.notation,
- org.opendaylight.ovsdb.lib.database,
org.opendaylight.ovsdb.lib.operations,
org.opendaylight.ovsdb.lib.message,
org.opendaylight.ovsdb.schema.openvswitch,
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ExecutionException;
-import com.google.common.collect.ImmutableSet;
import org.eclipse.osgi.framework.console.CommandInterpreter;
import org.eclipse.osgi.framework.console.CommandProvider;
import org.opendaylight.controller.clustering.services.IClusterGlobalServices;
import org.opendaylight.controller.sal.utils.Status;
import org.opendaylight.controller.sal.utils.StatusCode;
import org.opendaylight.ovsdb.lib.OvsdbClient;
-import org.opendaylight.ovsdb.lib.database.OvsdbType;
import org.opendaylight.ovsdb.lib.notation.Column;
import org.opendaylight.ovsdb.lib.notation.Mutator;
import org.opendaylight.ovsdb.lib.notation.OvsDBSet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.google.common.collect.ImmutableSet;
import com.google.common.util.concurrent.ListenableFuture;
public class ConfigurationService implements IPluginInBridgeDomainConfigService, OVSDBConfigService,
if (type != null) {
logger.debug("Port type : " + type);
- if (type.equalsIgnoreCase(OvsdbType.PortType.VLAN.name())) {
+ if (type.equalsIgnoreCase(OvsVswitchdSchemaConstants.PortType.VLAN.name())) {
tags = new HashSet<BigInteger>();
tags.add(BigInteger.valueOf(Integer.parseInt((String)configs.get(ConfigConstants.VLAN))));
}
if (type != null) {
logger.debug("Interface type : " + type);
- if (type.equalsIgnoreCase(OvsdbType.PortType.TUNNEL.name())) {
+ if (type.equalsIgnoreCase(OvsVswitchdSchemaConstants.PortType.TUNNEL.name())) {
interfaceRow.setType((String)configs.get(ConfigConstants.TUNNEL_TYPE));
if (options == null) options = new HashMap<String, String>();
options.put("remote_ip", (String)configs.get(ConfigConstants.DEST_IP));
- } else if (type.equalsIgnoreCase(OvsdbType.PortType.PATCH.name()) ||
- type.equalsIgnoreCase(OvsdbType.PortType.INTERNAL.name())) {
+ } else if (type.equalsIgnoreCase(OvsVswitchdSchemaConstants.PortType.PATCH.name()) ||
+ type.equalsIgnoreCase(OvsVswitchdSchemaConstants.PortType.INTERNAL.name())) {
interfaceRow.setType(type.toLowerCase());
}
}
if (autoConfigureController && databaseName.equals(DATABASE_NAME) && tableName.equals("Bridge")) return true;
return false;
}
+
+ public enum PortType {
+ VLAN("vlan"),
+ TUNNEL("Tunnel"),
+ BONDING("Bonding"),
+ PATCH("patch"),
+ INTERNAL("internal");
+
+ private PortType(String name) {
+ this.name = name;
+ }
+
+ private String name;
+
+ @Override
+ public String toString() {
+ return name;
+ }
+ }
+
}
<configuration>
<instructions>
<Import-Package>org.opendaylight.ovsdb.lib,
- org.opendaylight.ovsdb.lib.table,
org.opendaylight.ovsdb.lib.jsonrpc,
org.opendaylight.ovsdb.lib.notation,
- org.opendaylight.ovsdb.lib.database,
org.opendaylight.ovsdb.lib.operations,
org.opendaylight.ovsdb.lib.message,
org.opendaylight.ovsdb.lib.schema,
<configuration>
<instructions>
<Import-Package>org.opendaylight.ovsdb.lib,
- org.opendaylight.ovsdb.lib.table,
org.opendaylight.ovsdb.lib.jsonrpc,
org.opendaylight.ovsdb.lib.notation,
- org.opendaylight.ovsdb.lib.database,
org.opendaylight.ovsdb.lib.operations,
org.opendaylight.ovsdb.lib.message,
org.opendaylight.ovsdb.lib.schema,