From: Srini Seetharaman Date: Tue, 16 Sep 2014 00:09:38 +0000 (-0700) Subject: Bug 1850 - The earlier patch missed out on removing the unnecessary X-Git-Tag: release/helium~25^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=6bc7788edc55aadd91c7e7d642799d5720cd7581;hp=510f3bd2d25c0e667a60ff5ef18cfbd40534cec0 Bug 1850 - The earlier patch missed out on removing the unnecessary call to INeutronLoadBalancerPoolMemberCRUD. This cleans that up. Change-Id: I3aeb163e334a527a66d7752b53f4e6837e1ef56a Signed-off-by: Srini Seetharaman --- diff --git a/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronLoadBalancerPoolNorthbound.java b/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronLoadBalancerPoolNorthbound.java index 7802dbb906..5235030b4f 100644 --- a/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronLoadBalancerPoolNorthbound.java +++ b/opendaylight/northbound/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/northbound/NeutronLoadBalancerPoolNorthbound.java @@ -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.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; @@ -62,8 +61,7 @@ import java.util.List; /** * 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") @@ -393,21 +391,6 @@ public class NeutronLoadBalancerPoolNorthbound { service.neutronLoadBalancerPoolDeleted(singleton); } } - - /* - * remove corresponding members from the member cache too - */ - INeutronLoadBalancerPoolMemberCRUD loadBalancerPoolMemberInterface = NeutronCRUDInterfaces.getINeutronLoadBalancerPoolMemberCRUD(this); - if (loadBalancerPoolMemberInterface != null) { - List allLoadBalancerPoolMembers = new - ArrayList(loadBalancerPoolMemberInterface.getAllNeutronLoadBalancerPoolMembers()); - Iterator i = allLoadBalancerPoolMembers.iterator(); - while (i.hasNext()) { - NeutronLoadBalancerPoolMember member = i.next(); - if (member.getPoolID() == loadBalancerPoolUUID) - loadBalancerPoolMemberInterface.removeNeutronLoadBalancerPoolMember(member.getPoolMemberID()); - } - } return Response.status(204).build(); } }