• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Flow类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow的典型用法代码示例。如果您正苦于以下问题:Java Flow类的具体用法?Java Flow怎么用?Java Flow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Flow类属于org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table包,在下文中一共展示了Flow类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: makeLFibTableEntry

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的package包/类
private void makeLFibTableEntry(BigInteger dpId, long serviceId, short tableId, WriteTransaction writeFlowInvTx) {
    List<MatchInfo> matches = new ArrayList<>();
    matches.add(MatchEthernetType.MPLS_UNICAST);
    matches.add(new MatchMplsLabel(serviceId));

    List<Instruction> instructions = new ArrayList<>();
    List<ActionInfo> actionsInfos = new ArrayList<>();
    actionsInfos.add(new ActionPopMpls());
    Instruction writeInstruction = new InstructionApplyActions(actionsInfos).buildInstruction(0);
    instructions.add(writeInstruction);
    instructions.add(new InstructionGotoTable(tableId).buildInstruction(1));

    // Install the flow entry in L3_LFIB_TABLE
    String flowRef = getFlowRef(dpId, NwConstants.L3_LFIB_TABLE, serviceId, "");

    Flow flowEntity = MDSALUtil.buildFlowNew(NwConstants.L3_LFIB_TABLE, flowRef,
        10, flowRef, 0, 0,
        COOKIE_VM_LFIB_TABLE, matches, instructions);

    mdsalManager.addFlowToTx(dpId, flowEntity, writeFlowInvTx);

    LOG.debug("makeLFibTableEntry : LFIB Entry for dpID {} : label : {} modified successfully", dpId, serviceId);
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:24,代码来源:ExternalRoutersListener.java


示例2: removeLFibTableEntry

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的package包/类
private void removeLFibTableEntry(BigInteger dpnId, long serviceId, WriteTransaction writeFlowInvTx) {
    List<MatchInfo> matches = new ArrayList<>();
    matches.add(MatchEthernetType.MPLS_UNICAST);
    matches.add(new MatchMplsLabel(serviceId));

    String flowRef = getFlowRef(dpnId, NwConstants.L3_LFIB_TABLE, serviceId, "");

    LOG.debug("removeLFibTableEntry : with flow ref {}", flowRef);

    Flow flowEntity = MDSALUtil.buildFlowNew(NwConstants.L3_LFIB_TABLE, flowRef,
        10, flowRef, 0, 0,
        COOKIE_VM_LFIB_TABLE, matches, null);

    mdsalManager.removeFlowToTx(dpnId, flowEntity, writeFlowInvTx);

    LOG.debug("removeLFibTableEntry : dpID : {} label : {} removed successfully", dpnId, serviceId);
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:18,代码来源:ExternalRoutersListener.java


示例3: makeL3GwMacTableEntry

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的package包/类
static void makeL3GwMacTableEntry(final BigInteger dpnId, final long vpnId, String macAddress,
                                  List<Instruction> customInstructions, IMdsalApiManager mdsalManager,
                                  WriteTransaction writeFlowTx) {
    List<MatchInfo> matchInfo = new ArrayList<>();
    matchInfo.add(new MatchMetadata(MetaDataUtil.getVpnIdMetadata(vpnId), MetaDataUtil.METADATA_MASK_VRFID));
    matchInfo.add(new MatchEthernetDestination(new MacAddress(macAddress)));
    LOG.debug("makeL3GwMacTableEntry : Create flow table {} -> table {} for External Vpn Id = {} "
            + "and MacAddress = {} on DpnId = {}",
            NwConstants.L3_GW_MAC_TABLE, NwConstants.INBOUND_NAPT_TABLE, vpnId, macAddress, dpnId);
    // Install the flow entry in L3_GW_MAC_TABLE
    String flowRef = NatUtil.getFlowRef(dpnId, NwConstants.L3_GW_MAC_TABLE, vpnId, macAddress);
    Flow l3GwMacTableFlowEntity = MDSALUtil.buildFlowNew(NwConstants.L3_GW_MAC_TABLE,
            flowRef, 21, flowRef, 0, 0, NwConstants.COOKIE_L3_GW_MAC_TABLE, matchInfo, customInstructions);

    mdsalManager.addFlowToTx(dpnId, l3GwMacTableFlowEntity, writeFlowTx);
    LOG.debug("makeL3GwMacTableEntry : Successfully created flow entity {} on DPN = {}",
            l3GwMacTableFlowEntity, dpnId);
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:19,代码来源:NatEvpnUtil.java


示例4: removeL3GwMacTableEntry

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的package包/类
static void removeL3GwMacTableEntry(final BigInteger dpnId, final long vpnId, final String macAddress,
                                    IMdsalApiManager mdsalManager, WriteTransaction removeFlowInvTx) {
    List<MatchInfo> matchInfo = new ArrayList<>();
    matchInfo.add(new MatchMetadata(MetaDataUtil.getVpnIdMetadata(vpnId), MetaDataUtil.METADATA_MASK_VRFID));
    matchInfo.add(new MatchEthernetSource(new MacAddress(macAddress)));
    LOG.debug("removeL3GwMacTableEntry : Remove flow table {} -> table {} for External Vpn Id = {} "
            + "and MacAddress = {} on DpnId = {}",
            NwConstants.L3_GW_MAC_TABLE, NwConstants.INBOUND_NAPT_TABLE, vpnId, macAddress, dpnId);
    // Remove the flow entry in L3_GW_MAC_TABLE
    String flowRef = NatUtil.getFlowRef(dpnId, NwConstants.L3_GW_MAC_TABLE, vpnId, macAddress);
    Flow l3GwMacTableFlowEntity = MDSALUtil.buildFlowNew(NwConstants.L3_GW_MAC_TABLE,
            flowRef, 21, flowRef, 0, 0, NwConstants.COOKIE_L3_GW_MAC_TABLE, matchInfo, null);

    mdsalManager.removeFlowToTx(dpnId, l3GwMacTableFlowEntity, removeFlowInvTx);
    LOG.debug("removeL3GwMacTableEntry : Successfully removed flow entity {} on DPN = {}",
            l3GwMacTableFlowEntity, dpnId);
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:18,代码来源:NatEvpnUtil.java


示例5: makePreDnatToSnatTableEntry

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的package包/类
public static void makePreDnatToSnatTableEntry(IMdsalApiManager mdsalManager, BigInteger naptDpnId,
        short tableId, WriteTransaction writeFlowTx) {
    LOG.debug("makePreDnatToSnatTableEntry : Create Pre-DNAT table {} --> table {} flow on NAPT DpnId {} ",
            NwConstants.PDNAT_TABLE, tableId, naptDpnId);

    List<Instruction> preDnatToSnatInstructions = new ArrayList<>();
    preDnatToSnatInstructions.add(new InstructionGotoTable(tableId).buildInstruction(0));
    List<MatchInfo> matches = new ArrayList<>();
    matches.add(MatchEthernetType.IPV4);
    String flowRef = getFlowRefPreDnatToSnat(naptDpnId, NwConstants.PDNAT_TABLE, "PreDNATToSNAT");
    Flow preDnatToSnatTableFlowEntity = MDSALUtil.buildFlowNew(NwConstants.PDNAT_TABLE,flowRef,
            5, flowRef, 0, 0,  NwConstants.COOKIE_DNAT_TABLE,
            matches, preDnatToSnatInstructions);

    mdsalManager.addFlowToTx(naptDpnId, preDnatToSnatTableFlowEntity, writeFlowTx);
    LOG.debug("makePreDnatToSnatTableEntry : Successfully installed Pre-DNAT flow {} on NAPT DpnId {} ",
            preDnatToSnatTableFlowEntity,  naptDpnId);
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:19,代码来源:NatUtil.java


示例6: makeTunnelTableEntry

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的package包/类
private void makeTunnelTableEntry(String vpnName, BigInteger dpnId, long serviceId,
        List<Instruction> customInstructions, WriteTransaction writeFlowInvTx, ProviderTypes provType) {
    List<MatchInfo> mkMatches = new ArrayList<>();

    LOG.info("makeTunnelTableEntry on DpnId = {} and serviceId = {}", dpnId, serviceId);
    int flowPriority = 5;
    // Increased the 36->25 flow priority. If SNAT is also configured on the same
    // DPN, then the traffic will be hijacked to DNAT and if there are no DNAT match,
    // then handled back to using using flow 25->44(which will be installed as part of SNAT)
    if (NatUtil.isOpenStackVniSemanticsEnforcedForGreAndVxlan(elanService, provType)) {
        mkMatches.add(new MatchTunnelId(NatOverVxlanUtil.getInternetVpnVni(idManager, vpnName, serviceId)));
        flowPriority = 6;
    } else {
        mkMatches.add(new MatchTunnelId(BigInteger.valueOf(serviceId)));
    }

    Flow terminatingServiceTableFlowEntity = MDSALUtil.buildFlowNew(NwConstants.INTERNAL_TUNNEL_TABLE,
        getFlowRef(dpnId, NwConstants.INTERNAL_TUNNEL_TABLE, serviceId, ""), flowPriority,
        String.format("%s:%d", "TST Flow Entry ", serviceId),
        0, 0, COOKIE_TUNNEL.add(BigInteger.valueOf(serviceId)), mkMatches, customInstructions);

    mdsalManager.addFlowToTx(dpnId, terminatingServiceTableFlowEntity, writeFlowInvTx);
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:24,代码来源:VpnFloatingIpHandler.java


示例7: makeLFibTableEntry

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的package包/类
private void makeLFibTableEntry(BigInteger dpId, long serviceId, String floatingIpPortMacAddress, short tableId,
                                WriteTransaction writeFlowInvTx) {
    List<MatchInfo> matches = new ArrayList<>();
    matches.add(MatchEthernetType.MPLS_UNICAST);
    matches.add(new MatchMplsLabel(serviceId));

    List<Instruction> instructions = new ArrayList<>();
    List<ActionInfo> actionsInfos = new ArrayList<>();
    actionsInfos.add(new ActionPopMpls());
    actionsInfos.add(new ActionSetFieldEthernetDestination(new MacAddress(floatingIpPortMacAddress)));
    Instruction writeInstruction = new InstructionApplyActions(actionsInfos).buildInstruction(0);
    instructions.add(writeInstruction);
    instructions.add(new InstructionGotoTable(tableId).buildInstruction(1));

    // Install the flow entry in L3_LFIB_TABLE
    String flowRef = getFlowRef(dpId, NwConstants.L3_LFIB_TABLE, serviceId, "");

    Flow flowEntity = MDSALUtil.buildFlowNew(NwConstants.L3_LFIB_TABLE, flowRef,
        10, flowRef, 0, 0,
        NwConstants.COOKIE_VM_LFIB_TABLE, matches, instructions);

    mdsalManager.addFlowToTx(dpId, flowEntity, writeFlowInvTx);

    LOG.debug("makeLFibTableEntry : LFIB Entry for dpID {} : label : {} modified successfully {}", dpId, serviceId);
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:26,代码来源:VpnFloatingIpHandler.java


示例8: removeLFibTableEntry

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的package包/类
private void removeLFibTableEntry(BigInteger dpnId, long serviceId, WriteTransaction removeFlowInvTx) {
    List<MatchInfo> matches = new ArrayList<>();
    matches.add(MatchEthernetType.MPLS_UNICAST);
    matches.add(new MatchMplsLabel(serviceId));

    String flowRef = getFlowRef(dpnId, NwConstants.L3_LFIB_TABLE, serviceId, "");

    LOG.debug("removeLFibTableEntry : removing LFib entry with flow ref {}", flowRef);

    Flow flowEntity = MDSALUtil.buildFlowNew(NwConstants.L3_LFIB_TABLE, flowRef,
        10, flowRef, 0, 0,
        NwConstants.COOKIE_VM_LFIB_TABLE, matches, null);

    mdsalManager.removeFlowToTx(dpnId, flowEntity, removeFlowInvTx);

    LOG.debug("removeLFibTableEntry : LFIB Entry for dpID : {} label : {} removed successfully",
            dpnId, serviceId);
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:19,代码来源:VpnFloatingIpHandler.java


示例9: matches

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的package包/类
@Override
public boolean matches(Object actualFlow) {
    if (! (actualFlow instanceof Flow)) {
        return false;
    }
    Flow flow = (Flow) actualFlow;

    boolean result =
            flow.getId() != null && flow.getId().equals(expectedFlow.getId())
            && Objects.equals(flow.getTableId(), expectedFlow.getTableId())
            && StringUtils.equals(flow.getFlowName(), expectedFlow.getFlowName())
            && sameInstructions(flow.getInstructions(), expectedFlow.getInstructions())
            && sameMatch(flow.getMatch(), expectedFlow.getMatch());

    return result;
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:17,代码来源:FlowMatcher.java


示例10: removeTunnelTableEntry

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的package包/类
private void removeTunnelTableEntry(BigInteger dpId, long label, WriteTransaction tx) {
    FlowEntity flowEntity;
    LOG.debug("remove terminatingServiceActions called with DpnId = {} and label = {}", dpId, label);
    List<MatchInfo> mkMatches = new ArrayList<>();
    // Matching metadata
    mkMatches.add(new MatchTunnelId(BigInteger.valueOf(label)));
    flowEntity = MDSALUtil.buildFlowEntity(dpId,
        NwConstants.INTERNAL_TUNNEL_TABLE,
        getTableMissFlowRef(dpId, NwConstants.INTERNAL_TUNNEL_TABLE, (int) label),
        5, String.format("%s:%d", "TST Flow Entry ", label), 0, 0,
        COOKIE_TUNNEL.add(BigInteger.valueOf(label)), mkMatches, null);
    Node nodeDpn = FibUtil.buildDpnNode(flowEntity.getDpnId());
    FlowKey flowKey = new FlowKey(new FlowId(flowEntity.getFlowId()));
    InstanceIdentifier<Flow> flowInstanceId = InstanceIdentifier.builder(Nodes.class)
        .child(Node.class, nodeDpn.getKey()).augmentation(FlowCapableNode.class)
        .child(Table.class, new TableKey(flowEntity.getTableId())).child(Flow.class, flowKey).build();

    tx.delete(LogicalDatastoreType.CONFIGURATION, flowInstanceId);
    LOG.debug("Terminating service Entry for dpID {} : label : {} removed successfully", dpId, label);
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:21,代码来源:VrfEntryListener.java


示例11: createIngressClassifierSfcTunnelTrafficCaptureFlow

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的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


示例12: createIngressClassifierFilterEthNshFlow

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的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


示例13: createIngressClassifierFilterChainEgressFlow

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的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


示例14: createIngressClassifierAclFlow

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的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


示例15: createIngressClassifierAclNoMatchFlow

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的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


示例16: createEgressClassifierNextHopNoC1C2Flow

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的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


示例17: createEgressClassifierTransportEgressRemoteFlow

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的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


示例18: renderNode

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的package包/类
@Override
// FindBugs reports "Useless object stored in variable flows" however it doesn't recognize the usage of forEach.
@SuppressFBWarnings("UC_USELESS_OBJECT")
public void renderNode(NodeId nodeId) {
    List<Flow> flows = new ArrayList<>();
    flows.add(this.openFlow13Provider.createIngressClassifierFilterVxgpeNshFlow(nodeId));
    flows.add(this.openFlow13Provider.createIngressClassifierFilterEthNshFlow(nodeId));
    flows.add(this.openFlow13Provider.createIngressClassifierFilterNoNshFlow(nodeId));
    flows.add(this.openFlow13Provider.createIngressClassifierAclNoMatchFlow(nodeId));

    flows.add(this.openFlow13Provider.createIngressClassifierSfcTunnelTrafficCaptureFlow(nodeId));

    flows.add(this.openFlow13Provider.createEgressClassifierFilterNshFlow(nodeId));
    flows.add(this.openFlow13Provider.createEgressClassifierFilterNoNshFlow(nodeId));

    flows.add(this.openFlow13Provider.createEgressClassifierNextHopC1C2Flow(nodeId));
    flows.add(this.openFlow13Provider.createEgressClassifierNextHopNoC1C2Flow(nodeId));

    WriteTransaction tx = this.dataBroker.newWriteOnlyTransaction();
    flows.forEach(flow -> this.openFlow13Provider.appendFlowForCreate(nodeId, flow, tx));
    tx.submit();
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:23,代码来源:OpenflowRenderer.java


示例19: suppressNode

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的package包/类
@Override
// FindBugs reports "Useless object stored in variable flows" however it doesn't recognize the usage of forEach.
@SuppressFBWarnings("UC_USELESS_OBJECT")
public void suppressNode(NodeId nodeId) {
    List<Flow> flows = new ArrayList<>();
    flows.add(this.openFlow13Provider.createIngressClassifierFilterVxgpeNshFlow(nodeId));
    flows.add(this.openFlow13Provider.createIngressClassifierFilterEthNshFlow(nodeId));
    flows.add(this.openFlow13Provider.createIngressClassifierFilterNoNshFlow(nodeId));

    flows.add(this.openFlow13Provider.createEgressClassifierFilterNshFlow(nodeId));
    flows.add(this.openFlow13Provider.createEgressClassifierFilterNoNshFlow(nodeId));

    flows.add(this.openFlow13Provider.createEgressClassifierNextHopC1C2Flow(nodeId));
    flows.add(this.openFlow13Provider.createEgressClassifierNextHopNoC1C2Flow(nodeId));

    WriteTransaction tx = this.dataBroker.newWriteOnlyTransaction();
    flows.forEach(flow -> this.openFlow13Provider.appendFlowForDelete(nodeId, flow, tx));
    tx.submit();
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:20,代码来源:OpenflowRenderer.java


示例20: createIngressClassifierFilterEthNshFlow

import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; //导入依赖的package包/类
@Test
public void createIngressClassifierFilterEthNshFlow() {
    Flow flow = openflowProvider.createIngressClassifierFilterEthNshFlow(nodeId);

    assertEquals(flow.getTableId().shortValue(), NwConstants.INGRESS_SFC_CLASSIFIER_FILTER_TABLE);
    assertEquals(flow.getPriority().intValue(), OpenFlow13Provider.INGRESS_CLASSIFIER_FILTER_ETH_NSH_PRIORITY);
    assertEquals(flow.getId().getValue(),
            OpenFlow13Provider.INGRESS_CLASSIFIER_FILTER_ETHNSH_FLOW_NAME + nodeId.getValue());
    assertEquals(flow.getCookie().getValue(), OpenFlow13Provider.INGRESS_CLASSIFIER_FILTER_COOKIE);

    checkMatchEthNsh(flow.getMatch());
    checkMatchTunDstIp(flow.getMatch(), OpenFlow13Provider.NULL_IP);

    assertEquals(1, flow.getInstructions().getInstruction().size());
    checkActionResubmit(flow.getInstructions().getInstruction().get(0).getInstruction(),
            NwConstants.LPORT_DISPATCHER_TABLE);
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:18,代码来源:OpenFlow13ProviderTest.java



注:本文中的org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ListIterator类代码示例发布时间:2022-05-23
下一篇:
Java License类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap