• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java VlanMatchBuilder类的典型用法和代码示例

java 1次浏览

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

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

示例1: createVlanIdMatch

点赞 3

import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.VlanMatchBuilder; //导入依赖的package包/类
/**
 * Create Ethernet Destination Match
 *
 * @param matchBuilder
 *            MatchBuilder Object without a match yet
 * @param vlanId
 *            Integer representing a VLAN ID Integer representing a VLAN ID
 * @return matchBuilder Map MatchBuilder Object with a match
 */
public static MatchBuilder createVlanIdMatch(MatchBuilder matchBuilder, VlanId vlanId, boolean present) {
    VlanMatchBuilder vlanMatchBuilder = new VlanMatchBuilder();
    VlanIdBuilder vlanIdBuilder = new VlanIdBuilder();
    if (vlanId.getValue() != 0) vlanIdBuilder.setVlanId(new VlanId(vlanId));
    vlanIdBuilder.setVlanIdPresent(present);
    vlanMatchBuilder.setVlanId(vlanIdBuilder.build());


    //VlanPcp vp = new VlanPcp((short)3);
    //vlanMatchBuilder.setVlanPcp(vp);

    matchBuilder.setVlanMatch(vlanMatchBuilder.build());

    return matchBuilder;
}
 

开发者ID:opendaylight,
项目名称:faas,
代码行数:25,
代码来源:OfMatchUtils.java

示例2: createVlanIdMatch

点赞 3

import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.VlanMatchBuilder; //导入依赖的package包/类
/**
 * Create Ethernet Destination Match
 *
 * @param matchBuilder MatchBuilder Object without a match yet
 * @param vlanId       Integer representing a VLAN ID Integer representing a VLAN ID
 * @return matchBuilder Map MatchBuilder Object with a match
 */
public static MatchBuilder createVlanIdMatch(MatchBuilder matchBuilder, Integer vlanId, boolean present) {
    EthernetMatchBuilder eth = new EthernetMatchBuilder();
    EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
    ethTypeBuilder.setType(new EtherType(VLANTAGGED_LONG));
    eth.setEthernetType(ethTypeBuilder.build());
    matchBuilder.setEthernetMatch(eth.build());

    VlanMatchBuilder vlanMatchBuilder = new VlanMatchBuilder();
    VlanIdBuilder vlanIdBuilder = new VlanIdBuilder();
    vlanIdBuilder.setVlanId(new VlanId(vlanId));
    vlanIdBuilder.setVlanIdPresent(present);
    vlanMatchBuilder.setVlanId(vlanIdBuilder.build());
    matchBuilder.setVlanMatch(vlanMatchBuilder.build());

    return matchBuilder;
}
 

开发者ID:sdnhub,
项目名称:SDNHub_Opendaylight_Tutorial,
代码行数:24,
代码来源:MatchUtils.java

示例3: setVlanVidAction

点赞 2

import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.VlanMatchBuilder; //导入依赖的package包/类
public static Action setVlanVidAction(Integer vlanId) {
    VlanMatchBuilder vlanMatchBuilder = new VlanMatchBuilder();
    VlanIdBuilder vlanIdBuilder = new VlanIdBuilder();
    vlanIdBuilder.setVlanId(new VlanId(vlanId));
    vlanIdBuilder.setVlanIdPresent(true);
    vlanMatchBuilder.setVlanId(vlanIdBuilder.build());
    SetFieldBuilder setFieldBuilder = new SetFieldBuilder()
            .setVlanMatch((vlanMatchBuilder.build()));

    return new SetFieldCaseBuilder()
            .setSetField(setFieldBuilder.build())
            .build();
}
 

开发者ID:sdnhub,
项目名称:SDNHub_Opendaylight_Tutorial,
代码行数:14,
代码来源:ActionUtils.java

示例4: getVlanMatch

点赞 2

import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.VlanMatchBuilder; //导入依赖的package包/类
public static VlanMatch getVlanMatch(int vlanId) {
	return new VlanMatchBuilder().setVlanId(new VlanIdBuilder().setVlanId(
			new org.opendaylight.yang.gen.v1.urn.opendaylight.l2.types.rev130827.VlanId(Integer.valueOf(vlanId)))
			.setVlanIdPresent(true).build()).build();
}
 

开发者ID:onfsdn,
项目名称:atrium-odl,
代码行数:6,
代码来源:AtriumUtils.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)