本文整理汇总了Java中org.openflow.protocol.statistics.OFDescriptionStatistics.getSoftwareDescription方法的典型用法代码示例。如果您正苦于以下问题:Java OFDescriptionStatistics.getSoftwareDescription方法的具体用法?Java OFDescriptionStatistics.getSoftwareDescription怎么用?Java OFDescriptionStatistics.getSoftwareDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openflow.protocol.statistics.OFDescriptionStatistics
的用法示例。
在下文中一共展示了OFDescriptionStatistics.getSoftwareDescription方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例2: setSwitchProperties
import org.openflow.protocol.statistics.OFDescriptionStatistics; //导入方法依赖的package包/类
@JsonIgnore
@Override
public void setSwitchProperties(OFDescriptionStatistics description) {
setAttribute(IOFSwitch.SWITCH_DESCRIPTION_DATA,
description.getDatapathDescription());
// Supports Nicira role request
setAttribute(IOFSwitch.SWITCH_SUPPORTS_NX_ROLE, true);
setAttribute(IBetterOFSwitch.SUPPORTS_OVSDB_TUNNEL_SETUP, true);
SimpleVersion minVersion =
new SimpleVersion(MIN_VERSION_TTL_DECREMENT);
try {
SimpleVersion ovsVersion =
new SimpleVersion(description.getSoftwareDescription());
if (ovsVersion.compareTo(minVersion) >= 0) {
setAttribute(IBetterOFSwitch.SUPPORTS_NX_TTL_DECREMENT, true);
}
} catch (IllegalArgumentException e) {
// ignore. We didn't understand the version
if (log.isTraceEnabled()) {
log.trace("Could not parse version number for switch {} from" +
" SoftwareDescription {}", this, description);
}
removeAttribute(IBetterOFSwitch.SUPPORTS_NX_TTL_DECREMENT);
}
}