public class TestObjects {
public final ConnectionService connectionService;
+ public final InventoryService inventoryService;
public final Node node;
- public TestObjects(ConnectionService connectionService, Node node) {
+ public TestObjects(ConnectionService connectionService, Node node, InventoryService inventoryService) {
this.connectionService = connectionService;
+ this.inventoryService = inventoryService;
this.node = node;
}
}
Node node = connectionService.connect(identifier, params);
if (node == null) {
- throw new IOException("Failed to connecto to ovsdb server");
+ throw new IOException("Failed to connect to the ovsdb server");
}
- return new TestObjects(connectionService, node);
+ return new TestObjects(connectionService, node, inventory);
}
}
*/
package org.opendaylight.ovsdb.plugin;
+import java.io.IOException;
import java.util.List;
+import java.util.Properties;
+import org.junit.Before;
import org.junit.Test;
import org.opendaylight.controller.sal.core.Node;
import org.slf4j.Logger;
private static final Logger logger = LoggerFactory
.getLogger(OvsdbTestGetBridgeDomainsIT.class);
+ private Properties props;
+
+ @Before
+ public void loadProps() throws IOException {
+ props = loadProperties();
+ }
+
@Test
public void getBridgeDomains() throws Throwable{
TestObjects testObjects = getTestConnection();
ConnectionService connectionService = testObjects.connectionService;
+ InventoryService inventoryService = testObjects.inventoryService;
Node node = testObjects.node;
/**
*/
ConfigurationService configurationService = new ConfigurationService();
configurationService.setConnectionServiceInternal(connectionService);
+ configurationService.setInventoryServiceInternal(inventoryService);
List<String> ls = configurationService.getBridgeDomains(node);
- System.out.println(ls);
}
}