Patch - https://git.opendaylight.org/gerrit/#/c/39061/ is broken 19/39219/1
authorAnil Vishnoi <vishnoianil@gmail.com>
Sun, 22 May 2016 01:15:19 +0000 (18:15 -0700)
committerAnil Vishnoi <vishnoianil@gmail.com>
Sun, 22 May 2016 01:19:16 +0000 (01:19 +0000)
.This patch fixes the breakage

Change-Id: I78034a55facd10f5921000e86bf451a90faa0691
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/AutoAttachRemovedCommand.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/AutoAttachUpdateCommand.java

index 5946c6e2b07637cb75cee24ec6ad1497aa947337..a4c175c7223f2b9ccdcc188d5a593abf5dd94ab1 100644 (file)
@@ -76,8 +76,8 @@ public class AutoAttachRemovedCommand implements TransactCommand {
 
                     if (true) {
                         // FIXME: Remove if loop after ovs community supports external_ids column in AutoAttach Table
-                        LOG.info("UNSUPPORTED FUNCTIONALITY: CRUD operations not supported from ODL for auto_attach column for"
-                                + " this version of ovsdb schema due to missing external_ids column");
+                        LOG.info("UNSUPPORTED FUNCTIONALITY: Auto Attach related CRUD operations are not supported for"
+                                + " this version of OVSDB schema due to missing external_ids column.");
                         return;
                     }
                     final OvsdbNodeAugmentation currentOvsdbNode =
index 017b9a1b88ed921fbc2cf91445d264ec165470ec..ec684a190fdb1a68addfb396f04fc7d25cdb6528 100644 (file)
@@ -79,20 +79,20 @@ public class AutoAttachUpdateCommand implements TransactCommand {
             InstanceIdentifier<OvsdbNodeAugmentation> iid,
             OvsdbNodeAugmentation ovsdbNode) {
 
-        final List<Autoattach> autoAttachList = ovsdbNode.getAutoattach();
-        if (state.getBridgeNode(iid).isPresent()) {
+        if (!state.getBridgeNode(iid).isPresent()) {
             return;
         }
-        final OvsdbNodeAugmentation currentOvsdbNode = state.getBridgeNode(iid).get().getAugmentation(OvsdbNodeAugmentation.class);
-        final List<Autoattach> currentAutoAttach = currentOvsdbNode.getAutoattach();
-
+        final List<Autoattach> autoAttachList = ovsdbNode.getAutoattach();
         if (autoAttachList != null) {
             if (true) {
                 // FIXME: Remove if loop after ovs community supports external_ids column in AutoAttach Table
-                LOG.info("UNSUPPORTED FUNCTIONALITY: CRUD operations not supported from ODL for auto_attach column for"
-                        + " this version of ovsdb schema due to missing external_ids column");
+                LOG.info("UNSUPPORTED FUNCTIONALITY: Auto Attach related CRUD operations are not supported for"
+                        + " this version of OVSDB schema due to missing external_ids column.");
                 return;
             }
+
+            final OvsdbNodeAugmentation currentOvsdbNode = state.getBridgeNode(iid).get().getAugmentation(OvsdbNodeAugmentation.class);
+            final List<Autoattach> currentAutoAttach = currentOvsdbNode.getAutoattach();
             for (final Autoattach autoAttach : autoAttachList) {
                 final AutoAttach autoAttachWrapper = TyperUtils.getTypedRowWrapper(transaction.getDatabaseSchema(), AutoAttach.class);
                 if (autoAttach.getSystemName() != null) {