Bug 1850 - The earlier patch missed out on removing the unnecessary 17/11217/1
authorSrini Seetharaman <srini.seetharaman@gmail.com>
Tue, 16 Sep 2014 00:09:38 +0000 (17:09 -0700)
committerSrini Seetharaman <srini.seetharaman@gmail.com>
Tue, 16 Sep 2014 00:09:38 +0000 (17:09 -0700)
call to INeutronLoadBalancerPoolMemberCRUD. This cleans that up.

Change-Id: I3aeb163e334a527a66d7752b53f4e6837e1ef56a
Signed-off-by: Srini Seetharaman <srini.seetharaman@gmail.com>
opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronLoadBalancerPoolNorthbound.java

index 7802dbb..5235030 100644 (file)
@@ -15,7 +15,6 @@ import org.codehaus.enunciate.jaxrs.ResponseCode;
 import org.codehaus.enunciate.jaxrs.StatusCodes;
 import org.opendaylight.controller.networkconfig.neutron.INeutronLoadBalancerPoolAware;
 import org.opendaylight.controller.networkconfig.neutron.INeutronLoadBalancerPoolCRUD;
 import org.codehaus.enunciate.jaxrs.StatusCodes;
 import org.opendaylight.controller.networkconfig.neutron.INeutronLoadBalancerPoolAware;
 import org.opendaylight.controller.networkconfig.neutron.INeutronLoadBalancerPoolCRUD;
-import org.opendaylight.controller.networkconfig.neutron.INeutronLoadBalancerPoolMemberCRUD;
 import org.opendaylight.controller.networkconfig.neutron.NeutronCRUDInterfaces;
 import org.opendaylight.controller.networkconfig.neutron.NeutronLoadBalancerPool;
 import org.opendaylight.controller.networkconfig.neutron.NeutronLoadBalancerPoolMember;
 import org.opendaylight.controller.networkconfig.neutron.NeutronCRUDInterfaces;
 import org.opendaylight.controller.networkconfig.neutron.NeutronLoadBalancerPool;
 import org.opendaylight.controller.networkconfig.neutron.NeutronLoadBalancerPoolMember;
@@ -62,8 +61,7 @@ import java.util.List;
 
 /**
  * For now, the LB pool member data is maintained with the INeutronLoadBalancerPoolCRUD,
 
 /**
  * For now, the LB pool member data is maintained with the INeutronLoadBalancerPoolCRUD,
- * although there may be an overlap with INeutronLoadBalancerPoolMemberCRUD's cache.
- * TODO: Consolidate and maintain a single copy
+ * and not duplicated within the INeutronLoadBalancerPoolMemberCRUD's cache.
  */
 
 @Path("/pools")
  */
 
 @Path("/pools")
@@ -393,21 +391,6 @@ public class NeutronLoadBalancerPoolNorthbound {
                 service.neutronLoadBalancerPoolDeleted(singleton);
             }
         }
                 service.neutronLoadBalancerPoolDeleted(singleton);
             }
         }
-
-        /*
-         * remove corresponding members from the member cache too
-         */
-        INeutronLoadBalancerPoolMemberCRUD loadBalancerPoolMemberInterface = NeutronCRUDInterfaces.getINeutronLoadBalancerPoolMemberCRUD(this);
-        if (loadBalancerPoolMemberInterface != null) {
-            List<NeutronLoadBalancerPoolMember> allLoadBalancerPoolMembers = new
-                ArrayList<NeutronLoadBalancerPoolMember>(loadBalancerPoolMemberInterface.getAllNeutronLoadBalancerPoolMembers());
-            Iterator<NeutronLoadBalancerPoolMember> i = allLoadBalancerPoolMembers.iterator();
-            while (i.hasNext()) {
-                NeutronLoadBalancerPoolMember member = i.next();
-                if (member.getPoolID() == loadBalancerPoolUUID)
-                    loadBalancerPoolMemberInterface.removeNeutronLoadBalancerPoolMember(member.getPoolMemberID());
-            }
-        }
         return Response.status(204).build();
     }
 }
         return Response.status(204).build();
     }
 }