本文整理汇总了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.InterfaceTypeGre类的典型用法代码示例。如果您正苦于以下问题:Java InterfaceTypeGre类的具体用法?Java InterfaceTypeGre怎么用?Java InterfaceTypeGre使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
InterfaceTypeGre类属于org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105包,在下文中一共展示了InterfaceTypeGre类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTunnelPortsOnBridge
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.InterfaceTypeGre; //导入依赖的package包/类
@Override
public List<OvsdbTerminationPointAugmentation> getTunnelPortsOnBridge(BigInteger dpnId) {
if (dpnId == GeniusProviderTestParams.DPN_ID_NO_EXIST) {
// Unfortunately, the getTunnelPortsOnBridge() method may return null
return null;
}
if (dpnId == GeniusProviderTestParams.DPN_ID_NO_PORTS) {
return Collections.emptyList();
}
OvsdbTerminationPointAugmentationBuilder tpAug = new OvsdbTerminationPointAugmentationBuilder();
tpAug.setOfport(GeniusProviderTestParams.OF_PORT);
if (dpnId == GeniusProviderTestParams.DPN_ID_NO_VXGPE_PORTS) {
// Tunnel Termination Point that is NOT of type VXGPE
tpAug.setInterfaceType(InterfaceTypeGre.class);
} else {
// Tunnel Termination Point that IS of type VXGPE
tpAug.setInterfaceType(InterfaceTypeVxlan.class);
}
List<Options> opsList = new ArrayList<>();
if (dpnId != GeniusProviderTestParams.DPN_ID_NO_OPTIONS) {
OptionsBuilder opsBuilder = new OptionsBuilder();
opsBuilder.setKey(new OptionsKey(GeniusProvider.OPTION_KEY_EXTS));
opsBuilder.setValue(GeniusProvider.OPTION_VALUE_EXTS_GPE);
opsList.add(opsBuilder.build());
}
tpAug.setOptions(opsList);
List<OvsdbTerminationPointAugmentation> tpAugList = new ArrayList<>();
tpAugList.add(tpAug.build());
return tpAugList;
}