private static String connectionType;
private static Boolean setup = false;
private static MdsalUtils mdsalUtils = null;
- private static String extras = "false";
+ private static String extras = "true";
private static final String NETVIRT = "org.opendaylight.ovsdb.openstack.net-virt";
private static final String NETVIRTPROVIDERS = "org.opendaylight.ovsdb.openstack.net-virt-providers";
@Override
public String getFeatureName() {
- setExtras();
return "odl-ovsdb-southbound-impl-ui";
}
@Override
public Option[] getFeaturesOptions() {
- if (extras.equals("true")) {
+ /*if (extras.equals("true")) {
Option[] options = new Option[] {
features("mvn:org.opendaylight.ovsdb/features-ovsdb/1.1.0-SNAPSHOT/xml/features",
"odl-ovsdb-openstack-sb")};
return options;
- } else {
+ } else {*/
return new Option[]{};
- }
+ //}
}
@Override
public Option[] getLoggingOptions() {
Option[] options = new Option[] {
- /*editConfigurationFilePut(SouthboundITConstants.ORG_OPS4J_PAX_LOGGING_CFG,
- "log4j.logger.org.opendaylight.ovsdb",
- LogLevelOption.LogLevel.DEBUG.name()),*/
editConfigurationFilePut(SouthboundITConstants.ORG_OPS4J_PAX_LOGGING_CFG,
+ "log4j.logger.org.opendaylight.ovsdb",
+ LogLevelOption.LogLevel.DEBUG.name()),
+ /*editConfigurationFilePut(SouthboundITConstants.ORG_OPS4J_PAX_LOGGING_CFG,
"log4j.logger.org.opendaylight.ovsdb.southbound-impl",
- LogLevelOption.LogLevel.DEBUG.name())
+ LogLevelOption.LogLevel.DEBUG.name())*/
};
+ LOG.info("getLoggingOptions extras: {}", extras);
if (extras.equals("true")) {
Option[] extraOptions = new Option[] {
editConfigurationFilePut(SouthboundITConstants.ORG_OPS4J_PAX_LOGGING_CFG,
"log4j.logger.org.opendaylight.ovsdb",
LogLevelOption.LogLevel.DEBUG.name()),
- editConfigurationFilePut(SouthboundITConstants.ORG_OPS4J_PAX_LOGGING_CFG,
+ /*editConfigurationFilePut(SouthboundITConstants.ORG_OPS4J_PAX_LOGGING_CFG,
"log4j.logger.org.opendaylight.ovsdb.openstack.net-virt",
- LogLevelOption.LogLevel.DEBUG.name())
+ LogLevelOption.LogLevel.DEBUG.name())*/
};
options = ObjectArrays.concat(options, extraOptions, Option.class);
}
SouthboundITConstants.DEFAULT_SERVER_PORT);
String connectionType = props.getProperty(SouthboundITConstants.CONNECTION_TYPE,
SouthboundITConstants.CONNECTION_TYPE_ACTIVE);
+ String extras = props.getProperty(SouthboundITConstants.SERVER_EXTRAS,
+ SouthboundITConstants.DEFAULT_SERVER_EXTRAS);
- LOG.info("Using the following properties: mode= {}, ip:port= {}:{}",
- connectionType, addressStr, portStr);
+ LOG.info("getPropertiesOptions: Using the following properties: mode= {}, ip:port= {}:{}, extras= {}",
+ connectionType, addressStr, portStr, extras);
Option[] options = new Option[] {
editConfigurationFilePut(SouthboundITConstants.CUSTOM_PROPERTIES,
editConfigurationFilePut(SouthboundITConstants.CUSTOM_PROPERTIES,
SouthboundITConstants.SERVER_PORT, portStr),
editConfigurationFilePut(SouthboundITConstants.CUSTOM_PROPERTIES,
- SouthboundITConstants.CONNECTION_TYPE, connectionType)
+ SouthboundITConstants.CONNECTION_TYPE, connectionType),
+ editConfigurationFilePut(SouthboundITConstants.CUSTOM_PROPERTIES,
+ SouthboundITConstants.SERVER_EXTRAS, extras)
};
return options;
}
- private void setExtras() {
+ @Override
+ public void setExtras() {
Properties props = new Properties(System.getProperties());
extras = props.getProperty(SouthboundITConstants.SERVER_EXTRAS,
SouthboundITConstants.DEFAULT_SERVER_EXTRAS);
- LOG.info("extras: {}", extras);
- System.out.println("extras: " + extras);
+ LOG.info("setExtras: {}", extras);
+ System.out.println("setExtras: " + extras);
}
@Before
portStr = bundleContext.getProperty(SouthboundITConstants.SERVER_PORT);
connectionType = bundleContext.getProperty(SouthboundITConstants.CONNECTION_TYPE);
- LOG.info("Using the following properties: mode= {}, ip:port= {}:{}",
- connectionType, addressStr, portStr);
+ LOG.info("setUp: Using the following properties: mode= {}, ip:port= {}:{}, extras= {}",
+ connectionType, addressStr, portStr, extras);
if (connectionType.equalsIgnoreCase(SouthboundITConstants.CONNECTION_TYPE_ACTIVE)) {
if (addressStr == null) {
fail(usage());
mdsalUtils = new MdsalUtils(dataBroker);
setup = true;
+ //setExtras();
+ LOG.info("setUp: extras: {}", extras);
if (extras.equals("true")) {
isBundleReady(bundleContext, NETVIRT);
isBundleReady(bundleContext, NETVIRTPROVIDERS);
new OvsdbTerminationPointAugmentationBuilder();
ovsdbTerminationPointAugmentationBuilder.setInterfaceType(
new InterfaceTypeEntryBuilder()
- .setInterfaceType(
- SouthboundMapper.createInterfaceType("internal"))
+ .setInterfaceType(
+ SouthboundMapper.createInterfaceType("internal"))
.build().getInterfaceType());
return ovsdbTerminationPointAugmentationBuilder;
}
}
}
}
+
+ @Test
+ public void testNetVirt() throws InterruptedException {
+ LOG.info(">>>>> waiting");
+ Thread.sleep(10000);
+ LOG.info(">>>>> back");
+
+ ConnectionInfo connectionInfo = getConnectionInfo(addressStr, portStr);
+ Node ovsdbNode = connectOvsdbNode(connectionInfo);
+ //Assert.assertFalse(disconnectOvsdbNode(connectionInfo));
+ Assume.assumeTrue(disconnectOvsdbNode(connectionInfo));
+ }
}