Update exception whitelist
[integration/test.git] / csit / libraries / netvirt / excepts.py
index d8a097b87b69e384e4a5490ddc52083f61207666..26597fdf6be7c5a5fa80e3deb8c774c607bccf71 100644 (file)
@@ -12,7 +12,7 @@ _whitelist = [
          "Optimistic lock failed for path /(urn:opendaylight:inventory?revision=2013-08-19)nodes/node/node" +
          "[{(urn:opendaylight:inventory?revision=2013-08-19)id=openflow",
          "table/table[{(urn:opendaylight:flow:inventory?revision=2013-08-19)id=21}]/flow/flow" +
-         "[{(urn:opendaylight:flow:inventory?revision=2013-08-19)id=L3."
+         "[{(urn:opendaylight:flow:inventory?revision=2013-08-19)id=L3.",
          "Conflicting modification for path /(urn:opendaylight:inventory?revision=2013-08-19)nodes/node/node" +
          "[{(urn:opendaylight:inventory?revision=2013-08-19)id=",
          "table/table[{(urn:opendaylight:flow:inventory?revision=2013-08-19)id=21}]/flow/flow" +
@@ -66,7 +66,7 @@ _whitelist = [
      "id": "ConflictingModificationAppliedException",
      "context": [
          "Node was deleted by other transaction",
-         "OptimisticLockFailedException: Optimistic lock failed."
+         "OptimisticLockFailedException: Optimistic lock failed.",
          "Conflicting modification for path /(urn:opendaylight:netvirt:elan?revision=2015-06-02)elan-" +
          "forwarding-tables/mac-table/mac-table[{(urn:opendaylight:netvirt:elan?revision=2015-06-02)" +
          "elan-instance-name="
@@ -92,7 +92,7 @@ _whitelist = [
     {"issue": "https://jira.opendaylight.org/browse/NETVIRT-1270",
      "id": "ExecutionException",
      "context": [
-         "OptimisticLockFailedException: Optimistic lock failed.",
+         "OptimisticLockFailedException: Optimistic lock failed",
          "ConflictingModificationAppliedException: Node children was modified by other transaction",
          "removeOrUpdateVpnToDpnList: Error removing from dpnToVpnList for vpn "
      ]},
@@ -109,7 +109,26 @@ _whitelist = [
          "Node was deleted by other transaction",
          "Optimistic lock failed for path /(urn:opendaylight:neutron?revision=2015-07-12)" +
          "neutron/networks/network/network[{(urn:opendaylight:neutron?revision=2015-07-12)uuid=",
-         "Got OptimisticLockFailedException"
+         "Conflicting modification for path /(urn:opendaylight:neutron?revision=2015-07-12)" +
+         "neutron/networks/network/network[{(urn:opendaylight:neutron?revision=2015-07-12)uuid="
+     ]},
+    {"issue": "https://jira.opendaylight.org/browse/NEUTRON-157",
+     "id": "ConflictingModificationAppliedException",
+     "context": [
+         "Got OptimisticLockFailedException", "NeutronNetwork [networkUUID=",
+         "AbstractTranscriberInterface"
+     ]},
+    {"issue": "https://jira.opendaylight.org/browse/NEUTRON-157",
+     "id": "ConflictingModificationAppliedException",
+     "context": [
+         "Got OptimisticLockFailedException",
+         "AbstractTranscriberInterface"
+     ]},
+    {"issue": "https://jira.opendaylight.org/browse/NEUTRON-157",
+     "id": "ConflictingModificationAppliedException",
+     "context": [
+         "Node was created by other transaction",
+         "Optimistic lock failed for path /(urn:opendaylight:neutron?revision=2015-07-12)neutron"
      ]},
     # oxygen
     {"issue": "https://jira.opendaylight.org/browse/NEUTRON-157",
@@ -117,7 +136,6 @@ _whitelist = [
      "context": [
          "Node was deleted by other transaction",
          "OptimisticLockFailedException: Optimistic lock failed.",
-         "Got OptimisticLockFailedException",
          "Conflicting modification for path /(urn:opendaylight:neutron?revision=2015-07-12)" +
          "neutron/networks/network/network[{(urn:opendaylight:neutron?revision=2015-07-12)uuid=",
      ]},
@@ -211,9 +229,8 @@ def check_exceptions():
                     exwe_str = "__".join(_ts_list[exwe_index])
                     if whitelist_context in exwe_str:
                         num_context_matches += 1
-                        break
             # Mark this exception as a known issue if all the context's matched
-            if num_context_matches == len(whitelist_contexts):
+            if num_context_matches >= len(whitelist_contexts):
                 ex["issue"] = whitelist.get("issue")
                 _match.append(ex)
                 logging.info("known exception was seen: {}".format(ex["issue"]))