Merge "Changes to LogicalSwitchUpdateCommand in transact as per new yang"
authorSam Hague <shague@redhat.com>
Mon, 30 Nov 2015 16:18:09 +0000 (16:18 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 30 Nov 2015 16:18:09 +0000 (16:18 +0000)
hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/HwvtepSouthboundMapper.java
openstack/net-virt-it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/it/NetvirtIT.java
openstack/net-virt-it/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/it/SouthboundMapper.java
openstack/net-virt-sfc/impl/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/sfc/workaround/services/SfcClassifierService.java
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/BridgeConfigurationManagerImpl.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundUtil.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/SouthboundUtilTest.java
southbound/southbound-it/src/test/java/org/opendaylight/ovsdb/southbound/it/SouthboundIT.java
utils/southbound-utils/src/main/java/org/opendaylight/ovsdb/utils/southbound/utils/SouthboundUtils.java

index 55f4e76c85047c1d770e06b1a20f02a118e13a5b..7aff3e4a437429c945d2343da0fada1d2a72c54c 100644 (file)
@@ -68,7 +68,7 @@ public class HwvtepSouthboundMapper {
 
     private static InstanceIdentifier<Node> createInstanceIdentifier(IpAddress ip, PortNumber port) {
         String uriString = HwvtepSouthboundConstants.HWVTEP_URI_PREFIX + "://"
-                + new String(ip.getValue()) + ":" + port.getValue();
+                + String.valueOf(ip.getValue()) + ":" + port.getValue();
         Uri uri = new Uri(uriString);
         NodeId nodeId = new NodeId(uri);
         InstanceIdentifier<Node> path = InstanceIdentifier.create(NetworkTopology.class)
index f5a65294c4dae0e1ca9bc61f62a3b433f8197ab6..8b47a8f6a1005a142020c63d110325e33ffb4c80 100644 (file)
@@ -334,7 +334,7 @@ public class NetvirtIT extends AbstractMdsalTestBase {
     }
 
     private String connectionInfoToString(final ConnectionInfo connectionInfo) {
-        return new String(connectionInfo.getRemoteIp().getValue()) + ":" + connectionInfo.getRemotePort().getValue();
+        return String.valueOf(connectionInfo.getRemoteIp().getValue()) + ":" + connectionInfo.getRemotePort().getValue();
     }
 
     private boolean addOvsdbNode(final ConnectionInfo connectionInfo) throws InterruptedException {
@@ -440,7 +440,7 @@ public class NetvirtIT extends AbstractMdsalTestBase {
                         } else if (tokens[0].equalsIgnoreCase("ptcp")) {
                             ConnectionInfo connectionInfo = ovsdbNodeAugmentation.getConnectionInfo();
                             if (connectionInfo != null && connectionInfo.getLocalIp() != null) {
-                                controllerIpStr = new String(connectionInfo.getLocalIp().getValue());
+                                controllerIpStr = String.valueOf(connectionInfo.getLocalIp().getValue());
                                 controllersStr.add(Constants.OPENFLOW_CONNECTION_PROTOCOL
                                         + ":" + controllerIpStr + ":" + Constants.OPENFLOW_PORT);
                             } else {
index 7c7f43493c0dfd691cb1b74459d6b0b2fa34ddc2..33a9d7b7813dc5a17eff7b418ac10cc470584f71 100644 (file)
@@ -125,7 +125,7 @@ public class SouthboundMapper {
 
     public static NodeId createNodeId(IpAddress ip, PortNumber port) {
         String uriString = SouthboundConstants.OVSDB_URI_PREFIX + "://"
-                + new String(ip.getValue()) + ":" + port.getValue();
+                + String.valueOf(ip.getValue()) + ":" + port.getValue();
         Uri uri = new Uri(uriString);
         return new NodeId(uri);
     }
index 947dcec1f3d8211f94d7796df07e0985a468745f..d3357053d1e7ebf0738ba3c1753da5d14d7fa69b 100644 (file)
@@ -68,11 +68,8 @@ public class SfcClassifierService extends AbstractServiceInstance implements Con
 
     }
 
-    //private AtomicLong flowCookieInc = new AtomicLong(0x1L);
     private BigInteger getCookie(FlowID flowID) {
-        String cookieString = new String().format("1110%02d%010d", flowID.value, cookieIndex++);
-                //new String().format("1100%02d00%04d", flowID.value, flowCookieInc.getAndIncrement());
-                // "1100%02000000d%04d"
+        String cookieString = String.format("1110%02d%010d", flowID.value, cookieIndex++);
         return new BigInteger(cookieString, 16);
     }
 
index 3a3ea5dc38847e92cf272340ded4d4327c8a09eb..d59f53601734280d497669f225369496a3d40f84 100644 (file)
@@ -561,7 +561,7 @@ public class BridgeConfigurationManagerImpl implements BridgeConfigurationManage
                         } else if (tokens[0].equalsIgnoreCase("ptcp")) {
                             ConnectionInfo connectionInfo = ovsdbNodeAugmentation.getConnectionInfo();
                             if (connectionInfo != null && connectionInfo.getLocalIp() != null) {
-                                controllerIpStr = new String(connectionInfo.getLocalIp().getValue());
+                                controllerIpStr = String.valueOf(connectionInfo.getLocalIp().getValue());
                                 controllersStr.add(Constants.OPENFLOW_CONNECTION_PROTOCOL
                                         + ":" + controllerIpStr + ":" + Constants.OPENFLOW_PORT);
                             } else {
index 4786871edff3d167e83549d18e3a067eee0ef875..b2a1ed7d66349316a749b706b11026f1da47ab24 100644 (file)
@@ -159,7 +159,7 @@ public class SouthboundUtil {
         ConnectionInfo connectionInfo = ovsdbNodeAugmentation.getConnectionInfo();
         LOG.info("connectionInfo: {}", connectionInfo);
         if (connectionInfo != null && connectionInfo.getLocalIp() != null) {
-            ipAddr = new String(connectionInfo.getLocalIp().getValue());
+            ipAddr = String.valueOf(connectionInfo.getLocalIp().getValue());
         }
         if (ipAddr == null) {
             ipAddr = getLocalControllerHostIpAddress();
index a6844344e0d697819b2dc9bce3f595e64f256e38..06bc843199afda3537f703222785001a250d2cd4 100644 (file)
@@ -178,7 +178,7 @@ public class SouthboundUtilTest {
         char[] ipAddress = {'0', '.', '0', '.', '0', '.', '0'};
         when(connectionInfo.getLocalIp().getValue()).thenReturn(ipAddress);
         String testTarget = SouthboundConstants.OPENFLOW_CONNECTION_PROTOCOL + ":"
-                + new String(ipAddress) + ":" + SouthboundConstants.DEFAULT_OPENFLOW_PORT;
+                + String.valueOf(ipAddress) + ":" + SouthboundConstants.DEFAULT_OPENFLOW_PORT;
         assertEquals("Incorrect controller IP", testTarget, SouthboundUtil.getControllerTarget(ovsdbNode));
         verify(ovsdbNode).getAugmentation(OvsdbNodeAugmentation.class);
         verify(ovsdbNodeAugmentation).getConnectionInfo();
index f46e15fcf9f969f520b81fcbf377342f0eae010a..4c71b499d782ee5c089dc11c254e0008b0ece38d 100644 (file)
@@ -379,7 +379,8 @@ public class SouthboundIT extends AbstractMdsalTestBase {
     }
 
     private static String connectionInfoToString(final ConnectionInfo connectionInfo) {
-        return new String(connectionInfo.getRemoteIp().getValue()) + ":" + connectionInfo.getRemotePort().getValue();
+        return String.valueOf(
+                connectionInfo.getRemoteIp().getValue()) + ":" + connectionInfo.getRemotePort().getValue();
     }
 
     @Test
@@ -1489,7 +1490,7 @@ public class SouthboundIT extends AbstractMdsalTestBase {
 
     public static NodeId createNodeId(IpAddress ip, PortNumber port) {
         String uriString = SouthboundConstants.OVSDB_URI_PREFIX + "://"
-                + new String(ip.getValue()) + ":" + port.getValue();
+                + String.valueOf(ip.getValue()) + ":" + port.getValue();
         Uri uri = new Uri(uriString);
         return new NodeId(uri);
     }
index 9111acc92e35f5b81e5b8e7873461039f6d52bfa..978c5223b5384d2c8a330abc6c4bc6885742d1e6 100644 (file)
@@ -86,7 +86,7 @@ public class SouthboundUtils {
 
     public NodeId createNodeId(IpAddress ip, PortNumber port) {
         String uriString = SouthboundConstants.OVSDB_URI_PREFIX + "://"
-                + new String(ip.getValue()) + ":" + port.getValue();
+                + String.valueOf(ip.getValue()) + ":" + port.getValue();
         Uri uri = new Uri(uriString);
         return new NodeId(uri);
     }
@@ -168,7 +168,8 @@ public class SouthboundUtils {
     }
 
     public String connectionInfoToString(final ConnectionInfo connectionInfo) {
-        return new String(connectionInfo.getRemoteIp().getValue()) + ":" + connectionInfo.getRemotePort().getValue();
+        return String.valueOf(
+                connectionInfo.getRemoteIp().getValue()) + ":" + connectionInfo.getRemotePort().getValue();
     }
 
     public boolean addOvsdbNode(final ConnectionInfo connectionInfo) {