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


Java LinkDiscoveryManager.deleteLinks方法代码示例

本文整理汇总了Java中net.floodlightcontroller.linkdiscovery.internal.LinkDiscoveryManager.deleteLinks方法的典型用法代码示例。如果您正苦于以下问题:Java LinkDiscoveryManager.deleteLinks方法的具体用法?Java LinkDiscoveryManager.deleteLinks怎么用?Java LinkDiscoveryManager.deleteLinks使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.floodlightcontroller.linkdiscovery.internal.LinkDiscoveryManager的用法示例。


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

示例1: testDeleteLink

import net.floodlightcontroller.linkdiscovery.internal.LinkDiscoveryManager; //导入方法依赖的package包/类
@Test
public void testDeleteLink() throws Exception {
    LinkDiscoveryManager topology = getTopology();

    Link lt = new Link(1L, 2, 2L, 1);
    LinkInfo info = new LinkInfo(System.currentTimeMillis(),
                                 System.currentTimeMillis(), null,
                                 0, 0);
    topology.addOrUpdateLink(lt, info);
    topology.deleteLinks(Collections.singletonList(lt), "Test");

    // check invariants hold
    assertNull(topology.switchLinks.get(lt.getSrc()));
    assertNull(topology.switchLinks.get(lt.getDst()));
    assertNull(topology.portLinks.get(lt.getSrc()));
    assertNull(topology.portLinks.get(lt.getDst()));
    assertTrue(topology.links.isEmpty());
}
 
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:19,代码来源:LinkDiscoveryManagerTest.java

示例2: testDeleteLinkToSelf

import net.floodlightcontroller.linkdiscovery.internal.LinkDiscoveryManager; //导入方法依赖的package包/类
@Test
public void testDeleteLinkToSelf() throws Exception {
    LinkDiscoveryManager topology = getTopology();

    Link lt = new Link(1L, 2, 1L, 3);
    NodePortTuple srcNpt = new NodePortTuple(1L, 2);
    NodePortTuple dstNpt = new NodePortTuple(2L, 3);

    LinkInfo info = new LinkInfo(System.currentTimeMillis(),
                                 System.currentTimeMillis(), null,
                                 0, 0);
    topology.addOrUpdateLink(lt, info);
    topology.deleteLinks(Collections.singletonList(lt), "Test to self");

    // check invariants hold
    assertNull(topology.switchLinks.get(lt.getSrc()));
    assertNull(topology.switchLinks.get(lt.getDst()));
    assertNull(topology.portLinks.get(srcNpt));
    assertNull(topology.portLinks.get(dstNpt));
    assertTrue(topology.links.isEmpty());
}
 
开发者ID:vishalshubham,项目名称:Multipath-Hedera-system-in-Floodlight-controller,代码行数:22,代码来源:LinkDiscoveryManagerTest.java

示例3: testDeleteLink

import net.floodlightcontroller.linkdiscovery.internal.LinkDiscoveryManager; //导入方法依赖的package包/类
@Test
public void testDeleteLink() throws Exception {
    LinkDiscoveryManager linkDiscovery = getLinkDiscoveryManager();

    Link lt = new Link(1L, 2, 2L, 1);
    LinkInfo info = new LinkInfo(System.currentTimeMillis(),
                                 System.currentTimeMillis(), null,
                                 0, 0);
    linkDiscovery.addOrUpdateLink(lt, info);
    linkDiscovery.deleteLinks(Collections.singletonList(lt), "Test");

    // check invariants hold
    assertNull(linkDiscovery.switchLinks.get(lt.getSrc()));
    assertNull(linkDiscovery.switchLinks.get(lt.getDst()));
    assertNull(linkDiscovery.portLinks.get(lt.getSrc()));
    assertNull(linkDiscovery.portLinks.get(lt.getDst()));
    assertTrue(linkDiscovery.links.isEmpty());
}
 
开发者ID:dana-i2cat,项目名称:floodlight-nfv,代码行数:19,代码来源:LinkDiscoveryManagerTest.java

示例4: testDeleteLinkToSelf

import net.floodlightcontroller.linkdiscovery.internal.LinkDiscoveryManager; //导入方法依赖的package包/类
@Test
public void testDeleteLinkToSelf() throws Exception {
    LinkDiscoveryManager linkDiscovery = getLinkDiscoveryManager();

    Link lt = new Link(1L, 2, 1L, 3);
    NodePortTuple srcNpt = new NodePortTuple(1L, 2);
    NodePortTuple dstNpt = new NodePortTuple(2L, 3);

    LinkInfo info = new LinkInfo(System.currentTimeMillis(),
                                 System.currentTimeMillis(), null,
                                 0, 0);
    linkDiscovery.addOrUpdateLink(lt, info);
    linkDiscovery.deleteLinks(Collections.singletonList(lt), "Test to self");

    // check invariants hold
    assertNull(linkDiscovery.switchLinks.get(lt.getSrc()));
    assertNull(linkDiscovery.switchLinks.get(lt.getDst()));
    assertNull(linkDiscovery.portLinks.get(srcNpt));
    assertNull(linkDiscovery.portLinks.get(dstNpt));
    assertTrue(linkDiscovery.links.isEmpty());
}
 
开发者ID:dana-i2cat,项目名称:floodlight-nfv,代码行数:22,代码来源:LinkDiscoveryManagerTest.java


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