BUG-5648 - delete qos and queues from udpates 60/37060/1
authorJosh <jhershbe@redhat.com>
Mon, 4 Apr 2016 12:47:20 +0000 (14:47 +0200)
committerJosh <jhershbe@redhat.com>
Mon, 4 Apr 2016 12:47:20 +0000 (14:47 +0200)
Even when the update does not have updates to
the OpenVSwitch table.

See comments in Bug.

Change-Id: Ibf041e0e3315408112138b6e72a42782fac3e0a5
Signed-off-by: Josh <jhershbe@redhat.com>
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQosRemovedCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/transactions/md/OvsdbQueueRemovedCommand.java

index 53f9687ca0656a39f8bd1e3a4ea35232fcd5c024..b3e490622a3a5b6144df8e7364fc2c4683082b8e 100644 (file)
@@ -53,23 +53,21 @@ public class OvsdbQosRemovedCommand extends AbstractTransactionCommand {
         final InstanceIdentifier<Node> nodeIId = getOvsdbConnectionInstance().getInstanceIdentifier();
         final Optional<Node> ovsdbNode = SouthboundUtil.readNode(transaction, nodeIId);
         if (ovsdbNode.isPresent()) {
-            for (@SuppressWarnings("unused") OpenVSwitch openVSwitch : updatedOpenVSwitchRows.values()) {
-                List<InstanceIdentifier<QosEntries>> result = new ArrayList<>();
-                InstanceIdentifier<Node> ovsdbNodeIid =
-                        SouthboundMapper.createInstanceIdentifier(getOvsdbConnectionInstance().getNodeId());
-                if (removedQosRows != null && !removedQosRows.isEmpty()) {
-                    for (UUID qosUuid : removedQosRows.keySet()) {
-                        QosEntriesKey qosKey = getQosEntriesKey(ovsdbNode.get(), qosUuid);
-                        if (qosKey != null) {
-                            InstanceIdentifier<QosEntries> iid = ovsdbNodeIid
-                                .augmentation(OvsdbNodeAugmentation.class)
-                                .child(QosEntries.class, qosKey);
-                            result.add(iid);
-                        }
+            List<InstanceIdentifier<QosEntries>> result = new ArrayList<>();
+            InstanceIdentifier<Node> ovsdbNodeIid =
+                    SouthboundMapper.createInstanceIdentifier(getOvsdbConnectionInstance().getNodeId());
+            if (removedQosRows != null && !removedQosRows.isEmpty()) {
+                for (UUID qosUuid : removedQosRows.keySet()) {
+                    QosEntriesKey qosKey = getQosEntriesKey(ovsdbNode.get(), qosUuid);
+                    if (qosKey != null) {
+                        InstanceIdentifier<QosEntries> iid = ovsdbNodeIid
+                            .augmentation(OvsdbNodeAugmentation.class)
+                            .child(QosEntries.class, qosKey);
+                        result.add(iid);
                     }
                 }
-                deleteQos(transaction, result);
             }
+            deleteQos(transaction, result);
         }
     }
 
index 3844934e8c9b25db0d67d34ccc0445c441f275c0..1a2dba0e6d2b8eae14880025106a87ba74d8431b 100644 (file)
@@ -53,23 +53,21 @@ public class OvsdbQueueRemovedCommand extends AbstractTransactionCommand {
         final InstanceIdentifier<Node> nodeIId = getOvsdbConnectionInstance().getInstanceIdentifier();
         final Optional<Node> ovsdbNode = SouthboundUtil.readNode(transaction, nodeIId);
         if (ovsdbNode.isPresent()) {
-            for (@SuppressWarnings("unused") OpenVSwitch openVSwitch : updatedOpenVSwitchRows.values()) {
-                List<InstanceIdentifier<Queues>> result = new ArrayList<>();
-                InstanceIdentifier<Node> ovsdbNodeIid =
-                        SouthboundMapper.createInstanceIdentifier(getOvsdbConnectionInstance().getNodeId());
-                if (removedQueueRows != null && !removedQueueRows.isEmpty()) {
-                    for (UUID queueUuid : removedQueueRows.keySet()) {
-                        QueuesKey queueKey = getQueueKey(ovsdbNode.get(), queueUuid);
-                        if (queueKey != null) {
-                            InstanceIdentifier<Queues> iid = ovsdbNodeIid
-                                .augmentation(OvsdbNodeAugmentation.class)
-                                .child(Queues.class, queueKey);
-                            result.add(iid);
-                        }
+            List<InstanceIdentifier<Queues>> result = new ArrayList<>();
+            InstanceIdentifier<Node> ovsdbNodeIid =
+                    SouthboundMapper.createInstanceIdentifier(getOvsdbConnectionInstance().getNodeId());
+            if (removedQueueRows != null && !removedQueueRows.isEmpty()) {
+                for (UUID queueUuid : removedQueueRows.keySet()) {
+                    QueuesKey queueKey = getQueueKey(ovsdbNode.get(), queueUuid);
+                    if (queueKey != null) {
+                        InstanceIdentifier<Queues> iid = ovsdbNodeIid
+                            .augmentation(OvsdbNodeAugmentation.class)
+                            .child(Queues.class, queueKey);
+                        result.add(iid);
                     }
                 }
-                deleteQueue(transaction, result);
             }
+            deleteQueue(transaction, result);
         }
     }