test_class.declarator: lb
test_class.modifier: protected
test_class.original_string: protected LoadBalancer lb;
test_class.type: LoadBalancer
test_class.var_name: lb
test_class.declarator: cntx
test_class.modifier: protected
test_class.original_string: protected FloodlightContext cntx;
test_class.type: FloodlightContext
test_class.var_name: cntx
test_class.declarator: fmc
test_class.modifier: protected
test_class.original_string: protected FloodlightModuleContext fmc;
test_class.type: FloodlightModuleContext
test_class.var_name: fmc
test_class.declarator: deviceManager
test_class.modifier: protected
test_class.original_string: protected MockDeviceManager deviceManager;
test_class.type: MockDeviceManager
test_class.var_name: deviceManager
test_class.declarator: tps
test_class.modifier: protected
test_class.original_string: protected MockThreadPoolService tps;
test_class.type: MockThreadPoolService
test_class.var_name: tps
test_class.declarator: entityClassifier
test_class.modifier: protected
test_class.original_string: protected DefaultEntityClassifier entityClassifier;
test_class.type: DefaultEntityClassifier
test_class.var_name: entityClassifier
test_class.declarator: routingEngine
test_class.modifier: protected
test_class.original_string: protected IRoutingService routingEngine;
test_class.type: IRoutingService
test_class.var_name: routingEngine
test_class.declarator: topology
test_class.modifier: protected
test_class.original_string: protected ITopologyService topology;
test_class.type: ITopologyService
test_class.var_name: topology
test_class.declarator: sfp
test_class.modifier: protected
test_class.original_string: protected StaticFlowEntryPusher sfp;
test_class.type: StaticFlowEntryPusher
test_class.var_name: sfp
test_class.declarator: storage
test_class.modifier: protected
test_class.original_string: protected MemoryStorageSource storage;
test_class.type: MemoryStorageSource
test_class.var_name: storage
test_class.declarator: restApi
test_class.modifier: protected
test_class.original_string: protected RestApiServer restApi;
test_class.type: RestApiServer
test_class.var_name: restApi
test_class.declarator: vipsResource
test_class.modifier: protected
test_class.original_string: protected VipsResource vipsResource;
test_class.type: VipsResource
test_class.var_name: vipsResource
test_class.declarator: poolsResource
test_class.modifier: protected
test_class.original_string: protected PoolsResource poolsResource;
test_class.type: PoolsResource
test_class.var_name: poolsResource
test_class.declarator: membersResource
test_class.modifier: protected
test_class.original_string: protected MembersResource membersResource;
test_class.type: MembersResource
test_class.var_name: membersResource
test_class.declarator: mockSyncService
test_class.modifier: private
test_class.original_string: private MockSyncService mockSyncService;
test_class.type: MockSyncService
test_class.var_name: mockSyncService
test_class.declarator: debugCounterService
test_class.modifier: protected
test_class.original_string: protected IDebugCounterService debugCounterService;
test_class.type: IDebugCounterService
test_class.var_name: debugCounterService
test_class.declarator: debugEventService
test_class.modifier: protected
test_class.original_string: protected IDebugEventService debugEventService;
test_class.type: IDebugEventService
test_class.var_name: debugEventService
test_class.declarator: vip1
test_class.modifier: protected
test_class.original_string: protected LBVip vip1, vip2;
test_class.type: LBVip
test_class.var_name: vip1
test_class.declarator: pool1
test_class.modifier: protected
test_class.original_string: protected LBPool pool1, pool2, pool3;
test_class.type: LBPool
test_class.var_name: pool1
test_class.declarator: member1
test_class.modifier: protected
test_class.original_string: protected LBMember member1, member2, member3, member4;
test_class.type: LBMember
test_class.var_name: member1
test_class.declarator: factory
test_class.modifier: private
test_class.original_string: private OFFactory factory;
test_class.type: OFFactory
test_class.var_name: factory
test_class.file: src/agents/apps/floodlight/floodlight-1.0/src/test/java/net/floodlightcontroller/loadbalancer/LoadBalancerTest.java
test_class.identifier: LoadBalancerTest
test_class.superclass: extends FloodlightTestCase
test_case.body: @Test
  	public void testTwoSubsequentIcmpRequests() throws Exception {
  		testCreateVip();
  		testCreatePool();
  		testCreateMember();
  
  		IOFSwitch sw1;
  
  		IPacket arpRequest1, arpReply1, icmpPacket1, icmpPacket2;
  
  		byte[] arpRequest1Serialized;
  		byte[] arpReply1Serialized;
  		byte[] icmpPacket1Serialized, icmpPacket2Serialized;
  
  		OFPacketIn arpRequestPacketIn1;
  		OFPacketIn icmpPacketIn1, icmpPacketIn2;
  
  		OFPacketOut arpReplyPacketOut1;
  
  		Capture<OFMessage> wc1 = new Capture<OFMessage>(CaptureType.ALL);
  
  		sw1 = EasyMock.createNiceMock(IOFSwitch.class);
  		expect(sw1.getId()).andReturn(DatapathId.of(1L)).anyTimes();
  		expect(sw1.hasAttribute(IOFSwitch.PROP_SUPPORTS_OFPP_TABLE)).andReturn(true).anyTimes();
  		expect(sw1.getOFFactory()).andReturn(factory).anyTimes();
  		sw1.write(capture(wc1));
  		expectLastCall().anyTimes();
  		sw1.flush();
  		expectLastCall().anyTimes();
  		
  		replay(sw1);
  		sfp.switchAdded(DatapathId.of(1L));
  		
  		verify(sw1);
  
  		/* Test plan:
  		 * - two clients and two servers on sw1 port 1, 2, 3, 4
  		 * - mock arp request received towards vip1 from (1L, 1)
  		 * - proxy arp got pushed out to (1L, 1)- check sw1 getting the packetout
  		 * - mock icmp request received towards vip1 from (1L, 1)
  		 * - device manager list of devices queried to identify source and dest devices
  		 * - routing engine queried to get inbound and outbound routes
  		 * - check getRoute calls and responses
  		 * - sfp called to install flows
  		 * - check sfp calls
  		 */
  
  		// Build topology
  		reset(topology);
  		expect(topology.isIncomingBroadcastAllowed(DatapathId.of(anyLong()), OFPort.of(anyShort()))).andReturn(true).anyTimes();
  		expect(topology.getL2DomainId(DatapathId.of(1L))).andReturn(DatapathId.of(1L)).anyTimes();
  		expect(topology.isAttachmentPointPort(DatapathId.of(1L), OFPort.of(1))).andReturn(true).anyTimes();
  		expect(topology.isAttachmentPointPort(DatapathId.of(1L), OFPort.of(2))).andReturn(true).anyTimes();
  		expect(topology.isAttachmentPointPort(DatapathId.of(1L), OFPort.of(3))).andReturn(true).anyTimes();
  		expect(topology.isAttachmentPointPort(DatapathId.of(1L), OFPort.of(4))).andReturn(true).anyTimes();
  		replay(topology);
  
  		// Build arp packets
  		arpRequest1 = new Ethernet()
  		.setSourceMACAddress("00:00:00:00:00:01")
  		.setDestinationMACAddress("ff:ff:ff:ff:ff:ff")
  		.setEtherType(Ethernet.TYPE_ARP)
  		.setVlanID((short) 0)
  		.setPriorityCode((byte) 0)
  		.setPayload(
  				new ARP()
  				.setHardwareType(ARP.HW_TYPE_ETHERNET)
  				.setProtocolType(ARP.PROTO_TYPE_IP)
  				.setHardwareAddressLength((byte) 6)
  				.setProtocolAddressLength((byte) 4)
  				.setOpCode(ARP.OP_REQUEST)
  				.setSenderHardwareAddress(HexString.fromHexString("00:00:00:00:00:01"))
  				.setSenderProtocolAddress(IPv4.toIPv4AddressBytes("10.0.0.1"))
  				.setTargetHardwareAddress(HexString.fromHexString("00:00:00:00:00:00"))
  				.setTargetProtocolAddress(IPv4.toIPv4AddressBytes("10.0.0.100")));
  
  		arpRequest1Serialized = arpRequest1.serialize();
  
  		arpRequestPacketIn1 = factory.buildPacketIn()
  				.setMatch(factory.buildMatch().setExact(MatchField.IN_PORT, OFPort.of(1)).build())
  				.setBufferId(OFBufferId.NO_BUFFER)
  				.setData(arpRequest1Serialized)
  				.setReason(OFPacketInReason.NO_MATCH)
  				.build();
  
  		IFloodlightProviderService.bcStore.put(cntx,
  				IFloodlightProviderService.CONTEXT_PI_PAYLOAD,
  				(Ethernet) arpRequest1);
  
  		// Mock proxy arp packet-out
  		arpReply1 = new Ethernet()
  		.setSourceMACAddress(LBVip.LB_PROXY_MAC)
  		.setDestinationMACAddress(HexString.fromHexString("00:00:00:00:00:01"))
  		.setEtherType(Ethernet.TYPE_ARP)
  		.setVlanID((short) 0)
  		.setPriorityCode((byte) 0)
  		.setPayload(
  				new ARP()
  				.setHardwareType(ARP.HW_TYPE_ETHERNET)
  				.setProtocolType(ARP.PROTO_TYPE_IP)
  				.setHardwareAddressLength((byte) 6)
  				.setProtocolAddressLength((byte) 4)
  				.setOpCode(ARP.OP_REPLY)
  				.setSenderHardwareAddress(HexString.fromHexString(LBVip.LB_PROXY_MAC))
  				.setSenderProtocolAddress(IPv4.toIPv4AddressBytes("10.0.0.100"))
  				.setTargetHardwareAddress(HexString.fromHexString("00:00:00:00:00:01"))
  				.setTargetProtocolAddress(IPv4.toIPv4AddressBytes("10.0.0.1")));
  
  		arpReply1Serialized = arpReply1.serialize();
  
  		List<OFAction> poactions = new ArrayList<OFAction>();
  		poactions.add(factory.actions().output(arpRequestPacketIn1.getMatch().get(MatchField.IN_PORT), Integer.MAX_VALUE));
  		arpReplyPacketOut1 = factory.buildPacketOut()
  				.setBufferId(OFBufferId.NO_BUFFER)
  				.setInPort(OFPort.ANY)
  				.setActions(poactions)
  				.setData(arpReply1Serialized)
  				.setXid(22)
  				.build();
  		sw1.write(arpReplyPacketOut1);
  		
  		lb.receive(sw1, arpRequestPacketIn1, cntx);
  		verify(sw1, topology);
  
  		assertTrue(wc1.hasCaptured());  // wc1 should get packetout
  
  		List<OFMessage> msglist1 = wc1.getValues();
  
  		for (OFMessage m: msglist1) {
  			if (m instanceof OFPacketOut)
  				assertTrue(OFMessageUtils.equalsIgnoreXid(arpReplyPacketOut1, m));
  			else
  				assertTrue(false); // unexpected message
  		}
  
  		//
  		// Skip arpRequest2 test - in reality this will happen, but for unit test the same logic
  		// is already validated with arpRequest1 test above
  		//
  		
  		// Keep the StaticFlowEntryPusher happy with a switch in the switch service
  		Map<DatapathId, IOFSwitch> switches = new HashMap<DatapathId, IOFSwitch>(1);
  		switches.put(DatapathId.of(1), sw1);
  		getMockSwitchService().setSwitches(switches);
  
  
  		// Build icmp packets
  		icmpPacket1 = new Ethernet()
  		.setSourceMACAddress("00:00:00:00:00:01")
  		.setDestinationMACAddress(LBVip.LB_PROXY_MAC)
  		.setEtherType(Ethernet.TYPE_IPv4)
  		.setVlanID((short) 0)
  		.setPriorityCode((byte) 0)
  		.setPayload(
  				new IPv4()
  				.setSourceAddress("10.0.0.1")
  				.setDestinationAddress("10.0.0.100")
  				.setProtocol(IpProtocol.ICMP)
  				.setPayload(new ICMP()
  				.setIcmpCode((byte) 0)
  				.setIcmpType((byte) 0)));
  
  		icmpPacket1Serialized = icmpPacket1.serialize();
  
  		icmpPacketIn1 = OFFactories.getFactory(OFVersion.OF_13).buildPacketIn()
  				.setBufferId(OFBufferId.NO_BUFFER)
  				.setMatch(OFFactories.getFactory(OFVersion.OF_13).buildMatch().setExact(MatchField.IN_PORT, OFPort.of(1)).build())
  				.setData(icmpPacket1Serialized)
  				.setReason(OFPacketInReason.NO_MATCH)
  				.build();
  		icmpPacket2 = new Ethernet()
  		.setSourceMACAddress("00:00:00:00:00:02")
  		.setDestinationMACAddress(LBVip.LB_PROXY_MAC)
  		.setEtherType(Ethernet.TYPE_IPv4)
  		.setVlanID((short) 0)
  		.setPriorityCode((byte) 0)
  		.setPayload(
  				new IPv4()
  				.setSourceAddress("10.0.0.2")
  				.setDestinationAddress("10.0.0.100")
  				.setProtocol(IpProtocol.ICMP)
  				.setPayload(new ICMP()
  				.setIcmpCode((byte) 0)
  				.setIcmpType((byte) 0)));
  
  		icmpPacket2Serialized = icmpPacket2.serialize();
  
  		icmpPacketIn2 = OFFactories.getFactory(OFVersion.OF_13).buildPacketIn()
  				.setBufferId(OFBufferId.NO_BUFFER)
  				.setMatch(OFFactories.getFactory(OFVersion.OF_13).buildMatch().setExact(MatchField.IN_PORT, OFPort.of(2)).build())
  				.setData(icmpPacket2Serialized)
  				.setReason(OFPacketInReason.NO_MATCH)
  				.build();
  		MacAddress dataLayerSource1 = ((Ethernet)icmpPacket1).getSourceMACAddress();
  		IPv4Address networkSource1 = ((IPv4)((Ethernet)icmpPacket1).getPayload()).getSourceAddress();
  		MacAddress dataLayerDest1 = MacAddress.of("00:00:00:00:00:03");
  		IPv4Address networkDest1 = IPv4Address.of("10.0.0.3");
  		MacAddress dataLayerSource2 = ((Ethernet)icmpPacket2).getSourceMACAddress();
  		IPv4Address networkSource2 = ((IPv4)((Ethernet)icmpPacket2).getPayload()).getSourceAddress();
  		MacAddress dataLayerDest2 = MacAddress.of("00:00:00:00:00:04");
  		IPv4Address networkDest2 = IPv4Address.of("10.0.0.4");
  
  		deviceManager.learnEntity(dataLayerSource1.getLong(),
  				null, networkSource1.getInt(),
  				1L, 1);
  		deviceManager.learnEntity(dataLayerSource2.getLong(),
  				null, networkSource2.getInt(),
  				1L, 2);
  		deviceManager.learnEntity(dataLayerDest1.getLong(),
  				null, networkDest1.getInt(),
  				1L, 3);
  		deviceManager.learnEntity(dataLayerDest2.getLong(),
  				null, networkDest2.getInt(),
  				1L, 4);
  
  		// in bound #1
  		Route route1 = new Route(DatapathId.of(1L), DatapathId.of(1L));
  		List<NodePortTuple> nptList1 = new ArrayList<NodePortTuple>();
  		nptList1.add(new NodePortTuple(DatapathId.of(1L), OFPort.of(1)));
  		nptList1.add(new NodePortTuple(DatapathId.of(1L), OFPort.of(3)));
  		route1.setPath(nptList1);
  		expect(routingEngine.getRoute(DatapathId.of(1L), OFPort.of(1), DatapathId.of(1L), OFPort.of(3), U64.of(0))).andReturn(route1).atLeastOnce();
  
  		// outbound #1
  		Route route2 = new Route(DatapathId.of(1L), DatapathId.of(1L));
  		List<NodePortTuple> nptList2 = new ArrayList<NodePortTuple>();
  		nptList2.add(new NodePortTuple(DatapathId.of(1L), OFPort.of(3)));
  		nptList2.add(new NodePortTuple(DatapathId.of(1L), OFPort.of(1)));
  		route2.setPath(nptList2);
  		expect(routingEngine.getRoute(DatapathId.of(1L), OFPort.of(3), DatapathId.of(1L), OFPort.of(1), U64.of(0))).andReturn(route2).atLeastOnce();
  
  		// inbound #2
  		Route route3 = new Route(DatapathId.of(1L), DatapathId.of(1L));
  		List<NodePortTuple> nptList3 = new ArrayList<NodePortTuple>();
  		nptList3.add(new NodePortTuple(DatapathId.of(1L), OFPort.of(2)));
  		nptList3.add(new NodePortTuple(DatapathId.of(1L), OFPort.of(4)));
  		route3.setPath(nptList3);
  		expect(routingEngine.getRoute(DatapathId.of(1L), OFPort.of(2), DatapathId.of(1L), OFPort.of(4), U64.of(0))).andReturn(route3).atLeastOnce();
  
  		// outbound #2
  		Route route4 = new Route(DatapathId.of(1L), DatapathId.of(1L));
  		List<NodePortTuple> nptList4 = new ArrayList<NodePortTuple>();
  		nptList4.add(new NodePortTuple(DatapathId.of(1L), OFPort.of(4)));
  		nptList4.add(new NodePortTuple(DatapathId.of(1L), OFPort.of(2)));
  		route4.setPath(nptList3);
  		expect(routingEngine.getRoute(DatapathId.of(1L), OFPort.of(4), DatapathId.of(1L), OFPort.of(2), U64.of(0))).andReturn(route4).atLeastOnce();
  
  		replay(routingEngine);
  
  		wc1.reset();
  
  		IFloodlightProviderService.bcStore.put(cntx,
  				IFloodlightProviderService.CONTEXT_PI_PAYLOAD,
  				(Ethernet) icmpPacket1);
  		lb.receive(sw1, icmpPacketIn1, cntx);
  
  		IFloodlightProviderService.bcStore.put(cntx,
  				IFloodlightProviderService.CONTEXT_PI_PAYLOAD,
  				(Ethernet) icmpPacket2);
  		lb.receive(sw1, icmpPacketIn2, cntx);
  
  		assertTrue(wc1.hasCaptured());  // wc1 should get packetout
  
  		List<OFMessage> msglist2 = wc1.getValues();
  
  		assertTrue(msglist2.size()==2); // has inbound and outbound packetouts
  		// TODO: not seeing flowmods yet ...
  
  		Map<String, OFFlowMod> map = sfp.getFlows(DatapathId.of(1L));
  
  		assertTrue(map.size()==4);
  	}
test_case.class_method_signature: LoadBalancerTest.testTwoSubsequentIcmpRequests()
test_case.full_signature: @Test public void testTwoSubsequentIcmpRequests()
test_case.identifier: testTwoSubsequentIcmpRequests
test_case.invocations: testCreateVip testCreatePool testCreateMember createNiceMock anyTimes andReturn expect getId of anyTimes andReturn expect hasAttribute anyTimes andReturn expect getOFFactory write capture anyTimes expectLastCall flush anyTimes expectLastCall replay switchAdded of verify reset anyTimes andReturn expect isIncomingBroadcastAllowed of anyLong of anyShort anyTimes andReturn expect getL2DomainId of of anyTimes andReturn expect isAttachmentPointPort of of anyTimes andReturn expect isAttachmentPointPort of of anyTimes andReturn expect isAttachmentPointPort of of anyTimes andReturn expect isAttachmentPointPort of of replay setPayload setPriorityCode setVlanID setEtherType setDestinationMACAddress setSourceMACAddress setTargetProtocolAddress setTargetHardwareAddress setSenderProtocolAddress setSenderHardwareAddress setOpCode setProtocolAddressLength setHardwareAddressLength setProtocolType setHardwareType fromHexString toIPv4AddressBytes fromHexString toIPv4AddressBytes serialize build setReason setData setBufferId setMatch buildPacketIn build setExact buildMatch of put setPayload setPriorityCode setVlanID setEtherType setDestinationMACAddress setSourceMACAddress fromHexString setTargetProtocolAddress setTargetHardwareAddress setSenderProtocolAddress setSenderHardwareAddress setOpCode setProtocolAddressLength setHardwareAddressLength setProtocolType setHardwareType fromHexString toIPv4AddressBytes fromHexString toIPv4AddressBytes serialize add output actions get getMatch build setXid setData setActions setInPort setBufferId buildPacketOut write receive verify assertTrue hasCaptured getValues assertTrue equalsIgnoreXid assertTrue put of setSwitches getMockSwitchService setPayload setPriorityCode setVlanID setEtherType setDestinationMACAddress setSourceMACAddress setPayload setProtocol setDestinationAddress setSourceAddress setIcmpType setIcmpCode serialize build setReason setData setMatch setBufferId buildPacketIn getFactory build setExact buildMatch getFactory of setPayload setPriorityCode setVlanID setEtherType setDestinationMACAddress setSourceMACAddress setPayload setProtocol setDestinationAddress setSourceAddress setIcmpType setIcmpCode serialize build setReason setData setMatch setBufferId buildPacketIn getFactory build setExact buildMatch getFactory of getSourceMACAddress getSourceAddress getPayload of of getSourceMACAddress getSourceAddress getPayload of of learnEntity getLong getInt learnEntity getLong getInt learnEntity getLong getInt learnEntity getLong getInt of of add of of add of of setPath atLeastOnce andReturn expect getRoute of of of of of of of add of of add of of setPath atLeastOnce andReturn expect getRoute of of of of of of of add of of add of of setPath atLeastOnce andReturn expect getRoute of of of of of of of add of of add of of setPath atLeastOnce andReturn expect getRoute of of of of of replay reset put receive put receive assertTrue hasCaptured getValues assertTrue size getFlows of assertTrue size
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testTwoSubsequentIcmpRequests()
focal_class.declarator: log = LoggerFactory.getLogger(LoadBalancer.class)
focal_class.modifier: protected static
focal_class.original_string: protected static Logger log = LoggerFactory.getLogger(LoadBalancer.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: floodlightProviderService
focal_class.modifier: protected
focal_class.original_string: protected IFloodlightProviderService floodlightProviderService;
focal_class.type: IFloodlightProviderService
focal_class.var_name: floodlightProviderService
focal_class.declarator: restApiService
focal_class.modifier: protected
focal_class.original_string: protected IRestApiService restApiService;
focal_class.type: IRestApiService
focal_class.var_name: restApiService
focal_class.declarator: debugCounterService
focal_class.modifier: protected
focal_class.original_string: protected IDebugCounterService debugCounterService;
focal_class.type: IDebugCounterService
focal_class.var_name: debugCounterService
focal_class.declarator: counterPacketOut
focal_class.modifier: private
focal_class.original_string: private IDebugCounter counterPacketOut;
focal_class.type: IDebugCounter
focal_class.var_name: counterPacketOut
focal_class.declarator: deviceManagerService
focal_class.modifier: protected
focal_class.original_string: protected IDeviceService deviceManagerService;
focal_class.type: IDeviceService
focal_class.var_name: deviceManagerService
focal_class.declarator: routingEngineService
focal_class.modifier: protected
focal_class.original_string: protected IRoutingService routingEngineService;
focal_class.type: IRoutingService
focal_class.var_name: routingEngineService
focal_class.declarator: topologyService
focal_class.modifier: protected
focal_class.original_string: protected ITopologyService topologyService;
focal_class.type: ITopologyService
focal_class.var_name: topologyService
focal_class.declarator: sfpService
focal_class.modifier: protected
focal_class.original_string: protected IStaticFlowEntryPusherService sfpService;
focal_class.type: IStaticFlowEntryPusherService
focal_class.var_name: sfpService
focal_class.declarator: switchService
focal_class.modifier: protected
focal_class.original_string: protected IOFSwitchService switchService;
focal_class.type: IOFSwitchService
focal_class.var_name: switchService
focal_class.declarator: vips
focal_class.modifier: protected
focal_class.original_string: protected HashMap<String, LBVip> vips;
focal_class.type: HashMap<String, LBVip>
focal_class.var_name: vips
focal_class.declarator: pools
focal_class.modifier: protected
focal_class.original_string: protected HashMap<String, LBPool> pools;
focal_class.type: HashMap<String, LBPool>
focal_class.var_name: pools
focal_class.declarator: members
focal_class.modifier: protected
focal_class.original_string: protected HashMap<String, LBMember> members;
focal_class.type: HashMap<String, LBMember>
focal_class.var_name: members
focal_class.declarator: vipIpToId
focal_class.modifier: protected
focal_class.original_string: protected HashMap<Integer, String> vipIpToId;
focal_class.type: HashMap<Integer, String>
focal_class.var_name: vipIpToId
focal_class.declarator: vipIpToMac
focal_class.modifier: protected
focal_class.original_string: protected HashMap<Integer, MacAddress> vipIpToMac;
focal_class.type: HashMap<Integer, MacAddress>
focal_class.var_name: vipIpToMac
focal_class.declarator: memberIpToId
focal_class.modifier: protected
focal_class.original_string: protected HashMap<Integer, String> memberIpToId;
focal_class.type: HashMap<Integer, String>
focal_class.var_name: memberIpToId
focal_class.declarator: clientToMember
focal_class.modifier: protected
focal_class.original_string: protected HashMap<IPClient, LBMember> clientToMember;
focal_class.type: HashMap<IPClient, LBMember>
focal_class.var_name: clientToMember
focal_class.declarator: OFMESSAGE_DAMPER_CAPACITY = 10000
focal_class.modifier: protected static
focal_class.original_string: protected static int OFMESSAGE_DAMPER_CAPACITY = 10000;
focal_class.type: int
focal_class.var_name: OFMESSAGE_DAMPER_CAPACITY
focal_class.declarator: OFMESSAGE_DAMPER_TIMEOUT = 250
focal_class.modifier: protected static
focal_class.original_string: protected static int OFMESSAGE_DAMPER_TIMEOUT = 250;
focal_class.type: int
focal_class.var_name: OFMESSAGE_DAMPER_TIMEOUT
focal_class.declarator: LB_ETHER_TYPE = "0x800"
focal_class.modifier: protected static
focal_class.original_string: protected static String LB_ETHER_TYPE = "0x800";
focal_class.type: String
focal_class.var_name: LB_ETHER_TYPE
focal_class.declarator: LB_PRIORITY = 32768
focal_class.modifier: protected static
focal_class.original_string: protected static int LB_PRIORITY = 32768;
focal_class.type: int
focal_class.var_name: LB_PRIORITY
focal_class.declarator: clusterIdComparator =
              new Comparator<SwitchPort>() {
                  @Override
                  public int compare(SwitchPort d1, SwitchPort d2) {
                      DatapathId d1ClusterId = topologyService.getL2DomainId(d1.getSwitchDPID());
                      DatapathId d2ClusterId = topologyService.getL2DomainId(d2.getSwitchDPID());
                      return d1ClusterId.compareTo(d2ClusterId);
                  }
              }
focal_class.modifier: public
focal_class.original_string: public Comparator<SwitchPort> clusterIdComparator =
              new Comparator<SwitchPort>() {
                  @Override
                  public int compare(SwitchPort d1, SwitchPort d2) {
                      DatapathId d1ClusterId = topologyService.getL2DomainId(d1.getSwitchDPID());
                      DatapathId d2ClusterId = topologyService.getL2DomainId(d2.getSwitchDPID());
                      return d1ClusterId.compareTo(d2ClusterId);
                  }
              };
focal_class.type: Comparator<SwitchPort>
focal_class.var_name: clusterIdComparator
focal_class.file: src/agents/apps/floodlight/floodlight-1.0/src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
focal_class.identifier: LoadBalancer
focal_class.interfaces: implements IFloodlightModule,
      ILoadBalancerService, IOFMessageListener
focal_class.class_method_signature: LoadBalancer.getName()
focal_class.full_signature: @Override public String getName()
focal_class.identifier: getName
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getName()
focal_class.class_method_signature: LoadBalancer.isCallbackOrderingPrereq(OFType type, String name)
focal_class.full_signature: @Override public boolean isCallbackOrderingPrereq(OFType type, String name)
focal_class.identifier: isCallbackOrderingPrereq
focal_class.modifiers: @Override public
focal_class.parameters: (OFType type, String name)
focal_class.return: boolean
focal_class.signature: boolean isCallbackOrderingPrereq(OFType type, String name)
focal_class.class_method_signature: LoadBalancer.isCallbackOrderingPostreq(OFType type, String name)
focal_class.full_signature: @Override public boolean isCallbackOrderingPostreq(OFType type, String name)
focal_class.identifier: isCallbackOrderingPostreq
focal_class.modifiers: @Override public
focal_class.parameters: (OFType type, String name)
focal_class.return: boolean
focal_class.signature: boolean isCallbackOrderingPostreq(OFType type, String name)
focal_class.class_method_signature: LoadBalancer.receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
focal_class.full_signature: @Override public net.floodlightcontroller.core.IListener.Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
focal_class.identifier: receive
focal_class.modifiers: @Override public
focal_class.parameters: (IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
focal_class.return: net.floodlightcontroller.core.IListener.Command
focal_class.signature: net.floodlightcontroller.core.IListener.Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
focal_class.class_method_signature: LoadBalancer.processPacketIn(IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx)
focal_class.full_signature: private net.floodlightcontroller.core.IListener.Command processPacketIn(IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx)
focal_class.identifier: processPacketIn
focal_class.modifiers: private
focal_class.parameters: (IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx)
focal_class.return: net.floodlightcontroller.core.IListener.Command
focal_class.signature: net.floodlightcontroller.core.IListener.Command processPacketIn(IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx)
focal_class.class_method_signature: LoadBalancer.vipProxyArpReply(IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx, String vipId)
focal_class.full_signature: protected void vipProxyArpReply(IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx, String vipId)
focal_class.identifier: vipProxyArpReply
focal_class.modifiers: protected
focal_class.parameters: (IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx, String vipId)
focal_class.return: void
focal_class.signature: void vipProxyArpReply(IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx, String vipId)
focal_class.class_method_signature: LoadBalancer.pushPacket(IPacket packet, 
                             IOFSwitch sw,
                             OFBufferId bufferId,
                             OFPort inPort,
                             OFPort outPort, 
                             FloodlightContext cntx,
                             boolean flush)
focal_class.full_signature: public void pushPacket(IPacket packet, 
                             IOFSwitch sw,
                             OFBufferId bufferId,
                             OFPort inPort,
                             OFPort outPort, 
                             FloodlightContext cntx,
                             boolean flush)
focal_class.identifier: pushPacket
focal_class.modifiers: public
focal_class.parameters: (IPacket packet, 
                             IOFSwitch sw,
                             OFBufferId bufferId,
                             OFPort inPort,
                             OFPort outPort, 
                             FloodlightContext cntx,
                             boolean flush)
focal_class.return: void
focal_class.signature: void pushPacket(IPacket packet, 
                             IOFSwitch sw,
                             OFBufferId bufferId,
                             OFPort inPort,
                             OFPort outPort, 
                             FloodlightContext cntx,
                             boolean flush)
focal_class.class_method_signature: LoadBalancer.pushBidirectionalVipRoutes(IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx, IPClient client, LBMember member)
focal_class.full_signature: protected void pushBidirectionalVipRoutes(IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx, IPClient client, LBMember member)
focal_class.identifier: pushBidirectionalVipRoutes
focal_class.modifiers: protected
focal_class.parameters: (IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx, IPClient client, LBMember member)
focal_class.return: void
focal_class.signature: void pushBidirectionalVipRoutes(IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx, IPClient client, LBMember member)
focal_class.class_method_signature: LoadBalancer.pushStaticVipRoute(boolean inBound, Route route, IPClient client, LBMember member, IOFSwitch pinSwitch)
focal_class.full_signature: public void pushStaticVipRoute(boolean inBound, Route route, IPClient client, LBMember member, IOFSwitch pinSwitch)
focal_class.identifier: pushStaticVipRoute
focal_class.modifiers: public
focal_class.parameters: (boolean inBound, Route route, IPClient client, LBMember member, IOFSwitch pinSwitch)
focal_class.return: void
focal_class.signature: void pushStaticVipRoute(boolean inBound, Route route, IPClient client, LBMember member, IOFSwitch pinSwitch)
focal_class.class_method_signature: LoadBalancer.listVips()
focal_class.full_signature: @Override public Collection<LBVip> listVips()
focal_class.identifier: listVips
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<LBVip>
focal_class.signature: Collection<LBVip> listVips()
focal_class.class_method_signature: LoadBalancer.listVip(String vipId)
focal_class.full_signature: @Override public Collection<LBVip> listVip(String vipId)
focal_class.identifier: listVip
focal_class.modifiers: @Override public
focal_class.parameters: (String vipId)
focal_class.return: Collection<LBVip>
focal_class.signature: Collection<LBVip> listVip(String vipId)
focal_class.class_method_signature: LoadBalancer.createVip(LBVip vip)
focal_class.full_signature: @Override public LBVip createVip(LBVip vip)
focal_class.identifier: createVip
focal_class.modifiers: @Override public
focal_class.parameters: (LBVip vip)
focal_class.return: LBVip
focal_class.signature: LBVip createVip(LBVip vip)
focal_class.class_method_signature: LoadBalancer.updateVip(LBVip vip)
focal_class.full_signature: @Override public LBVip updateVip(LBVip vip)
focal_class.identifier: updateVip
focal_class.modifiers: @Override public
focal_class.parameters: (LBVip vip)
focal_class.return: LBVip
focal_class.signature: LBVip updateVip(LBVip vip)
focal_class.class_method_signature: LoadBalancer.removeVip(String vipId)
focal_class.full_signature: @Override public int removeVip(String vipId)
focal_class.identifier: removeVip
focal_class.modifiers: @Override public
focal_class.parameters: (String vipId)
focal_class.return: int
focal_class.signature: int removeVip(String vipId)
focal_class.class_method_signature: LoadBalancer.listPools()
focal_class.full_signature: @Override public Collection<LBPool> listPools()
focal_class.identifier: listPools
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<LBPool>
focal_class.signature: Collection<LBPool> listPools()
focal_class.class_method_signature: LoadBalancer.listPool(String poolId)
focal_class.full_signature: @Override public Collection<LBPool> listPool(String poolId)
focal_class.identifier: listPool
focal_class.modifiers: @Override public
focal_class.parameters: (String poolId)
focal_class.return: Collection<LBPool>
focal_class.signature: Collection<LBPool> listPool(String poolId)
focal_class.class_method_signature: LoadBalancer.createPool(LBPool pool)
focal_class.full_signature: @Override public LBPool createPool(LBPool pool)
focal_class.identifier: createPool
focal_class.modifiers: @Override public
focal_class.parameters: (LBPool pool)
focal_class.return: LBPool
focal_class.signature: LBPool createPool(LBPool pool)
focal_class.class_method_signature: LoadBalancer.updatePool(LBPool pool)
focal_class.full_signature: @Override public LBPool updatePool(LBPool pool)
focal_class.identifier: updatePool
focal_class.modifiers: @Override public
focal_class.parameters: (LBPool pool)
focal_class.return: LBPool
focal_class.signature: LBPool updatePool(LBPool pool)
focal_class.class_method_signature: LoadBalancer.removePool(String poolId)
focal_class.full_signature: @Override public int removePool(String poolId)
focal_class.identifier: removePool
focal_class.modifiers: @Override public
focal_class.parameters: (String poolId)
focal_class.return: int
focal_class.signature: int removePool(String poolId)
focal_class.class_method_signature: LoadBalancer.listMembers()
focal_class.full_signature: @Override public Collection<LBMember> listMembers()
focal_class.identifier: listMembers
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<LBMember>
focal_class.signature: Collection<LBMember> listMembers()
focal_class.class_method_signature: LoadBalancer.listMember(String memberId)
focal_class.full_signature: @Override public Collection<LBMember> listMember(String memberId)
focal_class.identifier: listMember
focal_class.modifiers: @Override public
focal_class.parameters: (String memberId)
focal_class.return: Collection<LBMember>
focal_class.signature: Collection<LBMember> listMember(String memberId)
focal_class.class_method_signature: LoadBalancer.listMembersByPool(String poolId)
focal_class.full_signature: @Override public Collection<LBMember> listMembersByPool(String poolId)
focal_class.identifier: listMembersByPool
focal_class.modifiers: @Override public
focal_class.parameters: (String poolId)
focal_class.return: Collection<LBMember>
focal_class.signature: Collection<LBMember> listMembersByPool(String poolId)
focal_class.class_method_signature: LoadBalancer.createMember(LBMember member)
focal_class.full_signature: @Override public LBMember createMember(LBMember member)
focal_class.identifier: createMember
focal_class.modifiers: @Override public
focal_class.parameters: (LBMember member)
focal_class.return: LBMember
focal_class.signature: LBMember createMember(LBMember member)
focal_class.class_method_signature: LoadBalancer.updateMember(LBMember member)
focal_class.full_signature: @Override public LBMember updateMember(LBMember member)
focal_class.identifier: updateMember
focal_class.modifiers: @Override public
focal_class.parameters: (LBMember member)
focal_class.return: LBMember
focal_class.signature: LBMember updateMember(LBMember member)
focal_class.class_method_signature: LoadBalancer.removeMember(String memberId)
focal_class.full_signature: @Override public int removeMember(String memberId)
focal_class.identifier: removeMember
focal_class.modifiers: @Override public
focal_class.parameters: (String memberId)
focal_class.return: int
focal_class.signature: int removeMember(String memberId)
focal_class.class_method_signature: LoadBalancer.listMonitors()
focal_class.full_signature: @Override public Collection<LBMonitor> listMonitors()
focal_class.identifier: listMonitors
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<LBMonitor>
focal_class.signature: Collection<LBMonitor> listMonitors()
focal_class.class_method_signature: LoadBalancer.listMonitor(String monitorId)
focal_class.full_signature: @Override public Collection<LBMonitor> listMonitor(String monitorId)
focal_class.identifier: listMonitor
focal_class.modifiers: @Override public
focal_class.parameters: (String monitorId)
focal_class.return: Collection<LBMonitor>
focal_class.signature: Collection<LBMonitor> listMonitor(String monitorId)
focal_class.class_method_signature: LoadBalancer.createMonitor(LBMonitor monitor)
focal_class.full_signature: @Override public LBMonitor createMonitor(LBMonitor monitor)
focal_class.identifier: createMonitor
focal_class.modifiers: @Override public
focal_class.parameters: (LBMonitor monitor)
focal_class.return: LBMonitor
focal_class.signature: LBMonitor createMonitor(LBMonitor monitor)
focal_class.class_method_signature: LoadBalancer.updateMonitor(LBMonitor monitor)
focal_class.full_signature: @Override public LBMonitor updateMonitor(LBMonitor monitor)
focal_class.identifier: updateMonitor
focal_class.modifiers: @Override public
focal_class.parameters: (LBMonitor monitor)
focal_class.return: LBMonitor
focal_class.signature: LBMonitor updateMonitor(LBMonitor monitor)
focal_class.class_method_signature: LoadBalancer.removeMonitor(String monitorId)
focal_class.full_signature: @Override public int removeMonitor(String monitorId)
focal_class.identifier: removeMonitor
focal_class.modifiers: @Override public
focal_class.parameters: (String monitorId)
focal_class.return: int
focal_class.signature: int removeMonitor(String monitorId)
focal_class.class_method_signature: LoadBalancer.getModuleServices()
focal_class.full_signature: @Override public Collection<Class<? extends IFloodlightService>> getModuleServices()
focal_class.identifier: getModuleServices
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<Class<? extends IFloodlightService>>
focal_class.signature: Collection<Class<? extends IFloodlightService>> getModuleServices()
focal_class.class_method_signature: LoadBalancer.getServiceImpls()
focal_class.full_signature: @Override public Map<Class<? extends IFloodlightService>, IFloodlightService> getServiceImpls()
focal_class.identifier: getServiceImpls
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Map<Class<? extends IFloodlightService>, IFloodlightService>
focal_class.signature: Map<Class<? extends IFloodlightService>, IFloodlightService> getServiceImpls()
focal_class.class_method_signature: LoadBalancer.getModuleDependencies()
focal_class.full_signature: @Override public Collection<Class<? extends IFloodlightService>> getModuleDependencies()
focal_class.identifier: getModuleDependencies
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Collection<Class<? extends IFloodlightService>>
focal_class.signature: Collection<Class<? extends IFloodlightService>> getModuleDependencies()
focal_class.class_method_signature: LoadBalancer.init(FloodlightModuleContext context)
focal_class.full_signature: @Override public void init(FloodlightModuleContext context)
focal_class.identifier: init
focal_class.modifiers: @Override public
focal_class.parameters: (FloodlightModuleContext context)
focal_class.return: void
focal_class.signature: void init(FloodlightModuleContext context)
focal_class.class_method_signature: LoadBalancer.startUp(FloodlightModuleContext context)
focal_class.full_signature: @Override public void startUp(FloodlightModuleContext context)
focal_class.identifier: startUp
focal_class.modifiers: @Override public
focal_class.parameters: (FloodlightModuleContext context)
focal_class.return: void
focal_class.signature: void startUp(FloodlightModuleContext context)
focal_method.body: @Override
      public net.floodlightcontroller.core.IListener.Command
              receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx) {
          switch (msg.getType()) {
              case PACKET_IN:
                  return processPacketIn(sw, (OFPacketIn)msg, cntx);
              default:
                  break;
          }
          log.warn("Received unexpected message {}", msg);
          return Command.CONTINUE;
      }
focal_method.class_method_signature: LoadBalancer.receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
focal_method.full_signature: @Override public net.floodlightcontroller.core.IListener.Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
focal_method.identifier: receive
focal_method.invocations: getType processPacketIn warn
focal_method.modifiers: @Override public
focal_method.parameters: (IOFSwitch sw, OFMessage msg, FloodlightContext cntx)
focal_method.return: net.floodlightcontroller.core.IListener.Command
focal_method.signature: net.floodlightcontroller.core.IListener.Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx)