本文整理汇总了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder类的典型用法代码示例。如果您正苦于以下问题:Java ApplyActionsCaseBuilder类的具体用法?Java ApplyActionsCaseBuilder怎么用?Java ApplyActionsCaseBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ApplyActionsCaseBuilder类属于org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction包,在下文中一共展示了ApplyActionsCaseBuilder类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: wrapActionsIntoApplyActionsInstruction
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的package包/类
public static InstructionsBuilder wrapActionsIntoApplyActionsInstruction(List<Action> theActions) {
// Create an Apply Action
ApplyActionsBuilder aab = new ApplyActionsBuilder();
aab.setAction(theActions);
// Wrap our Apply Action in an Instruction
InstructionBuilder ib = new InstructionBuilder();
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
ib.setOrder(0);
ib.setKey(new InstructionKey(0));
// Put our Instruction in a list of Instructions
List<Instruction> instructions = new ArrayList<>();
instructions.add(ib.build());
return new InstructionsBuilder().setInstruction(instructions);
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:17,代码来源:OpenFlow13Utils.java
示例2: sortActions
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的package包/类
org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction
sortActions(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction input) {
if (input instanceof ApplyActionsCase) {
List<Action> action = new ArrayList<>(((ApplyActionsCase)input).getApplyActions().getAction());
Collections.sort(action, new Comparator<Action>() {
@Override
public int compare(Action o1, Action o2) {
return o1.getOrder().compareTo(o2.getOrder());
}
});
ApplyActions actions = new ApplyActionsBuilder().setAction(action).build();
return new ApplyActionsCaseBuilder().setApplyActions(actions).build();
}
return null;
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:17,代码来源:ElanServiceTestBase.java
示例3: createSendToControllerInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:32,代码来源:OfInstructionUtils.java
示例4: createNormalInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:32,代码来源:OfInstructionUtils.java
示例5: createLocalInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:29,代码来源:OfInstructionUtils.java
示例6: createOutputPortInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的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);
LOG.debug("createOutputPortInstructions() Node Connector ID is - Type=openflow: DPID={} inPort={} ",
dpidLong, port);
List<Action> actionList = new ArrayList<>();
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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:32,代码来源:OfInstructionUtils.java
示例7: createPopVlanInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的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 = new ArrayList<>();
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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:26,代码来源:OfInstructionUtils.java
示例8: createNwSrcInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:31,代码来源:OfInstructionUtils.java
示例9: createDropInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的package包/类
/**
* Create Drop Instruction
*
* @param ib Map InstructionBuilder without any instructions
* @return ib Map InstructionBuilder with instructions
*/
public static InstructionBuilder createDropInstructions(InstructionBuilder ib) {
DropActionBuilder dab = new DropActionBuilder();
DropAction dropAction = dab.build();
ActionBuilder ab = new ActionBuilder();
ab.setAction(new DropActionCaseBuilder().setDropAction(dropAction).build());
ab.setOrder(0);
ab.setKey(new ActionKey(0));
// Add our drop action to a list
List<Action> actionList = new ArrayList<>();
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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:29,代码来源:OfInstructionUtils.java
示例10: createSetTunnelIdInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的package包/类
/**
* Create Set Tunnel ID Instruction Builder
*
* @param ib Map InstructionBuilder without any instructions
* @param tunnelId BigInteger representing a tunnel ID
* @return ib Map InstructionBuilder with instructions
*/
public static InstructionBuilder createSetTunnelIdInstructions(InstructionBuilder ib, BigInteger tunnelId) {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
SetFieldBuilder setFieldBuilder = new SetFieldBuilder();
// Build the Set Tunnel Field Action
TunnelBuilder tunnel = new TunnelBuilder();
tunnel.setTunnelId(tunnelId);
setFieldBuilder.setTunnel(tunnel.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 the Apply Action in an InstructionBuilder and return
ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
return ib;
}
开发者ID:opendaylight,项目名称:faas,代码行数:31,代码来源:OfInstructionUtils.java
示例11: createSetSrcTCPPort
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的package包/类
/**
* Create Set Source 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 createSetSrcTCPPort(InstructionBuilder ib, PortNumber tcpport) {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
SetFieldBuilder setFieldBuilder = new SetFieldBuilder();
// Build the Destination TCP Port
PortNumber tcpsrcport = new PortNumber(tcpport);
TcpMatchBuilder tcpmatch = new TcpMatchBuilder();
tcpmatch.setTcpSourcePort(tcpsrcport);
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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:31,代码来源:OfInstructionUtils.java
示例12: createSetDstTCPPort
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:31,代码来源:OfInstructionUtils.java
示例13: createSetSrcUDPPort
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:31,代码来源:OfInstructionUtils.java
示例14: createSetDstUDPPort
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的package包/类
/**
* Create Set Destination UDP Port Instruction
*
* @param ib Map InstructionBuilder without any instructions
* @param udpport Integer representing a destination UDP port
* @return ib Map InstructionBuilder with instructions
*/
public static InstructionBuilder createSetDstUDPPort(InstructionBuilder ib, PortNumber udpport) {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
SetFieldBuilder setFieldBuilder = new SetFieldBuilder();
// Build the Destination TCP Port
PortNumber udpdstport = new PortNumber(udpport);
UdpMatchBuilder udpmatch = new UdpMatchBuilder();
udpmatch.setUdpDestinationPort(udpdstport);
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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:31,代码来源:OfInstructionUtils.java
示例15: createSetIcmpCodeInstruction
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的package包/类
/**
* Create Set ICMP Code Instruction
*
* @param ib Map InstructionBuilder without any instructions
* @param code short repesenting an ICMP code
* @return ib Map InstructionBuilder with instructions
*/
public static InstructionBuilder createSetIcmpCodeInstruction(InstructionBuilder ib, short code) {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
SetFieldBuilder setFieldBuilder = new SetFieldBuilder();
Icmpv4MatchBuilder icmpv4match = new Icmpv4MatchBuilder();
// Build the ICMPv4 Code Match
icmpv4match.setIcmpv4Code(code);
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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:32,代码来源:OfInstructionUtils.java
示例16: createSetIcmpTypeInstruction
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:30,代码来源:OfInstructionUtils.java
示例17: createDecNwTtlInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的package包/类
/**
* Create Decrement TTL Instruction
*
* @param ib Map InstructionBuilder without any instructions
* @return ib Map InstructionBuilder with instructions
*/
public static InstructionBuilder createDecNwTtlInstructions(InstructionBuilder ib) {
DecNwTtlBuilder decNwTtlBuilder = new DecNwTtlBuilder();
DecNwTtl decNwTtl = decNwTtlBuilder.build();
ActionBuilder ab = new ActionBuilder();
ab.setAction(new DecNwTtlCaseBuilder().setDecNwTtl(decNwTtl).build());
ab.setOrder(0);
ab.setKey(new ActionKey(0));
// Add our drop action to a list
List<Action> actionList = new ArrayList<>();
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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:28,代码来源:OfInstructionUtils.java
示例18: createSrcArpMacInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的package包/类
/**
* Set ARP_SHA Instructions
* @param ib Map InstructionBuilder
* @param macsrc the macsrc
* @return instructionbuilder with new instructions
*/
public static InstructionBuilder createSrcArpMacInstructions(InstructionBuilder ib, MacAddress macsrc) {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
SetFieldBuilder setFieldBuilder = new SetFieldBuilder();
ArpMatchBuilder arpmatch = new ArpMatchBuilder();
ArpSourceHardwareAddressBuilder arpsrc = new ArpSourceHardwareAddressBuilder();
arpsrc.setAddress(macsrc);
arpmatch.setArpSourceHardwareAddress(arpsrc.build());
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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:30,代码来源:OfInstructionUtils.java
示例19: createDstArpMacInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:29,代码来源:OfInstructionUtils.java
示例20: createDstArpIpInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder; //导入依赖的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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:28,代码来源:OfInstructionUtils.java
注:本文中的org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论