本文整理汇总了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder类的典型用法代码示例。如果您正苦于以下问题:Java ActionBuilder类的具体用法?Java ActionBuilder怎么用?Java ActionBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ActionBuilder类属于org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list包,在下文中一共展示了ActionBuilder类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: 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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:32,代码来源:OfInstructionUtils.java
示例2: 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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:32,代码来源:OfInstructionUtils.java
示例3: 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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:29,代码来源:OfInstructionUtils.java
示例4: 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);
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
示例5: 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 = 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
示例6: 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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:31,代码来源:OfInstructionUtils.java
示例7: createDropInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入依赖的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
示例8: createSetTunnelIdInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入依赖的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
示例9: createSetSrcTCPPort
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入依赖的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
示例10: 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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:31,代码来源:OfInstructionUtils.java
示例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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:31,代码来源:OfInstructionUtils.java
示例12: createSetDstUDPPort
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入依赖的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
示例13: createSetIcmpCodeInstruction
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
* @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
示例14: 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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:30,代码来源:OfInstructionUtils.java
示例15: createDecNwTtlInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入依赖的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
示例16: createSrcArpMacInstructions
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder; //导入依赖的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
示例17: 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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:29,代码来源:OfInstructionUtils.java
示例18: 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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:28,代码来源:OfInstructionUtils.java
示例19: 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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:28,代码来源:OfInstructionUtils.java
示例20: 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;
}
开发者ID:opendaylight,项目名称:faas,代码行数:24,代码来源:OfInstructionUtils.java
注:本文中的org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论