Fixes an issue in induvidual security rule update, when remote SG is
authorAswin Suryanarayanan <aswin.suryanarayanan@hp.com>
Thu, 14 Jan 2016 19:44:01 +0000 (01:14 +0530)
committerAswin Suryanarayanan <aswin.suryanarayanan@hp.com>
Thu, 14 Jan 2016 19:44:01 +0000 (01:14 +0530)
selected.

Change-Id: Id8d5ea6c6235c31f9147556244f619a15a279382
Signed-off-by: Aswin Suryanarayanan <aswin.suryanarayanan@hp.com>
openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/PortSecurityHandler.java

index 646693cd263950310ad51f608b252d49f9366816..d4cbf6a3b626ee67dd53f08dd15eab73099ef789 100644 (file)
@@ -141,23 +141,23 @@ public class PortSecurityHandler extends AbstractHandler
     private void processNeutronSecurityRuleAdded(NeutronSecurityRule neutronSecurityRule) {
         List<NeutronPort> portList = getPortWithSecurityGroup(neutronSecurityRule.getSecurityRuleGroupID());
         for (NeutronPort port:portList) {
-            syncSecurityGroup(neutronSecurityRule,port,neutronSecurityRule.getSecurityRuleGroupID(),true);
+            syncSecurityGroup(neutronSecurityRule,port,true);
         }
     }
 
     private void processNeutronSecurityRuleDeleted(NeutronSecurityRule neutronSecurityRule) {
         List<NeutronPort> portList = getPortWithSecurityGroup(neutronSecurityRule.getSecurityRuleGroupID());
         for (NeutronPort port:portList) {
-            syncSecurityGroup(neutronSecurityRule,port,neutronSecurityRule.getSecurityRuleGroupID(),false);
+            syncSecurityGroup(neutronSecurityRule,port,false);
         }
     }
 
     private void syncSecurityGroup(NeutronSecurityRule  securityRule,NeutronPort port,
-                                   String neutronSecurityGroupId,boolean write) {
+                                   boolean write) {
 
         if (null != securityRule.getSecurityRemoteGroupID()) {
             List<Neutron_IPs> vmIpList  = securityServicesManager
-                    .getVmListForSecurityGroup(port.getID(), neutronSecurityGroupId);
+                    .getVmListForSecurityGroup(port.getID(), securityRule.getSecurityRemoteGroupID());
             for (Neutron_IPs vmIp :vmIpList ) {
                 securityServicesManager.syncSecurityRule(port, securityRule, vmIp, write);
             }