本文整理了Java中org.opendaylight.controller.sal.flowprogrammer.Flow.removeAction()
方法的一些代码示例,展示了Flow.removeAction()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.removeAction()
方法的具体详情如下:
包路径:org.opendaylight.controller.sal.flowprogrammer.Flow
类名称:Flow
方法名:removeAction
[英]remove ALL actions of type actionType from the list of actions of this flow
[中]从该流的操作列表中删除actionType类型的所有操作
代码示例来源:origin: org.opendaylight.controller/sal
/**
* remove ALL actions of type actionType from the list of actions of this
* flow
*
* @param actionType
* @return false if an action of that type is present and it fails to remove
* it
*/
public boolean removeAction(ActionType actionType) {
Iterator<Action> actionIter = this.getActions().iterator();
while (actionIter.hasNext()) {
Action action = actionIter.next();
if (action.getType() == actionType) {
if (!this.removeAction(action)) {
return false;
}
}
}
return true;
}
代码示例来源:origin: org.opendaylight.controller/forwardingrulesmanager.implementation
@Override
public void removeOutputPort(Node node, String flowName, List<NodeConnector> portList) {
for (FlowEntryInstall index : this.nodeFlows.get(node)) {
FlowEntryInstall flow = this.installedSwView.get(index);
if (flow.getFlowName().equals(flowName)) {
FlowEntry currentFlowEntry = flow.getOriginal();
FlowEntry newFlowEntry = currentFlowEntry.clone();
for (NodeConnector dstPort : portList) {
Action action = new Output(dstPort);
newFlowEntry.getFlow().removeAction(action);
}
Status status = modifyEntry(currentFlowEntry, newFlowEntry, false);
if (status.isSuccess()) {
log.trace("Ports {} removed from FlowEntry {}", portList, flowName);
} else {
log.warn("Failed to remove ports {} from Flow entry {}. The failure is: {}", portList,
currentFlowEntry.toString(), status.getDescription());
}
return;
}
}
log.warn("Failed to remove ports from Flow {} on Node {}: Entry Not Found", flowName, node);
}
代码示例来源:origin: org.opendaylight.controller/forwardingrulesmanager.implementation
newFlowEntry.getFlow().removeAction(target);
newFlowEntry.getFlow().addAction(new Output(outPort));
内容来源于网络,如有侵权,请联系作者删除!