当前位置: 首页>>代码示例>>Java>>正文


Java OvsdbTerminationPointAugmentation.getOptions方法代码示例

本文整理汇总了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();
}
 
开发者ID:opendaylight,项目名称:netvirt,代码行数:39,代码来源:GeniusProvider.java

示例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);
        }
    }
}
 
开发者ID:opendaylight,项目名称:ovsdb,代码行数:15,代码来源:TerminationPointCreateCommand.java

示例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);
        }
    }
}
 
开发者ID:opendaylight,项目名称:ovsdb,代码行数:15,代码来源:TerminationPointUpdateCommand.java

示例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();
}
 
开发者ID:opendaylight,项目名称:ovsdb,代码行数:5,代码来源:SouthboundIT.java


注:本文中的org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.rev150105.OvsdbTerminationPointAugmentation.getOptions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。