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


Java NodeConnector.fromString方法代码示例

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


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

示例1: _esnp

import org.opendaylight.controller.sal.core.NodeConnector; //导入方法依赖的package包/类
public void _esnp(CommandInterpreter ci) {
    String val = ci.nextArgument();

    if (val == null) {
        ci.println("Usage: esnp <all|nodeConnector>");
    } else if (val.equalsIgnoreCase("all")) {
        this.discoverySnoopingEnabled = true;
        ci.println("Discovery snooping is globally enabled");
    } else {
        NodeConnector nodeConnector = NodeConnector.fromString(val);
        if (nodeConnector != null) {
            discoverySnoopingDisableList.remove(nodeConnector);
            ci.println("Discovery snooping is locally enabled on port " + nodeConnector);
        } else {
            ci.println("Entered invalid NodeConnector " + val);
        }
    }
    return;
}
 
开发者ID:lbchen,项目名称:ODL,代码行数:20,代码来源:DiscoveryService.java

示例2: _dsnp

import org.opendaylight.controller.sal.core.NodeConnector; //导入方法依赖的package包/类
public void _dsnp(CommandInterpreter ci) {
    String val = ci.nextArgument();

    if (val == null) {
        ci.println("Usage: dsnp <all|nodeConnector>");
    } else if (val.equalsIgnoreCase("all")) {
        this.discoverySnoopingEnabled = false;
        ci.println("Discovery snooping is globally disabled");
    } else {
        NodeConnector nodeConnector = NodeConnector.fromString(val);
        if (nodeConnector != null) {
            discoverySnoopingDisableList.add(nodeConnector);
            ci.println("Discovery snooping is locally disabled on port " + nodeConnector);
        } else {
            ci.println("Entered invalid NodeConnector " + val);
        }
    }
    return;
}
 
开发者ID:lbchen,项目名称:ODL,代码行数:20,代码来源:DiscoveryService.java

示例3: getLinkTuple

import org.opendaylight.controller.sal.core.NodeConnector; //导入方法依赖的package包/类
private Edge getLinkTuple(TopologyUserLinkConfig link) {
    NodeConnector srcNodeConnector = NodeConnector.fromString(link.getSrcNodeConnector());
    NodeConnector dstNodeConnector = NodeConnector.fromString(link.getDstNodeConnector());
    try {
        return new Edge(srcNodeConnector, dstNodeConnector);
    } catch (Exception e) {
        return null;
    }
}
 
开发者ID:lbchen,项目名称:ODL,代码行数:10,代码来源:TopologyManagerImpl.java

示例4: _addUserLink

import org.opendaylight.controller.sal.core.NodeConnector; //导入方法依赖的package包/类
public void _addUserLink(CommandInterpreter ci) {
    String name = ci.nextArgument();
    if ((name == null)) {
        ci.println("Please enter a valid Name");
        return;
    }

    String ncStr1 = ci.nextArgument();
    if (ncStr1 == null) {
        ci.println("Please enter two node connector strings");
        return;
    }
    String ncStr2 = ci.nextArgument();
    if (ncStr2 == null) {
        ci.println("Please enter second node connector string");
        return;
    }

    NodeConnector nc1 = NodeConnector.fromString(ncStr1);
    if (nc1 == null) {
        ci.println("Invalid input node connector 1 string: " + ncStr1);
        return;
    }
    NodeConnector nc2 = NodeConnector.fromString(ncStr2);
    if (nc2 == null) {
        ci.println("Invalid input node connector 2 string: " + ncStr2);
        return;
    }

    TopologyUserLinkConfig config = new TopologyUserLinkConfig(name, ncStr1, ncStr2);
    ci.println(this.addUserLink(config));
}
 
开发者ID:lbchen,项目名称:ODL,代码行数:33,代码来源:TopologyManagerImpl.java

示例5: isValidNodeConnector

import org.opendaylight.controller.sal.core.NodeConnector; //导入方法依赖的package包/类
public boolean isValidNodeConnector(String nodeConnectorStr) {
    NodeConnector nc = NodeConnector.fromString(nodeConnectorStr);
    if (nc == null) return false;
    return true;
}
 
开发者ID:lbchen,项目名称:ODL,代码行数:6,代码来源:TopologyUserLinkConfig.java


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