本文整理汇总了Java中org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation.getOptions方法的典型用法代码示例。如果您正苦于以下问题:Java OvsdbTerminationPointAugmentation.getOptions方法的具体用法?Java OvsdbTerminationPointAugmentation.getOptions怎么用?Java OvsdbTerminationPointAugmentation.getOptions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation
的用法示例。
在下文中一共展示了OvsdbTerminationPointAugmentation.getOptions方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getEgressVxlanPortForNode
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation; //导入方法依赖的package包/类
public Optional<Long> getEgressVxlanPortForNode(BigInteger dpnId) {
List<OvsdbTerminationPointAugmentation> tpList = interfaceMgr.getTunnelPortsOnBridge(dpnId);
if (tpList == null) {
// Most likely the bridge doesnt exist for this dpnId
LOG.warn("getEgressVxlanPortForNode Tunnel Port TerminationPoint list not available for dpnId [{}]",
dpnId);
return Optional.empty();
}
for (OvsdbTerminationPointAugmentation tp : tpList) {
if (tp == null) {
// Technically we should never have a list with NULL entries, but
// in a preliminary version of interfaceMgr.getTunnelPortsOnBridge()
// we were getting a list where all termination point entries were
// null. Leaving this check for now for protection.
LOG.error("getEgressVxlanPortForNode received a NULL termination point from tpList on dpnId [{}]",
dpnId);
continue;
}
Class<? extends InterfaceTypeBase> ifType = tp.getInterfaceType();
if (ifType.equals(InterfaceTypeVxlan.class)) {
List<Options> tpOptions = tp.getOptions();
for (Options tpOption : tpOptions) {
// From the VXLAN Tunnels, we want the one with the GPE option set
if (tpOption.getKey().getOption().equals(OPTION_KEY_EXTS)) {
if (tpOption.getValue().equals(OPTION_VALUE_EXTS_GPE)) {
return Optional.ofNullable(tp.getOfport());
}
}
}
}
}
LOG.warn("getEgressVxlanPortForNode no Vxgpe tunnel ports available for dpnId [{}]", dpnId);
return Optional.empty();
}
示例2: createInterfaceOptions
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation; //导入方法依赖的package包/类
private void createInterfaceOptions(
final OvsdbTerminationPointAugmentation terminationPoint,
final Interface ovsInterface) {
//Configure optional input
if (terminationPoint.getOptions() != null) {
try {
ovsInterface.setOptions(YangUtils.convertYangKeyValueListToMap(terminationPoint.getOptions(),
Options::getOption, Options::getValue));
} catch (NullPointerException e) {
LOG.warn("Incomplete OVSDB interface options", e);
}
}
}
示例3: updateInterfaceOptions
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation; //导入方法依赖的package包/类
private void updateInterfaceOptions(
final OvsdbTerminationPointAugmentation terminationPoint,
final Interface ovsInterface) {
//Configure optional input
if (terminationPoint.getOptions() != null) {
try {
ovsInterface.setOptions(YangUtils.convertYangKeyValueListToMap(terminationPoint.getOptions(),
Options::getOption, Options::getValue));
} catch (NullPointerException e) {
LOG.warn("Incomplete OVSDB interface options", e);
}
}
}
示例4: readValues
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation; //导入方法依赖的package包/类
@Override
public List<Options> readValues(OvsdbTerminationPointAugmentation augmentation) {
return augmentation.getOptions();
}