@Test public void testRemovePool() { testCreateVip(); testCreatePool(); assertFalse(vip1==null); assertFalse(vip2==null); assertFalse(pool1==null); assertFalse(pool2==null); assertFalse(pool3==null); lb.removePool(pool1.id); lb.removePool(pool2.id); lb.removePool(pool3.id); assertFalse(lb.pools.containsKey(pool1.id)); assertFalse(lb.pools.containsKey(pool2.id)); assertFalse(lb.pools.containsKey(pool3.id)); assertFalse(lb.vips.get(pool1.vipId).pools.contains(pool1.id)); assertFalse(lb.vips.get(pool2.vipId).pools.contains(pool2.id)); }
@Override public int removePool(String poolId) { LBPool pool; if (pools != null) { pool = pools.get(poolId); if (pool.vipId != null) vips.get(pool.vipId).pools.remove(poolId); pools.remove(poolId); return 0; } else { return -1; } }
LoadBalancer implements IFloodlightModule,
    ILoadBalancerService, IOFMessageListener { @Override public int removePool(String poolId) { LBPool pool; if (pools != null) { pool = pools.get(poolId); if (pool.vipId != null) vips.get(pool.vipId).pools.remove(poolId); pools.remove(poolId); return 0; } else { return -1; } } }
LoadBalancer implements IFloodlightModule,
    ILoadBalancerService, IOFMessageListener { @Override public int removePool(String poolId) { LBPool pool; if (pools != null) { pool = pools.get(poolId); if (pool.vipId != null) vips.get(pool.vipId).pools.remove(poolId); pools.remove(poolId); return 0; } else { return -1; } }  }
LoadBalancer implements IFloodlightModule,
    ILoadBalancerService, IOFMessageListener { @Override public int removePool(String poolId) { LBPool pool; if (pools != null) { pool = pools.get(poolId); if (pool.vipId != null) vips.get(pool.vipId).pools.remove(poolId); pools.remove(poolId); return 0; } else { return -1; } }  @Override String getName(); @Override boolean isCallbackOrderingPrereq(OFType type, String name); @Override boolean isCallbackOrderingPostreq(OFType type, String name); @Override net.floodlightcontroller.core.IListener.Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx); void pushPacket(IPacket packet, 
                           IOFSwitch sw,
                           OFBufferId bufferId,
                           OFPort inPort,
                           OFPort outPort, 
                           FloodlightContext cntx,
                           boolean flush); void pushStaticVipRoute(boolean inBound, Route route, IPClient client, LBMember member, IOFSwitch pinSwitch); @Override Collection<LBVip> listVips(); @Override Collection<LBVip> listVip(String vipId); @Override LBVip createVip(LBVip vip); @Override LBVip updateVip(LBVip vip); @Override int removeVip(String vipId); @Override Collection<LBPool> listPools(); @Override Collection<LBPool> listPool(String poolId); @Override LBPool createPool(LBPool pool); @Override LBPool updatePool(LBPool pool); @Override int removePool(String poolId); @Override Collection<LBMember> listMembers(); @Override Collection<LBMember> listMember(String memberId); @Override Collection<LBMember> listMembersByPool(String poolId); @Override LBMember createMember(LBMember member); @Override LBMember updateMember(LBMember member); @Override int removeMember(String memberId); @Override Collection<LBMonitor> listMonitors(); @Override Collection<LBMonitor> listMonitor(String monitorId); @Override LBMonitor createMonitor(LBMonitor monitor); @Override LBMonitor updateMonitor(LBMonitor monitor); @Override int removeMonitor(String monitorId); @Override Collection<Class<? extends IFloodlightService>> getModuleServices(); @Override Map<Class<? extends IFloodlightService>, IFloodlightService> getServiceImpls(); @Override Collection<Class<? extends IFloodlightService>> getModuleDependencies(); @Override void init(FloodlightModuleContext context); @Override void startUp(FloodlightModuleContext context); }
LoadBalancer implements IFloodlightModule,
    ILoadBalancerService, IOFMessageListener { @Override public int removePool(String poolId) { LBPool pool; if (pools != null) { pool = pools.get(poolId); if (pool.vipId != null) vips.get(pool.vipId).pools.remove(poolId); pools.remove(poolId); return 0; } else { return -1; } }  @Override String getName(); @Override boolean isCallbackOrderingPrereq(OFType type, String name); @Override boolean isCallbackOrderingPostreq(OFType type, String name); @Override net.floodlightcontroller.core.IListener.Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx); void pushPacket(IPacket packet, 
                           IOFSwitch sw,
                           OFBufferId bufferId,
                           OFPort inPort,
                           OFPort outPort, 
                           FloodlightContext cntx,
                           boolean flush); void pushStaticVipRoute(boolean inBound, Route route, IPClient client, LBMember member, IOFSwitch pinSwitch); @Override Collection<LBVip> listVips(); @Override Collection<LBVip> listVip(String vipId); @Override LBVip createVip(LBVip vip); @Override LBVip updateVip(LBVip vip); @Override int removeVip(String vipId); @Override Collection<LBPool> listPools(); @Override Collection<LBPool> listPool(String poolId); @Override LBPool createPool(LBPool pool); @Override LBPool updatePool(LBPool pool); @Override int removePool(String poolId); @Override Collection<LBMember> listMembers(); @Override Collection<LBMember> listMember(String memberId); @Override Collection<LBMember> listMembersByPool(String poolId); @Override LBMember createMember(LBMember member); @Override LBMember updateMember(LBMember member); @Override int removeMember(String memberId); @Override Collection<LBMonitor> listMonitors(); @Override Collection<LBMonitor> listMonitor(String monitorId); @Override LBMonitor createMonitor(LBMonitor monitor); @Override LBMonitor updateMonitor(LBMonitor monitor); @Override int removeMonitor(String monitorId); @Override Collection<Class<? extends IFloodlightService>> getModuleServices(); @Override Map<Class<? extends IFloodlightService>, IFloodlightService> getServiceImpls(); @Override Collection<Class<? extends IFloodlightService>> getModuleDependencies(); @Override void init(FloodlightModuleContext context); @Override void startUp(FloodlightModuleContext context); public Comparator<SwitchPort> clusterIdComparator; }