本文整理汇总了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action类的典型用法代码示例。如果您正苦于以下问题:Java Action类的具体用法?Java Action怎么用?Java Action使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Action类属于org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list包,在下文中一共展示了Action类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: bindScfOnVpnInterface
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
public void bindScfOnVpnInterface(String ifName, int scfTag) {
LOG.debug("bind SCF tag {} on iface {}", scfTag, ifName);
if (isServiceBoundOnInterface(NwConstants.SCF_SERVICE_INDEX, ifName)) {
LOG.info("SCF is already bound on Interface {} for Ingress. Binding aborted", ifName);
return;
}
Action loadReg2Action = new ActionRegLoad(1, NxmNxReg2.class, 0, 31, scfTag).buildAction();
List<Instruction> instructions =
Arrays.asList(MDSALUtil.buildApplyActionsInstruction(Collections.singletonList(loadReg2Action)),
MDSALUtil.buildAndGetGotoTableInstruction(NwConstants.SCF_DOWN_SUB_FILTER_TCP_BASED_TABLE,
1 /*instructionKey, not sure why it is needed*/));
BoundServices boundServices =
InterfaceServiceUtil.getBoundServices(ifName, NwConstants.SCF_SERVICE_INDEX,
CloudServiceChainConstants.DEFAULT_SCF_FLOW_PRIORITY,
CloudServiceChainConstants.COOKIE_SCF_BASE,
instructions);
interfaceManager.bindService(ifName, ServiceModeIngress.class, boundServices);
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:19,代码来源:VPNServiceChainHandler.java
示例2: getEgressActions
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
private List<Action> getEgressActions(String interfaceName, int actionKey) {
List<Action> actions = Collections.emptyList();
try {
GetEgressActionsForInterfaceInputBuilder egressAction =
new GetEgressActionsForInterfaceInputBuilder().setIntfName(interfaceName).setActionKey(actionKey);
Future<RpcResult<GetEgressActionsForInterfaceOutput>> result =
interfaceManager.getEgressActionsForInterface(egressAction.build());
RpcResult<GetEgressActionsForInterfaceOutput> rpcResult = result.get();
if (!rpcResult.isSuccessful()) {
LOG.warn("RPC Call to Get egress actions for interface {} returned with Errors {}",
interfaceName, rpcResult.getErrors());
} else {
actions = rpcResult.getResult().getAction();
}
} catch (InterruptedException | ExecutionException e) {
LOG.warn("Exception when egress actions for interface {}", interfaceName, e);
}
return actions;
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:20,代码来源:NexthopManager.java
示例3: buildBucketForDcGwLbGroup
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
private Bucket buildBucketForDcGwLbGroup(String ipAddress, BigInteger dpnId,
int index) {
List<Action> listAction = new ArrayList<>();
// ActionKey 0 goes to mpls label.
int actionKey = 1;
listAction.add(new ActionPushMpls().buildAction());
listAction.add(new ActionRegMove(actionKey++, FibConstants.NXM_REG_MAPPING
.get(index), 0, 19).buildAction());
String tunnelInterfaceName = getTunnelInterfaceName(dpnId, new IpAddress(ipAddress.toCharArray()));
List<Action> egressActions = getEgressActions(tunnelInterfaceName, actionKey++);
if (!egressActions.isEmpty()) {
listAction.addAll(getEgressActions(tunnelInterfaceName, actionKey++));
} else {
// clear off actions if there is no egress actions.
listAction = Collections.emptyList();
}
return MDSALUtil.buildBucket(listAction, MDSALUtil.GROUP_WEIGHT, index,
MDSALUtil.WATCH_PORT, MDSALUtil.WATCH_GROUP);
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:20,代码来源:NexthopManager.java
示例4: wrapActionsIntoApplyActionsInstruction
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的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
示例5: createIngressClassifierSfcTunnelTrafficCaptureFlow
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
public Flow createIngressClassifierSfcTunnelTrafficCaptureFlow(NodeId nodeId) {
MatchBuilder match = new MatchBuilder();
OpenFlow13Utils.addMatchTunId(match, SFC_TUNNEL_ID);
OpenFlow13Utils.addMatchEthNsh(match);
List<Action> actionList = new ArrayList<>();
actionList.add(OpenFlow13Utils.createActionResubmitTable(NwConstants.INGRESS_SFC_CLASSIFIER_FILTER_TABLE,
actionList.size()));
InstructionsBuilder isb = OpenFlow13Utils.wrapActionsIntoApplyActionsInstruction(actionList);
String flowIdStr = INGRESS_CLASSIFIER_CAPTURE_SFC_TUNNEL_TRAFFIC_FLOW_NAME + nodeId.getValue();
return OpenFlow13Utils.createFlowBuilder(NwConstants.INTERNAL_TUNNEL_TABLE,
INGRESS_CLASSIFIER_CAPTURE_SFC_TUNNEL_TRAFFIC_PRIORITY,
INGRESS_CLASSIFIER_CAPTURE_SFC_TUNNEL_TRAFFIC_COOKIE,
INGRESS_CLASSIFIER_CAPTURE_SFC_TUNNEL_TRAFFIC_FLOW_NAME, flowIdStr, match, isb).build();
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:19,代码来源:OpenFlow13Provider.java
示例6: createIngressClassifierFilterEthNshFlow
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
public Flow createIngressClassifierFilterEthNshFlow(NodeId nodeId) {
MatchBuilder match = new MatchBuilder();
OpenFlow13Utils.addMatchEthNsh(match);
OpenFlow13Utils.addMatchTunDstIp(match, NULL_IP);
List<Action> actionList = new ArrayList<>();
actionList.add(OpenFlow13Utils.createActionResubmitTable(NwConstants.LPORT_DISPATCHER_TABLE,
actionList.size()));
InstructionsBuilder isb = OpenFlow13Utils.wrapActionsIntoApplyActionsInstruction(actionList);
String flowIdStr = INGRESS_CLASSIFIER_FILTER_ETHNSH_FLOW_NAME + nodeId.getValue();
return OpenFlow13Utils.createFlowBuilder(NwConstants.INGRESS_SFC_CLASSIFIER_FILTER_TABLE,
INGRESS_CLASSIFIER_FILTER_ETH_NSH_PRIORITY, INGRESS_CLASSIFIER_FILTER_COOKIE,
INGRESS_CLASSIFIER_FILTER_ETHNSH_FLOW_NAME, flowIdStr, match, isb).build();
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:17,代码来源:OpenFlow13Provider.java
示例7: createIngressClassifierFilterChainEgressFlow
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
public Flow createIngressClassifierFilterChainEgressFlow(NodeId nodeId, long nsp, short egressNsi) {
MatchBuilder match = new MatchBuilder();
OpenFlow13Utils.addMatchNsp(match, nsp);
OpenFlow13Utils.addMatchNsi(match, egressNsi);
List<Action> actionList = new ArrayList<>();
actionList.add(OpenFlow13Utils.createActionNxMoveNsc4ToReg6Register(actionList.size()));
actionList.add(OpenFlow13Utils.createActionNxPopNsh(actionList.size()));
actionList.add(OpenFlow13Utils.createActionResubmitTable(NwConstants.EGRESS_LPORT_DISPATCHER_TABLE,
actionList.size()));
InstructionsBuilder isb = OpenFlow13Utils.wrapActionsIntoApplyActionsInstruction(actionList);
String flowIdStr = INGRESS_CLASSIFIER_FILTER_NSH_CHAIN_EGRESS_FLOW_NAME + nodeId.getValue() + "_" + nsp;
return OpenFlow13Utils.createFlowBuilder(NwConstants.INGRESS_SFC_CLASSIFIER_FILTER_TABLE,
INGRESS_CLASSIFIER_FILTER_CHAIN_EGRESS_PRIORITY, INGRESS_CLASSIFIER_FILTER_COOKIE,
INGRESS_CLASSIFIER_FILTER_NSH_CHAIN_EGRESS_FLOW_NAME, flowIdStr, match, isb).build();
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:20,代码来源:OpenFlow13Provider.java
示例8: createIngressClassifierAclFlow
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
public Flow createIngressClassifierAclFlow(NodeId nodeId, MatchBuilder match, Long port, long nsp, short nsi) {
OpenFlow13Utils.addMatchInPort(match, nodeId, port);
List<Action> actionList = new ArrayList<>();
actionList.add(OpenFlow13Utils.createActionNxPushNsh(actionList.size()));
actionList.add(OpenFlow13Utils.createActionNxLoadNshMdtype(NSH_MDTYPE_ONE, actionList.size()));
actionList.add(OpenFlow13Utils.createActionNxLoadNp(NSH_NP_ETH, actionList.size()));
actionList.add(OpenFlow13Utils.createActionNxLoadNsp((int) nsp, actionList.size()));
actionList.add(OpenFlow13Utils.createActionNxLoadNsi(nsi, actionList.size()));
actionList.add(OpenFlow13Utils.createActionNxLoadNshc1(ACL_FLAG_CONTEXT_VALUE, actionList.size()));
actionList.add(OpenFlow13Utils.createActionNxLoadNshc2(DEFAULT_NSH_CONTEXT_VALUE, actionList.size()));
actionList.add(OpenFlow13Utils.createActionResubmitTable(NwConstants.LPORT_DISPATCHER_TABLE,
actionList.size()));
InstructionsBuilder isb = OpenFlow13Utils.wrapActionsIntoApplyActionsInstruction(actionList);
// The flowIdStr needs to be unique, so the best way to make it unique is to use the match
String flowIdStr = INGRESS_CLASSIFIER_ACL_FLOW_NAME + "_" + nodeId.getValue() + match.build().toString();
return OpenFlow13Utils.createFlowBuilder(NwConstants.INGRESS_SFC_CLASSIFIER_ACL_TABLE,
INGRESS_CLASSIFIER_ACL_PRIORITY, INGRESS_CLASSIFIER_ACL_COOKIE, INGRESS_CLASSIFIER_ACL_FLOW_NAME,
flowIdStr, match, isb).build();
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:24,代码来源:OpenFlow13Provider.java
示例9: createIngressClassifierAclNoMatchFlow
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
public Flow createIngressClassifierAclNoMatchFlow(NodeId nodeId) {
// This is a MatchAny flow
MatchBuilder match = new MatchBuilder();
List<Action> actionList = new ArrayList<>();
actionList.add(OpenFlow13Utils.createActionResubmitTable(NwConstants.LPORT_DISPATCHER_TABLE,
actionList.size()));
InstructionsBuilder isb = OpenFlow13Utils.wrapActionsIntoApplyActionsInstruction(actionList);
String flowIdStr = INGRESS_CLASSIFIER_ACL_FLOW_NAME + "_" + nodeId.getValue();
return OpenFlow13Utils.createFlowBuilder(NwConstants.INGRESS_SFC_CLASSIFIER_ACL_TABLE,
INGRESS_CLASSIFIER_ACL_NOMATCH_PRIORITY, INGRESS_CLASSIFIER_ACL_COOKIE,
INGRESS_CLASSIFIER_ACL_FLOW_NAME, flowIdStr, match, isb).build();
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:17,代码来源:OpenFlow13Provider.java
示例10: createEgressClassifierNextHopNoC1C2Flow
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
public Flow createEgressClassifierNextHopNoC1C2Flow(NodeId nodeId) {
MatchBuilder match = new MatchBuilder();
OpenFlow13Utils.addMatchNshNsc1(match, DEFAULT_NSH_CONTEXT_VALUE);
OpenFlow13Utils.addMatchNshNsc2(match, DEFAULT_NSH_CONTEXT_VALUE);
List<Action> actionList = new ArrayList<>();
actionList.add(OpenFlow13Utils.createActionNxMoveReg0ToNsc1Register(actionList.size()));
actionList.add(OpenFlow13Utils.createActionNxMoveTunIdToNsc2Register(actionList.size()));
actionList.add(OpenFlow13Utils.createActionNxMoveReg6ToNsc4Register(actionList.size()));
actionList.add(OpenFlow13Utils.createActionNxLoadTunId(SFC_TUNNEL_ID, actionList.size()));
InstructionsBuilder isb = OpenFlow13Utils.wrapActionsIntoApplyActionsInstruction(actionList);
OpenFlow13Utils.appendGotoTableInstruction(isb, NwConstants.EGRESS_SFC_CLASSIFIER_EGRESS_TABLE);
String flowIdStr = EGRESS_CLASSIFIER_NEXTHOP_NOC1C2_FLOW_NAME + nodeId.getValue();
return OpenFlow13Utils.createFlowBuilder(NwConstants.EGRESS_SFC_CLASSIFIER_NEXTHOP_TABLE,
EGRESS_CLASSIFIER_NEXTHOP_NOC1C2_PRIORITY, EGRESS_CLASSIFIER_NEXTHOP_COOKIE,
EGRESS_CLASSIFIER_NEXTHOP_NOC1C2_FLOW_NAME, flowIdStr, match, isb).build();
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:20,代码来源:OpenFlow13Provider.java
示例11: createEgressClassifierTransportEgressRemoteFlow
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
public Flow createEgressClassifierTransportEgressRemoteFlow(NodeId nodeId, long nsp, long outport,
String firstHopIp) {
MatchBuilder match = OpenFlow13Utils.getNspMatch(nsp);
Long ipl = InetAddresses.coerceToInteger(InetAddresses.forString(firstHopIp)) & 0xffffffffL;
List<Action> actionList = new ArrayList<>();
actionList.add(OpenFlow13Utils.createActionNxLoadTunIpv4Dst(ipl, actionList.size()));
actionList.add(OpenFlow13Utils.createActionOutPort("output:" + outport, actionList.size()));
InstructionsBuilder isb = OpenFlow13Utils.wrapActionsIntoApplyActionsInstruction(actionList);
String flowIdStr = EGRESS_CLASSIFIER_TPORTEGRESS_FLOW_NAME + nodeId.getValue() + "_" + nsp;
return OpenFlow13Utils.createFlowBuilder(NwConstants.EGRESS_SFC_CLASSIFIER_EGRESS_TABLE,
EGRESS_CLASSIFIER_EGRESS_REMOTE_PRIORITY, EGRESS_CLASSIFIER_TPORTEGRESS_COOKIE,
EGRESS_CLASSIFIER_TPORTEGRESS_FLOW_NAME, flowIdStr, match, isb).build();
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:17,代码来源:OpenFlow13Provider.java
示例12: bindService
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
private void bindService(InstanceIdentifier<BoundServices> id, short serviceId, String serviceName,
int servicePriority, short serviceDestTable, BigInteger serviceTableCookie, List<Action> extraActions) {
InstructionsBuilder isb = extraActions.isEmpty()
? new InstructionsBuilder()
: OpenFlow13Utils.wrapActionsIntoApplyActionsInstruction(extraActions);
isb = OpenFlow13Utils.appendGotoTableInstruction(isb, serviceDestTable);
StypeOpenflow stypeOpenflow = new StypeOpenflowBuilder()
.setFlowCookie(serviceTableCookie)
.setFlowPriority(servicePriority)
.setInstruction(isb.build().getInstruction())
.build();
BoundServices boundServices = new BoundServicesBuilder().setServiceName(serviceName)
.setServicePriority(serviceId).setServiceType(ServiceTypeFlowBased.class)
.addAugmentation(StypeOpenflow.class, stypeOpenflow).build();
LOG.info("Binding Service ID [{}] name [{}] priority [{}] table [{}] cookie [{}] extraActions [{}]",
serviceId, serviceName, servicePriority, serviceDestTable, serviceTableCookie, extraActions);
MDSALUtil.syncWrite(this.dataBroker, LogicalDatastoreType.CONFIGURATION, id, boundServices);
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:20,代码来源:GeniusProvider.java
示例13: createIngressClassifierFilterChainEgressFlow
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
@Test
public void createIngressClassifierFilterChainEgressFlow() {
Flow flow = openflowProvider.createIngressClassifierFilterChainEgressFlow(nodeId, NSP, EGRESS_NSI);
assertEquals(flow.getTableId().shortValue(), NwConstants.INGRESS_SFC_CLASSIFIER_FILTER_TABLE);
assertEquals(flow.getPriority().intValue(), OpenFlow13Provider.INGRESS_CLASSIFIER_FILTER_CHAIN_EGRESS_PRIORITY);
assertEquals(flow.getId().getValue(),
OpenFlow13Provider.INGRESS_CLASSIFIER_FILTER_NSH_CHAIN_EGRESS_FLOW_NAME
+ nodeId.getValue() + "_" + NSP);
assertEquals(flow.getCookie().getValue(), OpenFlow13Provider.INGRESS_CLASSIFIER_FILTER_COOKIE);
checkMatchNsp(flow.getMatch(), NSP);
checkMatchNsi(flow.getMatch(), EGRESS_NSI);
assertEquals(1, flow.getInstructions().getInstruction().size());
Instruction curInstruction = flow.getInstructions().getInstruction().get(0).getInstruction();
List<Action> actionList = checkApplyActionSize(curInstruction, 3);
checkActionMoveNsc4(actionList.get(0), true);
checkActionMoveTunReg(actionList.get(0), NxmNxReg6.class, false);
checkActionPopNsh(actionList.get(1));
checkActionResubmit(curInstruction, NwConstants.EGRESS_LPORT_DISPATCHER_TABLE);
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:23,代码来源:OpenFlow13ProviderTest.java
示例14: createEgressClassifierFilterNshFlow
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
@Test
public void createEgressClassifierFilterNshFlow() {
Flow flow = openflowProvider.createEgressClassifierFilterNshFlow(nodeId);
assertEquals(flow.getTableId().shortValue(), NwConstants.EGRESS_SFC_CLASSIFIER_FILTER_TABLE);
assertEquals(flow.getPriority().intValue(), OpenFlow13Provider.EGRESS_CLASSIFIER_FILTER_NSH_PRIORITY);
assertEquals(flow.getId().getValue(),
OpenFlow13Provider.EGRESS_CLASSIFIER_FILTER_NSH_FLOW_NAME + nodeId.getValue());
assertEquals(flow.getCookie().getValue(), OpenFlow13Provider.EGRESS_CLASSIFIER_FILTER_COOKIE);
checkMatchNshMdType1(flow.getMatch());
assertEquals(2, flow.getInstructions().getInstruction().size());
List<Action> actionList;
actionList = checkApplyActionSize(flow.getInstructions().getInstruction().get(0).getInstruction(), 1);
checkActionLoadNshc1(actionList.get(0), OpenFlow13Provider.DEFAULT_NSH_CONTEXT_VALUE);
checkActionGotoTable(flow.getInstructions().getInstruction().get(1).getInstruction(),
NwConstants.EGRESS_SFC_CLASSIFIER_NEXTHOP_TABLE);
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:20,代码来源:OpenFlow13ProviderTest.java
示例15: createEgressClassifierTransportEgressRemoteFlow
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
@Test
public void createEgressClassifierTransportEgressRemoteFlow() {
Flow flow = openflowProvider.createEgressClassifierTransportEgressRemoteFlow(nodeId, NSP, OUT_PORT, SFF_IP_STR);
assertEquals(flow.getTableId().shortValue(), NwConstants.EGRESS_SFC_CLASSIFIER_EGRESS_TABLE);
assertEquals(flow.getPriority().intValue(), OpenFlow13Provider.EGRESS_CLASSIFIER_EGRESS_REMOTE_PRIORITY);
assertEquals(flow.getId().getValue(),
OpenFlow13Provider.EGRESS_CLASSIFIER_TPORTEGRESS_FLOW_NAME + nodeId.getValue() + "_" + NSP);
assertEquals(flow.getCookie().getValue(), OpenFlow13Provider.EGRESS_CLASSIFIER_TPORTEGRESS_COOKIE);
checkMatchNsp(flow.getMatch(), NSP);
assertEquals(1, flow.getInstructions().getInstruction().size());
List<Action> actionList = checkApplyActionSize(
flow.getInstructions().getInstruction().get(0).getInstruction(), 2);
checkActionLoadTunIpv4(actionList.get(0), SFF_IP_STR);
checkActionOutport(actionList.get(1), "output:" + OUT_PORT);
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:19,代码来源:OpenFlow13ProviderTest.java
示例16: getBoundServicesForVpnInterface
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
static BoundServices getBoundServicesForVpnInterface(DataBroker broker, String vpnName, String interfaceName) {
List<Instruction> instructions = new ArrayList<>();
int instructionKey = 0;
final long vpnId = VpnUtil.getVpnId(broker, vpnName);
List<Action> actions = Collections.singletonList(
new ActionRegLoad(0, VpnConstants.VPN_REG_ID, 0, VpnConstants.VPN_ID_LENGTH, vpnId).buildAction());
instructions.add(MDSALUtil.buildApplyActionsInstruction(actions, ++instructionKey));
instructions.add(
MDSALUtil.buildAndGetWriteMetadaInstruction(MetaDataUtil.getVpnIdMetadata(vpnId),
MetaDataUtil.METADATA_MASK_VRFID, ++instructionKey));
instructions.add(MDSALUtil.buildAndGetGotoTableInstruction(NwConstants.L3_GW_MAC_TABLE,
++instructionKey));
BoundServices serviceInfo = InterfaceUtils.getBoundServices(
String.format("%s.%s.%s", "vpn", vpnName, interfaceName),
ServiceIndex.getIndex(NwConstants.L3VPN_SERVICE_NAME, NwConstants.L3VPN_SERVICE_INDEX),
VpnConstants.DEFAULT_FLOW_PRIORITY, NwConstants.COOKIE_VM_INGRESS_TABLE, instructions);
return serviceInfo;
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:19,代码来源:VpnUtil.java
示例17: getEgressAction
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
private List<Action> getEgressAction(String interfaceName, BigInteger tunnelId) {
List<Action> actions = null;
try {
GetEgressActionsForInterfaceInputBuilder egressAction =
new GetEgressActionsForInterfaceInputBuilder().setIntfName(interfaceName);
if (tunnelId != null) {
egressAction.setTunnelKey(tunnelId.longValue());
}
Future<RpcResult<GetEgressActionsForInterfaceOutput>> result =
interfaceManagerRpc.getEgressActionsForInterface(egressAction.build());
RpcResult<GetEgressActionsForInterfaceOutput> rpcResult = result.get();
if (!rpcResult.isSuccessful()) {
LOG.warn("RPC Call to Get egress actions for interface {} returned with Errors {}",
interfaceName, rpcResult.getErrors());
} else {
actions = rpcResult.getResult().getAction();
}
} catch (InterruptedException | ExecutionException e) {
LOG.warn("Exception when egress actions for interface {}", interfaceName, e);
}
return actions;
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:23,代码来源:DhcpPktHandler.java
示例18: setupStandardElanBroadcastGroups
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
public void setupStandardElanBroadcastGroups(ElanInstance elanInfo, DpnInterfaces dpnInterfaces, BigInteger dpnId) {
List<Bucket> listBucket = new ArrayList<>();
int bucketId = 0;
int actionKey = 0;
Long elanTag = elanInfo.getElanTag();
List<Action> listAction = new ArrayList<>();
listAction.add(new ActionGroup(ElanUtils.getElanLocalBCGId(elanTag)).buildAction(++actionKey));
listBucket.add(MDSALUtil.buildBucket(listAction, MDSALUtil.GROUP_WEIGHT, bucketId, MDSALUtil.WATCH_PORT,
MDSALUtil.WATCH_GROUP));
bucketId++;
List<Bucket> listBucketInfoRemote = getRemoteBCGroupBuckets(elanInfo, dpnInterfaces, dpnId, bucketId, elanTag);
listBucket.addAll(listBucketInfoRemote);
long groupId = ElanUtils.getElanRemoteBCGId(elanTag);
Group group = MDSALUtil.buildGroup(groupId, elanInfo.getElanInstanceName(), GroupTypes.GroupAll,
MDSALUtil.buildBucketLists(listBucket));
LOG.trace("Installing the remote BroadCast Group:{}", group);
mdsalManager.syncInstallGroup(dpnId, group);
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:19,代码来源:ElanL2GatewayMulticastUtils.java
示例19: setupLeavesEtreeBroadcastGroups
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
public void setupLeavesEtreeBroadcastGroups(ElanInstance elanInfo, DpnInterfaces dpnInterfaces, BigInteger dpnId) {
EtreeInstance etreeInstance = elanInfo.getAugmentation(EtreeInstance.class);
if (etreeInstance != null) {
long etreeLeafTag = etreeInstance.getEtreeLeafTagVal().getValue();
List<Bucket> listBucket = new ArrayList<>();
int bucketId = 0;
int actionKey = 0;
List<Action> listAction = new ArrayList<>();
listAction.add(new ActionGroup(ElanUtils.getEtreeLeafLocalBCGId(etreeLeafTag)).buildAction(++actionKey));
listBucket.add(MDSALUtil.buildBucket(listAction, MDSALUtil.GROUP_WEIGHT, bucketId, MDSALUtil.WATCH_PORT,
MDSALUtil.WATCH_GROUP));
bucketId++;
List<Bucket> listBucketInfoRemote = getRemoteBCGroupBuckets(elanInfo, dpnInterfaces, dpnId, bucketId,
etreeLeafTag);
listBucket.addAll(listBucketInfoRemote);
long groupId = ElanUtils.getEtreeLeafRemoteBCGId(etreeLeafTag);
Group group = MDSALUtil.buildGroup(groupId, elanInfo.getElanInstanceName(), GroupTypes.GroupAll,
MDSALUtil.buildBucketLists(listBucket));
LOG.trace("Installing the remote BroadCast Group:{}", group);
mdsalManager.syncInstallGroup(dpnId, group);
}
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:23,代码来源:ElanL2GatewayMulticastUtils.java
示例20: getRemoteBCGroupExternalPortBuckets
import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action; //导入依赖的package包/类
private List<Bucket> getRemoteBCGroupExternalPortBuckets(ElanDpnInterfacesList elanDpns,
DpnInterfaces dpnInterfaces, BigInteger dpnId, int bucketId) {
DpnInterfaces currDpnInterfaces = dpnInterfaces != null ? dpnInterfaces : getDpnInterfaces(elanDpns, dpnId);
if (currDpnInterfaces == null || !elanUtils.isDpnPresent(currDpnInterfaces.getDpId())
|| currDpnInterfaces.getInterfaces() == null || currDpnInterfaces.getInterfaces().isEmpty()) {
return Collections.emptyList();
}
List<Bucket> listBucketInfo = new ArrayList<>();
for (String interfaceName : currDpnInterfaces.getInterfaces()) {
if (interfaceManager.isExternalInterface(interfaceName)) {
List<Action> listActionInfo = elanItmUtils.getExternalPortItmEgressAction(interfaceName);
if (!listActionInfo.isEmpty()) {
listBucketInfo.add(MDSALUtil.buildBucket(listActionInfo, MDSALUtil.GROUP_WEIGHT, bucketId,
MDSALUtil.WATCH_PORT, MDSALUtil.WATCH_GROUP));
bucketId++;
}
}
}
return listBucketInfo;
}
开发者ID:opendaylight,项目名称:netvirt,代码行数:21,代码来源:ElanL2GatewayMulticastUtils.java
注:本文中的org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论