From: Madhu Venugopal Date: Sat, 30 Aug 2014 16:40:25 +0000 (-0700) Subject: Fixed a minor bug that causes the deprecated CSIT Integration Bridge Domain addPort... X-Git-Tag: release/helium~95^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=e8ce6c34f06fbf02dff416368803d16f6f706707;p=ovsdb.git Fixed a minor bug that causes the deprecated CSIT Integration Bridge Domain addPort tests to fail for a long time. Change-Id: If17a4de8d0832c31de4fb8d5ee38cfe353c0d326 Signed-off-by: Madhu Venugopal --- diff --git a/plugin/src/main/java/org/opendaylight/ovsdb/plugin/impl/ConfigurationServiceImpl.java b/plugin/src/main/java/org/opendaylight/ovsdb/plugin/impl/ConfigurationServiceImpl.java index 90e02948f..7ec44f16b 100644 --- a/plugin/src/main/java/org/opendaylight/ovsdb/plugin/impl/ConfigurationServiceImpl.java +++ b/plugin/src/main/java/org/opendaylight/ovsdb/plugin/impl/ConfigurationServiceImpl.java @@ -989,7 +989,7 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ return new Status(StatusCode.NOTFOUND); } for (String intfUuid : intfRows.keySet()) { - Row intfRow = rows.get(intfUuid); + Row intfRow = intfRows.get(intfUuid); interfaceRow = client.getTypedRowWrapper(Interface.class, intfRow); if (interfaceRow == null || interfaceRow.getName() == null) continue; if (interfaceRow.getName().equals(portIdentifier)) break; @@ -997,25 +997,25 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ if (interfaceRow.getName() == null || !interfaceRow.getName().equals(portIdentifier)) { return new Status(StatusCode.NOTFOUND); } - + Interface updateInterface = client.createTypedRowWrapper(Interface.class); if (type != null) { logger.debug("Interface type : " + type); if (type.equalsIgnoreCase(OvsVswitchdSchemaConstants.PortType.TUNNEL.name())) { - interfaceRow.setType((String)configs.get(ConfigConstants.TUNNEL_TYPE)); + updateInterface.setType((String)configs.get(ConfigConstants.TUNNEL_TYPE)); if (options == null) options = new HashMap(); options.put("remote_ip", (String)configs.get(ConfigConstants.DEST_IP)); } else if (type.equalsIgnoreCase(OvsVswitchdSchemaConstants.PortType.PATCH.name()) || type.equalsIgnoreCase(OvsVswitchdSchemaConstants.PortType.INTERNAL.name())) { - interfaceRow.setType(type.toLowerCase()); + updateInterface.setType(type.toLowerCase()); } } if (options != null) { - interfaceRow.setOptions(options); + updateInterface.setOptions(options); } Status intfStatus = null; intfStatus = this.updateRow(node, interfaceRow.getSchema().getName(), portStatus.getUuid().toString(), - interfaceRow.getUuid().toString(), interfaceRow.getRow()); + interfaceRow.getUuid().toString(), updateInterface.getRow()); if (intfStatus.isSuccess()) return portStatus; return intfStatus; @@ -1069,8 +1069,8 @@ public class ConfigurationServiceImpl implements IPluginInBridgeDomainConfigServ return new Status(StatusCode.NOTFOUND); } for (String portUuid : rows.keySet()) { - Row bridgeRow = rows.get(portUuid); - port = client.getTypedRowWrapper(Port.class, bridgeRow); + Row portRow = rows.get(portUuid); + port = client.getTypedRowWrapper(Port.class, portRow); if (port.getName().equals(portIdentifier)) break; } if (port.getName() == null || !port.getName().equals(portIdentifier)) {