当前位置: 首页>>代码示例>>Java>>正文


Java ITopologyService类代码示例

本文整理汇总了Java中net.floodlightcontroller.topology.ITopologyService的典型用法代码示例。如果您正苦于以下问题:Java ITopologyService类的具体用法?Java ITopologyService怎么用?Java ITopologyService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ITopologyService类属于net.floodlightcontroller.topology包,在下文中一共展示了ITopologyService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getModuleDependencies

import net.floodlightcontroller.topology.ITopologyService; //导入依赖的package包/类
@Override
public Collection<Class<? extends IFloodlightService>>
        getModuleDependencies() {
    Collection<Class<? extends IFloodlightService>> l = 
            new ArrayList<Class<? extends IFloodlightService>>();
    l.add(IFloodlightProviderService.class);
    l.add(IRestApiService.class);
    l.add(IOFSwitchService.class);
    l.add(IDeviceService.class);
    l.add(IDebugCounterService.class);
    l.add(ITopologyService.class);
    l.add(IRoutingService.class);
    l.add(IStaticFlowEntryPusherService.class);

    return l;
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:17,代码来源:LoadBalancer.java

示例2: init

import net.floodlightcontroller.topology.ITopologyService; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
                                             throws FloodlightModuleException {
    floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
    restApiService = context.getServiceImpl(IRestApiService.class);
    debugCounterService = context.getServiceImpl(IDebugCounterService.class);
    deviceManagerService = context.getServiceImpl(IDeviceService.class);
    routingEngineService = context.getServiceImpl(IRoutingService.class);
    topologyService = context.getServiceImpl(ITopologyService.class);
    sfpService = context.getServiceImpl(IStaticFlowEntryPusherService.class);
    switchService = context.getServiceImpl(IOFSwitchService.class);
    
    vips = new HashMap<String, LBVip>();
    pools = new HashMap<String, LBPool>();
    members = new HashMap<String, LBMember>();
    vipIpToId = new HashMap<Integer, String>();
    vipIpToMac = new HashMap<Integer, MacAddress>();
    memberIpToId = new HashMap<Integer, String>();
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:20,代码来源:LoadBalancer.java

示例3: mockTopologyForPacketInTests

import net.floodlightcontroller.topology.ITopologyService; //导入依赖的package包/类
private static void
mockTopologyForPacketInTests(ITopologyService mockTopology) {
	expect(mockTopology.isAttachmentPointPort(DatapathId.of(anyLong()),
			OFPort.of(anyShort()))).
			andReturn(true).
			anyTimes();
	expect(mockTopology.isConsistent(DatapathId.of(EasyMock.anyLong()),
			OFPort.of(EasyMock.anyShort()),
			DatapathId.of(EasyMock.anyLong()),
			OFPort.of(EasyMock.anyShort()))).andReturn(false).
			anyTimes();
	expect(mockTopology.isBroadcastDomainPort(DatapathId.of(EasyMock.anyLong()),
			OFPort.of(EasyMock.anyShort())))
			.andReturn(false)
			.anyTimes();
	expect(mockTopology.getOpenflowDomainId(DatapathId.of(anyLong()))).andReturn(DatapathId.of(1L)).anyTimes();
	expect(mockTopology.isInSameBroadcastDomain(DatapathId.of(anyLong()),
			OFPort.of(anyShort()),
			DatapathId.of(anyLong()),
			OFPort.of(anyShort())))
			.andReturn(false).anyTimes();

}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:24,代码来源:DeviceManagerImplTest.java

示例4: testDeviceIndex

import net.floodlightcontroller.topology.ITopologyService; //导入依赖的package包/类
@Test
public void testDeviceIndex() throws Exception {
	EnumSet<IDeviceService.DeviceField> indexFields =
			EnumSet.noneOf(IDeviceService.DeviceField.class);
	indexFields.add(IDeviceService.DeviceField.IPv4);
	indexFields.add(IDeviceService.DeviceField.VLAN);
	deviceManager.addIndex(false, indexFields);

	indexFields = EnumSet.noneOf(IDeviceService.DeviceField.class);
	deviceManager.addIndex(false, indexFields);

	ITopologyService mockTopology = createMock(ITopologyService.class);
	deviceManager.topology = mockTopology;
	expect(mockTopology.isAttachmentPointPort(DatapathId.of(anyLong()),
			OFPort.of(anyShort()))).
			andReturn(true).anyTimes();
	expect(mockTopology.getOpenflowDomainId(DatapathId.of(EasyMock.anyLong()))).andReturn(DatapathId.of(1L)).anyTimes();
	replay(mockTopology);
	doTestDeviceQuery();
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:21,代码来源:DeviceManagerImplTest.java

示例5: testDeviceClassIndex

import net.floodlightcontroller.topology.ITopologyService; //导入依赖的package包/类
@Test
public void testDeviceClassIndex() throws Exception {
	EnumSet<IDeviceService.DeviceField> indexFields =
			EnumSet.noneOf(IDeviceService.DeviceField.class);
	indexFields.add(IDeviceService.DeviceField.IPv4);
	indexFields.add(IDeviceService.DeviceField.VLAN);
	deviceManager.addIndex(true, indexFields);

	ITopologyService mockTopology = createMock(ITopologyService.class);
	deviceManager.topology = mockTopology;
	expect(mockTopology.isAttachmentPointPort(DatapathId.of(anyLong()),
			OFPort.of(anyShort()))).
			andReturn(true).anyTimes();
	expect(mockTopology.getOpenflowDomainId(DatapathId.of(EasyMock.anyLong()))).andReturn(DatapathId.of(1L)).anyTimes();
	replay(mockTopology);

	doTestDeviceClassQuery();
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:19,代码来源:DeviceManagerImplTest.java

示例6: getDuplicateAttachmentPoints

import net.floodlightcontroller.topology.ITopologyService; //导入依赖的package包/类
/**
 * Get a list of duplicate attachment points, given a list of old attachment
 * points and one attachment point per L2 domain. Given a true attachment
 * point in the L2 domain, say trueAP, another attachment point in the
 * same L2 domain, say ap, is duplicate if:
 * 1. ap is inconsistent with trueAP, and
 * 2. active time of ap is after that of trueAP; and
 * 3. last seen time of ap is within the last INACTIVITY_INTERVAL
 * @param oldAPList
 * @param apMap
 * @return
 */
List<AttachmentPoint> getDuplicateAttachmentPoints(List<AttachmentPoint>oldAPList, Map<DatapathId, AttachmentPoint>apMap) {
    ITopologyService topology = deviceManager.topology;
    List<AttachmentPoint> dupAPs = new ArrayList<AttachmentPoint>();
    long timeThreshold = System.currentTimeMillis() - AttachmentPoint.INACTIVITY_INTERVAL;

    if (oldAPList == null || apMap == null)
        return dupAPs;

    for(AttachmentPoint ap : oldAPList) {
        DatapathId id = topology.getL2DomainId(ap.getSw());
        AttachmentPoint trueAP = apMap.get(id);

        if (trueAP == null) continue;
        boolean c = (topology.isConsistent(trueAP.getSw(), trueAP.getPort(),
                                          ap.getSw(), ap.getPort()));
        boolean active = (ap.getActiveSince().after(trueAP.getActiveSince()));
        boolean last = ap.getLastSeen().getTime() > timeThreshold;
        if (!c && active && last) {
            dupAPs.add(ap);
        }
    }

    return dupAPs;
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:37,代码来源:Device.java

示例7: mockTopologyForPacketInTests

import net.floodlightcontroller.topology.ITopologyService; //导入依赖的package包/类
private static void
mockTopologyForPacketInTests(ITopologyService mockTopology) {
	expect(mockTopology.isAttachmentPointPort(DatapathId.of(anyLong()),
			OFPort.of(anyShort()))).
			andReturn(true).
			anyTimes();
	expect(mockTopology.isConsistent(DatapathId.of(EasyMock.anyLong()),
			OFPort.of(EasyMock.anyShort()),
			DatapathId.of(EasyMock.anyLong()),
			OFPort.of(EasyMock.anyShort()))).andReturn(false).
			anyTimes();
	expect(mockTopology.isBroadcastDomainPort(DatapathId.of(EasyMock.anyLong()),
			OFPort.of(EasyMock.anyShort())))
			.andReturn(false)
			.anyTimes();
	expect(mockTopology.getL2DomainId(DatapathId.of(anyLong()))).andReturn(DatapathId.of(1L)).anyTimes();
	expect(mockTopology.isInSameBroadcastDomain(DatapathId.of(anyLong()),
			OFPort.of(anyShort()),
			DatapathId.of(anyLong()),
			OFPort.of(anyShort())))
			.andReturn(false).anyTimes();

}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:24,代码来源:DeviceManagerImplTest.java

示例8: testDeviceIndex

import net.floodlightcontroller.topology.ITopologyService; //导入依赖的package包/类
@Test
public void testDeviceIndex() throws Exception {
	EnumSet<IDeviceService.DeviceField> indexFields =
			EnumSet.noneOf(IDeviceService.DeviceField.class);
	indexFields.add(IDeviceService.DeviceField.IPV4);
	indexFields.add(IDeviceService.DeviceField.VLAN);
	deviceManager.addIndex(false, indexFields);

	indexFields = EnumSet.noneOf(IDeviceService.DeviceField.class);
	deviceManager.addIndex(false, indexFields);

	ITopologyService mockTopology = createMock(ITopologyService.class);
	deviceManager.topology = mockTopology;
	expect(mockTopology.isAttachmentPointPort(DatapathId.of(anyLong()),
			OFPort.of(anyShort()))).
			andReturn(true).anyTimes();
	expect(mockTopology.getL2DomainId(DatapathId.of(EasyMock.anyLong()))).andReturn(DatapathId.of(1L)).anyTimes();
	replay(mockTopology);
	doTestDeviceQuery();
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:21,代码来源:DeviceManagerImplTest.java

示例9: testDeviceClassIndex

import net.floodlightcontroller.topology.ITopologyService; //导入依赖的package包/类
@Test
public void testDeviceClassIndex() throws Exception {
	EnumSet<IDeviceService.DeviceField> indexFields =
			EnumSet.noneOf(IDeviceService.DeviceField.class);
	indexFields.add(IDeviceService.DeviceField.IPV4);
	indexFields.add(IDeviceService.DeviceField.VLAN);
	deviceManager.addIndex(true, indexFields);

	ITopologyService mockTopology = createMock(ITopologyService.class);
	deviceManager.topology = mockTopology;
	expect(mockTopology.isAttachmentPointPort(DatapathId.of(anyLong()),
			OFPort.of(anyShort()))).
			andReturn(true).anyTimes();
	expect(mockTopology.getL2DomainId(DatapathId.of(EasyMock.anyLong()))).andReturn(DatapathId.of(1L)).anyTimes();
	replay(mockTopology);

	doTestDeviceClassQuery();
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:19,代码来源:DeviceManagerImplTest.java

示例10: getModuleDependencies

import net.floodlightcontroller.topology.ITopologyService; //导入依赖的package包/类
@Override
public Collection<Class<? extends IFloodlightService>>
        getModuleDependencies() {
    Collection<Class<? extends IFloodlightService>> l =
            new ArrayList<Class<? extends IFloodlightService>>();
    l.add(IFloodlightProviderService.class);
    l.add(IRestApiService.class);
    l.add(IOFSwitchService.class);
    l.add(IDeviceService.class);
    l.add(IDebugCounterService.class);
    l.add(ITopologyService.class);
    l.add(IRoutingService.class);
    l.add(IStaticFlowEntryPusherService.class);

    return l;
}
 
开发者ID:zhenshengcai,项目名称:floodlight-hardware,代码行数:17,代码来源:LoadBalancer.java

示例11: init

import net.floodlightcontroller.topology.ITopologyService; //导入依赖的package包/类
@Override
public void init(FloodlightModuleContext context)
                                             throws FloodlightModuleException {
    floodlightProviderService = context.getServiceImpl(IFloodlightProviderService.class);
    restApiService = context.getServiceImpl(IRestApiService.class);
    debugCounterService = context.getServiceImpl(IDebugCounterService.class);
    deviceManagerService = context.getServiceImpl(IDeviceService.class);
    routingEngineService = context.getServiceImpl(IRoutingService.class);
    topologyService = context.getServiceImpl(ITopologyService.class);
    sfpService = context.getServiceImpl(IStaticFlowEntryPusherService.class);
    switchService = context.getServiceImpl(IOFSwitchService.class);

    vips = new HashMap<String, LBVip>();
    pools = new HashMap<String, LBPool>();
    members = new HashMap<String, LBMember>();
    vipIpToId = new HashMap<Integer, String>();
    vipIpToMac = new HashMap<Integer, MacAddress>();
    memberIpToId = new HashMap<Integer, String>();
}
 
开发者ID:zhenshengcai,项目名称:floodlight-hardware,代码行数:20,代码来源:LoadBalancer.java

示例12: mockTopologyForPacketInTests

import net.floodlightcontroller.topology.ITopologyService; //导入依赖的package包/类
private static void
        mockTopologyForPacketInTests(ITopologyService mockTopology) {
    expect(mockTopology.isAttachmentPointPort(anyLong(),
            anyShort())).
            andReturn(true).
            anyTimes();
    expect(mockTopology.isConsistent(EasyMock.anyLong(),
            EasyMock.anyShort(),
            EasyMock.anyLong(),
            EasyMock.anyShort())).andReturn(false).
            anyTimes();
    expect(mockTopology.isBroadcastDomainPort(EasyMock.anyLong(),
            EasyMock.anyShort()))
            .andReturn(false)
            .anyTimes();
    expect(mockTopology.getL2DomainId(anyLong())).andReturn(1L).anyTimes();
    expect(mockTopology.isInSameBroadcastDomain(anyLong(),
                                                anyShort(),
                                                anyLong(),
                                                anyShort()))
            .andReturn(false).anyTimes();

}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:24,代码来源:DeviceManagerImplTest.java

示例13: testDeviceIndex

import net.floodlightcontroller.topology.ITopologyService; //导入依赖的package包/类
@Test
public void testDeviceIndex() throws Exception {
    EnumSet<IDeviceService.DeviceField> indexFields =
            EnumSet.noneOf(IDeviceService.DeviceField.class);
    indexFields.add(IDeviceService.DeviceField.IPV4);
    indexFields.add(IDeviceService.DeviceField.VLAN);
    deviceManager.addIndex(false, indexFields);

    indexFields = EnumSet.noneOf(IDeviceService.DeviceField.class);
    deviceManager.addIndex(false, indexFields);

    ITopologyService mockTopology = createMock(ITopologyService.class);
    deviceManager.topology = mockTopology;
    expect(mockTopology.isAttachmentPointPort(anyLong(),
                                              anyShort())).
                                              andReturn(true).anyTimes();
    expect(mockTopology.getL2DomainId(EasyMock.anyLong())).andReturn(1L).anyTimes();
    replay(mockTopology);
    doTestDeviceQuery();
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:21,代码来源:DeviceManagerImplTest.java

示例14: testDeviceClassIndex

import net.floodlightcontroller.topology.ITopologyService; //导入依赖的package包/类
@Test
public void testDeviceClassIndex() throws Exception {
    EnumSet<IDeviceService.DeviceField> indexFields =
            EnumSet.noneOf(IDeviceService.DeviceField.class);
    indexFields.add(IDeviceService.DeviceField.IPV4);
    indexFields.add(IDeviceService.DeviceField.VLAN);
    deviceManager.addIndex(true, indexFields);

    ITopologyService mockTopology = createMock(ITopologyService.class);
    deviceManager.topology = mockTopology;
    expect(mockTopology.isAttachmentPointPort(anyLong(),
                                              anyShort())).
                                              andReturn(true).anyTimes();
    expect(mockTopology.getL2DomainId(EasyMock.anyLong())).andReturn(1L).anyTimes();
    replay(mockTopology);

    doTestDeviceClassQuery();
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:19,代码来源:DeviceManagerImplTest.java

示例15: getModuleDependencies

import net.floodlightcontroller.topology.ITopologyService; //导入依赖的package包/类
@Override
public Collection<Class<? extends IFloodlightService>> getModuleDependencies() {
	Collection<Class<? extends IFloodlightService>> l =
			new ArrayList<Class<? extends IFloodlightService>>();
	l.add(IFloodlightProviderService.class);
	l.add(IStorageSourceService.class);
	l.add(ITopologyService.class);
	l.add(IRestApiService.class);
	l.add(IThreadPoolService.class);
	l.add(IEntityClassifierService.class);
	l.add(ISyncService.class);
	return l;
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:14,代码来源:DeviceManagerImpl.java


注:本文中的net.floodlightcontroller.topology.ITopologyService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。