本文整理汇总了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder.setOrder方法的典型用法代码示例。如果您正苦于以下问题:Java ActionBuilder.setOrder方法的具体用法?Java ActionBuilder.setOrder怎么用?Java ActionBuilder.setOrder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder
的用法示例。
在下文中一共展示了ActionBuilder.setOrder方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createDlDstInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入方法依赖的package包/类
public static InstructionBuilder createDlDstInstructions(InstructionBuilder ib, MacAddress macAddress) {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
SetDlDstActionBuilder dlDstActionBuilder= new SetDlDstActionBuilder();
dlDstActionBuilder.setAddress(macAddress);
ab.setAction(new SetDlDstActionCaseBuilder().setSetDlDstAction(dlDstActionBuilder.build()).build());
ab.setOrder(0);
ab.setKey(new ActionKey(0));
actionList.add(ab.build());
// Create an Apply Action
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
// Wrap our Apply Action in an Instruction
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
return ib;
}
示例2: createSrcArpIpInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入方法依赖的package包/类
/**
* Set ARP_SPA Instructions
* @param ib Map InstructionBuilder
* @param srciparp the srciparp
* @return instructionbuilder with new attributes
*/
public static InstructionBuilder createSrcArpIpInstructions(InstructionBuilder ib, Ipv4Prefix srciparp) {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
SetFieldBuilder setFieldBuilder = new SetFieldBuilder();
ArpMatchBuilder arpmatch = new ArpMatchBuilder();
arpmatch.setArpSourceTransportAddress(srciparp);
setFieldBuilder.setLayer3Match(arpmatch.build());
ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build());
ab.setOrder(0);
ab.setKey(new ActionKey(0));
actionList.add(ab.build());
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
// Wrap our Apply Action in an Instruction
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
return ib;
}
示例3: createSetIcmpTypeInstruction
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入方法依赖的package包/类
/**
* Create Set ICMP Code Instruction
*
* @param ib Map InstructionBuilder without any instructions
* @return ib Map InstructionBuilder with instructions
*/
public static InstructionBuilder createSetIcmpTypeInstruction(InstructionBuilder ib, short type) {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
SetFieldBuilder setFieldBuilder = new SetFieldBuilder();
Icmpv4MatchBuilder icmpv4match = new Icmpv4MatchBuilder();
// Build the ICMPv4 Code Match
icmpv4match.setIcmpv4Code(type);
setFieldBuilder.setIcmpv4Match(icmpv4match.build());
ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build());
ab.setOrder(0);
ab.setKey(new ActionKey(0));
actionList.add(ab.build());
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
// Wrap our Apply Action in an Instruction
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
return ib;
}
示例4: createSetDstTCPPort
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入方法依赖的package包/类
/**
* Create Set Destination TCP Port Instruction
*
* @param ib Map InstructionBuilder without any instructions
* @param tcpport Integer representing a source TCP port
* @return ib Map InstructionBuilder with instructions
*/
public static InstructionBuilder createSetDstTCPPort(InstructionBuilder ib, PortNumber tcpport) {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
SetFieldBuilder setFieldBuilder = new SetFieldBuilder();
// Build the Destination TCP Port
PortNumber tcpdstport = new PortNumber(tcpport);
TcpMatchBuilder tcpmatch = new TcpMatchBuilder();
tcpmatch.setTcpDestinationPort(tcpdstport);
setFieldBuilder.setLayer4Match(tcpmatch.build());
ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build());
ab.setOrder(0);
ab.setKey(new ActionKey(0));
actionList.add(ab.build());
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
return ib;
}
示例5: createSendToControllerInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入方法依赖的package包/类
/**
* Create Send to Controller Reserved Port Instruction (packet_in)
*
* @param nodeName Uri Prefix, containing nodeConnectorType and dpId (aka NodeId)
* @param ib Map InstructionBuilder without any instructions
* @return ib Map InstructionBuilder with instructions
*/
public static InstructionBuilder createSendToControllerInstructions(String nodeName, InstructionBuilder ib) {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
OutputActionBuilder output = new OutputActionBuilder();
output.setMaxLength(MAX_LENGTH);
NodeId nodeId = new NodeId(nodeName);
output.setOutputNodeConnector(new NodeConnectorId(nodeId.getValue() + ":"
+ OutputPortValues.CONTROLLER.toString()));
ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
ab.setOrder(0);
ab.setKey(new ActionKey(0));
actionList.add(ab.build());
// Create an Apply Action
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
// Wrap our Apply Action in an Instruction
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
return ib;
}
示例6: createNormalInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入方法依赖的package包/类
/**
* Create NORMAL Reserved Port Instruction (packet_in)
*
* @param nodeName Uri Prefix, containing nodeConnectorType and dpId (aka NodeId)
* @param ib Map InstructionBuilder without any instructions
* @return ib Map InstructionBuilder with instructions
*/
public static InstructionBuilder createNormalInstructions(String nodeName, InstructionBuilder ib) {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
OutputActionBuilder output = new OutputActionBuilder();
NodeId nodeId = new NodeId(nodeName);
output.setOutputNodeConnector(new NodeConnectorId(nodeId.getValue() + ":"
+ OutputPortValues.NORMAL.toString()));
ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
ab.setOrder(0);
ab.setKey(new ActionKey(0));
actionList.add(ab.build());
// Create an Apply Action
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
// Wrap our Apply Action in an Instruction
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
return ib;
}
示例7: createLocalInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入方法依赖的package包/类
/**
* Create LOCAL Reserved Port Instruction
*
* @param ib Map InstructionBuilder without any instructions
* @param dpidLong Long the datapath ID of a switch/node
* @return ib Map InstructionBuilder with instructions
*/
public static InstructionBuilder createLocalInstructions(InstructionBuilder ib, long dpidLong) {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
OutputActionBuilder output = new OutputActionBuilder();
output.setOutputNodeConnector(new NodeConnectorId("openflow:" + dpidLong + ":"
+ OutputPortValues.LOCAL.toString()));
ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
ab.setOrder(0);
ab.setKey(new ActionKey(0));
actionList.add(ab.build());
// Create an Apply Action
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
// Wrap our Apply Action in an Instruction
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
return ib;
}
示例8: createDstArpIpInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入方法依赖的package包/类
/**
* Set ARP_TPA Instructions
* @param ib Map InstructionBuilder
* @param dstiparp the dstiparp
* @return instructionbuilder with new attributes
*/
public static InstructionBuilder createDstArpIpInstructions(InstructionBuilder ib, Ipv4Prefix dstiparp) {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
SetFieldBuilder setFieldBuilder = new SetFieldBuilder();
ArpMatchBuilder arpmatch = new ArpMatchBuilder();
arpmatch.setArpTargetTransportAddress(dstiparp);
setFieldBuilder.setLayer3Match(arpmatch.build());
ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build());
ab.setOrder(0);
ab.setKey(new ActionKey(0));
actionList.add(ab.build());
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
// Wrap our Apply Action in an Instruction
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
return ib;
}
示例9: createNwSrcInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入方法依赖的package包/类
/**
* Create Set IPv4 Source Instruction
*
* @param ib Map InstructionBuilder without any instructions
* @param prefixsrc String containing an IPv4 prefix
* @return ib Map InstructionBuilder with instructions
*/
public static InstructionBuilder createNwSrcInstructions(InstructionBuilder ib, Ipv4Prefix prefixsrc) {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
SetNwSrcActionBuilder setNwsrcActionBuilder = new SetNwSrcActionBuilder();
Ipv4Builder ipsrc = new Ipv4Builder();
ipsrc.setIpv4Address(prefixsrc);
setNwsrcActionBuilder.setAddress(ipsrc.build());
ab.setAction(new SetNwSrcActionCaseBuilder().setSetNwSrcAction(setNwsrcActionBuilder.build()).build());
ab.setOrder(0);
ab.setKey(new ActionKey(0));
actionList.add(ab.build());
// Create an Apply Action
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
// Wrap our Apply Action in an Instruction
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
return ib;
}
示例10: createDstArpMacInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入方法依赖的package包/类
/**
* Set ARP_THA Instructions
* @param ib Map InstructionBuilder
* @param macdst the macdst
* @return instructionbuilder with new attributes
*/
public static InstructionBuilder createDstArpMacInstructions(InstructionBuilder ib, MacAddress macdst) {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
SetFieldBuilder setFieldBuilder = new SetFieldBuilder();
ArpMatchBuilder arpmatch = new ArpMatchBuilder();
ArpTargetHardwareAddressBuilder arpdst = new ArpTargetHardwareAddressBuilder();
arpdst.setAddress(macdst);
setFieldBuilder.setLayer3Match(arpmatch.build());
ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build());
ab.setOrder(0);
ab.setKey(new ActionKey(0));
actionList.add(ab.build());
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
// Wrap our Apply Action in an Instruction
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
return ib;
}
示例11: createSetSrcUDPPort
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入方法依赖的package包/类
/**
* Create Set Source UDP Port Instruction
*
* @param ib Map InstructionBuilder without any instructions
* @param udpport Integer representing a source UDP port
* @return ib Map InstructionBuilder with instructions
*/
public static InstructionBuilder createSetSrcUDPPort(InstructionBuilder ib, PortNumber udpport) {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
SetFieldBuilder setFieldBuilder = new SetFieldBuilder();
// Build the Destination TCP Port
PortNumber udpsrcport = new PortNumber(udpport);
UdpMatchBuilder udpmatch = new UdpMatchBuilder();
udpmatch.setUdpSourcePort(udpsrcport);
setFieldBuilder.setLayer4Match(udpmatch.build());
ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build());
ab.setOrder(0);
ab.setKey(new ActionKey(0));
actionList.add(ab.build());
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
return ib;
}
示例12: createNormalInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入方法依赖的package包/类
/**
* Create NORMAL Reserved Port Instruction (packet_in)
*
* @param ib Map InstructionBuilder without any instructions
* @return ib Map InstructionBuilder with instructions
*/
public static InstructionBuilder createNormalInstructions(InstructionBuilder ib) {
List<Action> actionList = Lists.newArrayList();
ActionBuilder ab = new ActionBuilder();
OutputActionBuilder output = new OutputActionBuilder();
Uri value = new Uri("NORMAL");
output.setOutputNodeConnector(value);
ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build());
ab.setOrder(0);
ab.setKey(new ActionKey(0));
actionList.add(ab.build());
// Create an Apply Action
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
// Wrap our Apply Action in an Instruction
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
return ib;
}
示例13: createOutputPortInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入方法依赖的package包/类
/**
* Create Output Port Instruction
*
* @param ib Map InstructionBuilder without any instructions
* @param dpidLong Long the datapath ID of a switch/node
* @param port Long representing a port on a switch/node
* @return ib InstructionBuilder Map with instructions
*/
public static InstructionBuilder createOutputPortInstructions(InstructionBuilder ib, Long dpidLong, Long port) {
NodeConnectorId ncid = new NodeConnectorId("openflow:" + dpidLong + ":" + port);
logger.debug("createOutputPortInstructions() Node Connector ID is - Type=openflow: DPID={} inPort={} ",
dpidLong, port);
List<Action> actionList = Lists.newArrayList();
ActionBuilder ab = new ActionBuilder();
OutputActionBuilder oab = new OutputActionBuilder();
oab.setOutputNodeConnector(ncid);
ab.setAction(new OutputActionCaseBuilder().setOutputAction(oab.build()).build());
ab.setOrder(0);
ab.setKey(new ActionKey(0));
actionList.add(ab.build());
// Create an Apply Action
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
return ib;
}
示例14: createPopVlanInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入方法依赖的package包/类
/**
* Create Pop Vlan Instruction - this remove vlan header
*
* @param ib Map InstructionBuilder without any instructions
* @return ib Map InstructionBuilder with instructions
*/
public static InstructionBuilder createPopVlanInstructions(InstructionBuilder ib) {
List<Action> actionList = Lists.newArrayList();
ActionBuilder ab = new ActionBuilder();
PopVlanActionBuilder popVlanActionBuilder = new PopVlanActionBuilder();
ab.setAction(new PopVlanActionCaseBuilder().setPopVlanAction(popVlanActionBuilder.build()).build());
ab.setOrder(0);
actionList.add(ab.build());
// Create an Apply Action
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
// Wrap our Apply Action in an Instruction
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
return ib;
}
示例15: createNwSrcInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入方法依赖的package包/类
/**
* Create Set IPv4 Source Instruction
*
* @param ib Map InstructionBuilder without any instructions
* @param prefixsrc String containing an IPv4 prefix
* @return ib Map InstructionBuilder with instructions
*/
public static InstructionBuilder createNwSrcInstructions(InstructionBuilder ib, Ipv4Prefix prefixsrc) {
List<Action> actionList = Lists.newArrayList();
ActionBuilder ab = new ActionBuilder();
SetNwSrcActionBuilder setNwsrcActionBuilder = new SetNwSrcActionBuilder();
Ipv4Builder ipsrc = new Ipv4Builder();
ipsrc.setIpv4Address(prefixsrc);
setNwsrcActionBuilder.setAddress(ipsrc.build());
ab.setAction(new SetNwSrcActionCaseBuilder().setSetNwSrcAction(setNwsrcActionBuilder.build()).build());
ab.setOrder(0);
ab.setKey(new ActionKey(0));
actionList.add(ab.build());
// Create an Apply Action
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(actionList);
// Wrap our Apply Action in an Instruction
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
return ib;
}