org.opendaylight.controller.sal.flowprogrammer.Flow.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(126)

本文整理了Java中org.opendaylight.controller.sal.flowprogrammer.Flow.<init>()方法的一些代码示例,展示了Flow.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flow.<init>()方法的具体详情如下:
包路径:org.opendaylight.controller.sal.flowprogrammer.Flow
类名称:Flow
方法名:<init>

Flow.<init>介绍

暂无

代码示例

代码示例来源:origin: org.opendaylight.affinity/l2agent

private void installFlow(Match match, List<Action> actions, Node incoming_node, short priority) {
  Flow f = new Flow(match, actions);
  f.setPriority(priority);
  // Modify the flow on the network node
  Status status = programmer.addFlow(incoming_node, f);
  if (!status.isSuccess()) {
    logger.warn("SDN Plugin failed to program the flow: {}. The failure is: {}",
          f, status.getDescription());
    return;
  }
  logger.info("Installed flow {} in node {}", f, incoming_node);
}

代码示例来源:origin: org.opendaylight.snmp4sdn/snmp4sdn

private List<FlowOnNode> forwardingTableEntriesToFlows(Map<String, Integer> entries, Node node){
  List<FlowOnNode> list = new ArrayList<FlowOnNode>();
  for(Map.Entry<String, Integer> entry : entries.entrySet()){
    Match match = new Match();
    String str = entry.getKey();
    short vlan = Short.parseShort(str.substring(0, str.indexOf(".")));
    byte[] macAddrBytes = OIDToMacAddrBytes(str.substring(str.indexOf(".") + 1));
    if(macAddrBytes == null){
      logger.debug("ERROR: forwardingTableEntriesToFlows(): nodeID is {}, call OIDToMacAddrBytes() fail", (Long)node.getID());
      return null;
    }
    match.setField(MatchType.DL_VLAN, vlan);
    match.setField(MatchType.DL_DST, macAddrBytes);
    List<Action> actions = new ArrayList<Action>();
    NodeConnector oport = NodeConnectorCreator.createNodeConnector("SNMP", Short.parseShort(entry.getValue().toString()), node);
    actions.add(new Output(oport));
    Flow flow = new Flow(match, actions);
    list.add(new FlowOnNode(flow));
  }
  return list;
}

代码示例来源:origin: org.opendaylight.openflowplugin.legacy/sal-compatibility

/**
 * @param source notification, missing instructions
 * @param node corresponding node where the flow change occured
 * @return ad-sal node, build from given data
 */
public static Flow toFlow(SwitchFlowRemoved source, Node node) {
  final Flow target = new Flow();
  genericFlowToAdFlow(source, target);
  target.setMatch(toMatch(source.getMatch()));
  return target;
}

代码示例来源:origin: org.opendaylight.openflowplugin.legacy/sal-compatibility

public static Flow toFlow(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.Flow source, Node node) {
  final Flow target = new Flow();
  genericFlowToAdFlow(source, target);
  target.setMatch(toMatch(source.getMatch()));
  List<Action> actions = getAction(source);
  if (actions != null) {
    target.setActions(actionFrom(actions, node));
  }
  return target;
}

代码示例来源:origin: org.opendaylight.controller/protocol_plugins.stub

Flow flow = new Flow();
Match match = new Match();
try {

代码示例来源:origin: org.opendaylight.snmp4sdn/snmp4sdn

List<Action> actions = new ArrayList<Action>();
actions.add(new Output(oport));
Flow flown = new Flow(flow.getMatch(), actions);
return new FlowOnNode(flown);

代码示例来源:origin: org.opendaylight.controller/forwardingrulesmanager

Flow flow = new Flow(match, getActionList());

代码示例来源:origin: org.opendaylight.controller/sal.implementation

actions.add(new Flood());
actions.add(new Controller());
return new Flow(match, actions);

代码示例来源:origin: org.opendaylight.controller/sal.implementation

actions.add(new Controller());
Flow flow = new Flow(match, actions);
flow.setPriority((short) 100);
flow.setHardTimeout((short) 360);

代码示例来源:origin: org.opendaylight.controller/samples.simpleforwarding

Flow flow = new Flow(match, actions);
flow.setIdleTimeout((short) 0);
flow.setHardTimeout((short) 0);

代码示例来源:origin: org.opendaylight.controller/sal.implementation

actions.add(new Flood());
Flow flow = new Flow(match, actions);
flow.setPriority((short) 300);
flow.setHardTimeout((short) 240);

代码示例来源:origin: org.opendaylight.controller/samples.loadbalancer

Flow flow = new Flow(match, actions);
flow.setIdleTimeout((short) 5);
flow.setHardTimeout((short) 0);

代码示例来源:origin: org.opendaylight.controller/protocol_plugins.openflow

flow = new Flow(salMatch, salActionList);

相关文章