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


Java OFDescriptionStatistics.getHardwareDescription方法代码示例

本文整理汇总了Java中org.openflow.protocol.statistics.OFDescriptionStatistics.getHardwareDescription方法的典型用法代码示例。如果您正苦于以下问题:Java OFDescriptionStatistics.getHardwareDescription方法的具体用法?Java OFDescriptionStatistics.getHardwareDescription怎么用?Java OFDescriptionStatistics.getHardwareDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.openflow.protocol.statistics.OFDescriptionStatistics的用法示例。


在下文中一共展示了OFDescriptionStatistics.getHardwareDescription方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: SwitchSyncRepresentation

import org.openflow.protocol.statistics.OFDescriptionStatistics; //导入方法依赖的package包/类
public SwitchSyncRepresentation(OFFeaturesReply fr,
                                OFDescriptionStatistics d) {
    this.dpid = fr.getDatapathId();
    this.buffers = fr.getBuffers();
    this.tables = fr.getTables();
    this.capabilities = fr.getCapabilities();
    this.actions = fr.getActions();
    this.ports = toSyncedPortList(
            ImmutablePort.immutablePortListOf(fr.getPorts()));

    this.manufacturerDescription = d.getManufacturerDescription();
    this.hardwareDescription = d.getHardwareDescription();
    this.softwareDescription = d.getSoftwareDescription();
    this.serialNumber = d.getSerialNumber();
    this.datapathDescription = d.getDatapathDescription();
}
 
开发者ID:JianqingJiang,项目名称:QoS-floodlight,代码行数:17,代码来源:SwitchSyncRepresentation.java

示例2: getOFSwitchImpl

import org.openflow.protocol.statistics.OFDescriptionStatistics; //导入方法依赖的package包/类
@Override
public IOFSwitch getOFSwitchImpl(String regis_desc,
        OFDescriptionStatistics description) {
    // If testing bind order, just record registered desc string
    if (test_bind_order) {
        if (bind_order == null) {
            bind_order = new ArrayList<String>();
        }
        bind_order.add(regis_desc);
        return null;
    }
    String hw_desc = description.getHardwareDescription();
    if (hw_desc.equals("version 1.1")) {
        return new Test11SwitchClass();
    }
    if (hw_desc.equals("version 1.0")) {
        return new TestSwitchClass();
    }
    return null;
}
 
开发者ID:opendaylight,项目名称:archived-net-virt-platform,代码行数:21,代码来源:ControllerTest.java

示例3: getOFSwitchImpl

import org.openflow.protocol.statistics.OFDescriptionStatistics; //导入方法依赖的package包/类
@Override
public IOFSwitch getOFSwitchImpl(String regis_desc,
                                 OFDescriptionStatistics description) {
    String model = description.getDatapathDescription();
 
    if (regis_desc.startsWith("big switch networks")) {
        // BigTest Mininet, avoid OVS optimization
        if (model.startsWith("bigtest")) {
            return new BetterOFSwitchImpl();
        }
    }
    if (regis_desc.equals("Big Switch Networks")) {
        if (description.getHardwareDescription().startsWith("Open vSwitch")) {
            return new BetterOFSwitchBSNOVS();
        } else if (description.getHardwareDescription().startsWith("Xenon")) {
            return new BetterOFSwitchXenon();
        }
    }
    if (regis_desc.equals("")) {
        String vendor = description.getManufacturerDescription();
        String make = description.getHardwareDescription();
        // Production OVS, optimize topology probing
        if (vendor.startsWith("Nicira") &&
                make.startsWith("Open vSwitch")) {
            return new BetterOFSwitchOVS();
        }
        return new BetterOFSwitchImpl();
    }
    log.warn("Unknown model registered: " + regis_desc);
    return null;
}
 
开发者ID:opendaylight,项目名称:archived-net-virt-platform,代码行数:32,代码来源:BetterDriverManager.java


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