2 * [[ Authors will Fill in the Copyright header ]]
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 : Brent Salisbury, Evan Zeller
10 package org.opendaylight.ovsdb.lib.database;
12 import java.util.ArrayList;
13 import java.util.HashMap;
14 import java.util.List;
17 public class OVSInstance {
24 public OVSInstance(String uuid){
28 @SuppressWarnings("unchecked")
29 public static OVSInstance monitorOVS(){
30 List<String> columns = new ArrayList<String>();
32 columns.add("bridges");
34 Map<String, List<String>> row = new HashMap<String, List<String>>();
35 row.put("columns", columns);
37 Map<String, Map> tables = new HashMap<String, Map>();
38 tables.put("Open_vSwitch", row);
40 Object[] params = {"Open_vSwitch", null, tables};
42 Map<String, Object> monitorResponse = new HashMap<String, Object>();
44 Map<String, Object> vSwitchTable = (Map) monitorResponse.get("Open_vSwitch");
45 if(vSwitchTable != null){
46 String uuid = (String) vSwitchTable.keySet().toArray()[0];
47 return new OVSInstance(uuid);
52 public String getUuid(){