private void setDescription(PhysicalPort physicalPort, HwvtepPhysicalPortAugmentation inputPhysicalPort) {
if (inputPhysicalPort.getHwvtepNodeDescription() != null) {
- physicalPort.setDescription(inputPhysicalPort.getHwvtepNodeDescription().toString());
+ physicalPort.setDescription(inputPhysicalPort.getHwvtepNodeDescription());
}
}
/*
- * Copyright (c) 2015 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
+ * Copyright © 2015, 2017 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
sb.append("insert [");
if (row != null) {
for (Object key : row.keySet()) {
- sb.append(key + " : "+row.get(key)+" , ");
+ sb.append(key).append(" : ").append(row.get(key)).append(" , ");
}
}
sb.append("] ");
Map row = update.getRow();
if (row != null) {
for (Object key : row.keySet()) {
- sb.append(key + " : "+row.get(key)+" , ");
+ sb.append(key).append(" : ").append(row.get(key)).append(" , ");
}
}
sb.append("]");
/*
- * Copyright (c) 2016 Intel Communications Systems, Inc. and others. All rights reserved.
+ * Copyright © 2016, 2017 Intel Communications Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
qosEntryBuilder.setQosId(new Uri(getQosId(qos)));
qosEntryBuilder.setQosUuid(new Uuid(entry.getKey().toString()));
qosEntryBuilder.setQosType(
- SouthboundMapper.createQosType(qos.getTypeColumn().getData().toString()));
+ SouthboundMapper.createQosType(qos.getTypeColumn().getData()));
Qos oldQos = oldQosRows.get(entry.getKey());
setOtherConfig(transaction, qosEntryBuilder, oldQos, qos, nodeIId);
setExternalIds(transaction, qosEntryBuilder, oldQos, qos, nodeIId);
import com.google.common.base.Optional;
import com.google.common.util.concurrent.CheckedFuture;
import java.net.InetAddress;
-import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
when(externalClient.getConnectionInfo().getRemotePort()).thenReturn(8080);
when(externalClient.getConnectionInfo().getLocalAddress()).thenReturn(mock(InetAddress.class));
when(externalClient.getConnectionInfo().getLocalPort()).thenReturn(8080);
- List<String> databases = Arrays.asList("Open_vSwitch");
+ List<String> databases = Collections.singletonList("Open_vSwitch");
when(externalClient.getDatabases().get(1000, TimeUnit.MILLISECONDS)).thenReturn(databases);
PowerMockito.mockStatic(SouthboundUtil.class);
import com.google.common.util.concurrent.CheckedFuture;
import com.google.common.util.concurrent.Futures;
import java.util.ArrayList;
-import java.util.Arrays;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Mockito.when(protocolEntry.getProtocol()).thenAnswer(
(Answer<Class<? extends OvsdbBridgeProtocolBase>>) invocation -> OvsdbBridgeProtocolOpenflow10.class);
when(protocolEntry.getKey()).thenReturn(protocolEntryKey);
- when(ovsdbBridgeAugmentation.getProtocolEntry()).thenReturn(Arrays.asList(protocolEntry));
+ when(ovsdbBridgeAugmentation.getProtocolEntry()).thenReturn(Collections.singletonList(protocolEntry));
ControllerEntry controllerEntry = mock(ControllerEntry.class);
ControllerEntryKey controllerEntryKey = mock(ControllerEntryKey.class);
when(controllerEntry.getKey()).thenReturn(controllerEntryKey);
- when(ovsdbBridgeAugmentation.getControllerEntry()).thenReturn(Arrays.asList(controllerEntry));
+ when(ovsdbBridgeAugmentation.getControllerEntry()).thenReturn(Collections.singletonList(controllerEntry));
when(ovsdbBridgeAugmentation.getManagedBy()).thenReturn(ovsdbNodeRef);
final boolean isOldSchema = schemaVersion.compareTo(AUTOATTACH_FROM_VERSION) < 0;
ConnectionInfo connectionInfo = getConnectionInfo(addressStr, portNumber);
- String testAutoattachId = new String("testAutoattachEntry");
- String testSystemName = new String("testSystemName");
- String testSystemDescription = new String("testSystemDescription");
- String testAutoattachExternalKey = new String("testAutoattachExternalKey");
- String testAutoattachExternalValue = new String("testAutoattachExternalValue");
+ String testAutoattachId = "testAutoattachEntry";
+ String testSystemName = "testSystemName";
+ String testSystemDescription = "testSystemDescription";
+ String testAutoattachExternalKey = "testAutoattachExternalKey";
+ String testAutoattachExternalValue = "testAutoattachExternalValue";
try (TestBridge testBridge = new TestBridge(connectionInfo, SouthboundITConstants.BRIDGE_NAME)) {
OvsdbBridgeAugmentation bridge = getBridge(connectionInfo);
@Test
public void testCRUDTerminationPointQos() throws InterruptedException {
ConnectionInfo connectionInfo = getConnectionInfo(addressStr, portNumber);
- String testQosId = new String("testQosEntry");
+ String testQosId = "testQosEntry";
// CREATE
try (TestBridge testBridge = new TestBridge(connectionInfo, SouthboundITConstants.BRIDGE_NAME);
/*
- * Copyright (c) 2016 Inocybe and others. All rights reserved.
+ * Copyright © 2016, 2017 Inocybe and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import java.util.Arrays;
+import java.util.Collections;
import java.util.concurrent.ExecutionException;
import org.junit.Before;
import org.junit.Test;
final SupportingNode supportingNodeBuilder1 = new SupportingNodeBuilder().setKey(new SupportingNodeKey(new NodeId("id1"), TOPOLOGY_TEST)).build();
final SupportingNode supportingNodeBuilder2 = new SupportingNodeBuilder().setKey(new SupportingNodeKey(new NodeId("id2"), TOPOLOGY_TEST)).build();
- final Node data1 = new NodeBuilder(data).setSupportingNode(Arrays.asList(supportingNodeBuilder1)).build();
- final Node data2 = new NodeBuilder(data).setSupportingNode(Arrays.asList(supportingNodeBuilder2)).build();
+ final Node data1 = new NodeBuilder(data).setSupportingNode(Collections.singletonList(supportingNodeBuilder1)).build();
+ final Node data2 = new NodeBuilder(data).setSupportingNode(Collections.singletonList(supportingNodeBuilder2)).build();
mdsalUtilsAsync.put(LogicalDatastoreType.CONFIGURATION, TEST_IID, data1, operationDesc);
assertEquals(data1, readDS());
final SupportingNode supportingNodeBuilder1 = new SupportingNodeBuilder().setKey(new SupportingNodeKey(new NodeId("id1"), TOPOLOGY_TEST)).build();
final SupportingNode supportingNodeBuilder2 = new SupportingNodeBuilder().setKey(new SupportingNodeKey(new NodeId("id2"), TOPOLOGY_TEST)).build();
- final Node data1 = new NodeBuilder(data).setSupportingNode(Arrays.asList(supportingNodeBuilder1)).build();
- final Node data2 = new NodeBuilder(data).setSupportingNode(Arrays.asList(supportingNodeBuilder2)).build();
+ final Node data1 = new NodeBuilder(data).setSupportingNode(Collections.singletonList(supportingNodeBuilder1)).build();
+ final Node data2 = new NodeBuilder(data).setSupportingNode(Collections.singletonList(supportingNodeBuilder2)).build();
mdsalUtilsAsync.merge(LogicalDatastoreType.CONFIGURATION, TEST_IID, data1, operationDesc, true);
assertEquals(data1, readDS());