SNAT implementation for DVR
[groupbasedpolicy.git] / neutron-mapper / src / main / java / org / opendaylight / groupbasedpolicy / neutron / mapper / mapping / rule / NeutronSecurityRuleAware.java
index f2626a669dbcc0b6828b07073c20a7262cfa5104..4ada5760619d5e24bc1e487c77e3896ab7be69d9 100644 (file)
@@ -125,7 +125,13 @@ public class NeutronSecurityRuleAware implements NeutronAware<SecurityRule> {
             return;
         }
         ReadWriteTransaction rwTx = dataProvider.newReadWriteTransaction();
-        boolean isNeutronSecurityRuleAdded = addNeutronSecurityRule(secRule, neutron, rwTx);
+        boolean isNeutronSecurityRuleAdded = true;
+        try {
+            isNeutronSecurityRuleAdded = addNeutronSecurityRule(secRule, neutron, rwTx);
+        } catch (NullPointerException e) {
+            LOG.error("Failed to process rule {}", secRule.getUuid());
+            isNeutronSecurityRuleAdded = false;
+        }
         if (isNeutronSecurityRuleAdded) {
             DataStoreHelper.submitToDs(rwTx);
         } else {