return false; if (!Objects.equals(_serialNumber, other.getSerialNumber())) { return false;
private void checkOFMatch(final InstanceIdentifier<Node> path, Node node, FlowCapableNode flowCapableNode, List<DeviceTypeInfo> dtiInfoList ){ if (flowCapableNode != null) { String hardware = flowCapableNode.getHardware(); String manufacturer = flowCapableNode.getManufacturer(); String serialNumber = flowCapableNode.getSerialNumber(); String software = flowCapableNode.getSoftware(); LOG.debug("Node '{}' is FlowCapable (\"{}\", \"{}\", \"{}\", \"{}\")", node.getId().getValue(), hardware, manufacturer, serialNumber, software); // TODO: is there a more efficient way to do this? for(DeviceTypeInfo dti: dtiInfoList) { // if the manufacturer matches and there is a h/w match if (manufacturer != null && (manufacturer.equals(dti.getOpenflowManufacturer()))) { List<String> hardwareValues = dti.getOpenflowHardware(); if(hardwareValues != null && hardwareValues.contains(hardware)) { setDeviceType(dti.getDeviceType(), path); return; } } } } }
private NodeDescription toNodeDescription(final NodeRef nodeRef) { final FlowCapableNode capableNode = this.readOperFlowCapableNode(nodeRef); if (capableNode == null) { return null; } final NodeDescription it = new NodeDescription(); it.setManufacturer(capableNode.getManufacturer()); it.setSerialNumber(capableNode.getSerialNumber()); it.setSoftware(capableNode.getSoftware()); it.setDescription(capableNode.getDescription()); return it; }
public FlowCapableNodeBuilder(FlowCapableNode base) { this._description = base.getDescription(); this._group = base.getGroup(); this._hardware = base.getHardware(); this._ipAddress = base.getIpAddress(); this._manufacturer = base.getManufacturer(); this._meter = base.getMeter(); this._portNumber = base.getPortNumber(); this._serialNumber = base.getSerialNumber(); this._software = base.getSoftware(); this._staleGroup = base.getStaleGroup(); this._staleMeter = base.getStaleMeter(); this._supportedActions = base.getSupportedActions(); this._supportedInstructions = base.getSupportedInstructions(); this._supportedMatchTypes = base.getSupportedMatchTypes(); this._switchFeatures = base.getSwitchFeatures(); this._table = base.getTable(); this._tableFeatures = base.getTableFeatures(); }