本文整理汇总了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;
}
示例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;
}
示例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;
}
}
示例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));
}
示例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;
}