Merge "Bug 4163 - null pointer exception NeutronL3Adapter.getExternalNetworkSubnet"
[ovsdb.git] / openstack / net-virt / src / main / java / org / opendaylight / ovsdb / openstack / netvirt / PortSecurityHandler.java
index 85fe8ebd759bb9c0bb88fd4fa7eff88c6ce76e00..74d296f2c5128b9b15762f73a55d35311f726519 100644 (file)
@@ -1,11 +1,9 @@
 /*
- * Copyright (C) 2013 Red Hat, Inc.
+ * Copyright (c) 2013, 2015 Red Hat, Inc. and others. All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Authors : Brent Salisbury, Madhu Venugopal
  */
 
 package org.opendaylight.ovsdb.openstack.netvirt;
@@ -38,12 +36,9 @@ public class PortSecurityHandler extends AbstractHandler
 
     @Override
     public void neutronSecurityGroupCreated(NeutronSecurityGroup neutronSecurityGroup) {
-        int result = HttpURLConnection.HTTP_BAD_REQUEST;
-
-        result = canCreateNeutronSecurityGroup(neutronSecurityGroup);
+        int result = canCreateNeutronSecurityGroup(neutronSecurityGroup);
         if (result != HttpURLConnection.HTTP_CREATED) {
             LOG.debug("Neutron Security Group creation failed {} ", result);
-            return;
         }
     }
 
@@ -54,7 +49,7 @@ public class PortSecurityHandler extends AbstractHandler
 
     @Override
     public void neutronSecurityGroupUpdated(NeutronSecurityGroup neutronSecurityGroup) {
-        return;
+        // Nothing to do
     }
 
     @Override
@@ -68,7 +63,6 @@ public class PortSecurityHandler extends AbstractHandler
         int result = canDeleteNeutronSecurityGroup(neutronSecurityGroup);
         if  (result != HttpURLConnection.HTTP_OK) {
             LOG.error(" delete Neutron Security Rule validation failed for result - {} ", result);
-            return;
         }
     }
 
@@ -87,12 +81,9 @@ public class PortSecurityHandler extends AbstractHandler
 
     @Override
     public void neutronSecurityRuleCreated(NeutronSecurityRule neutronSecurityRule) {
-        int result = HttpURLConnection.HTTP_BAD_REQUEST;
-
-        result = canCreateNeutronSecurityRule(neutronSecurityRule);
+        int result = canCreateNeutronSecurityRule(neutronSecurityRule);
         if (result != HttpURLConnection.HTTP_CREATED) {
             LOG.debug("Neutron Security Group creation failed {} ", result);
-            return;
         }
     }
 
@@ -103,7 +94,7 @@ public class PortSecurityHandler extends AbstractHandler
 
     @Override
     public void neutronSecurityRuleUpdated(NeutronSecurityRule neutronSecurityRule) {
-        return;
+        // Nothing to do
     }
 
     @Override
@@ -116,7 +107,6 @@ public class PortSecurityHandler extends AbstractHandler
         int result = canDeleteNeutronSecurityRule(neutronSecurityRule);
         if  (result != HttpURLConnection.HTTP_OK) {
             LOG.error(" delete Neutron Security Rule validation failed for result - {} ", result);
-            return;
         }
     }