public FlowCapableNodeUpdatedBuilder(FlowCapableNodeUpdated 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(); }
@Override public void onNodeUpdated(final NodeUpdated notification) { Preconditions.checkNotNull(notification); final FlowCapableNodeUpdated newFlowNode = notification.getAugmentation(FlowCapableNodeUpdated.class); if (newFlowNode != null && newFlowNode.getSwitchFeatures() != null) { final NodeRef nodeRef = notification.getNodeRef(); final InstanceIdentifier<?> nodeRefIdent = nodeRef.getValue(); final InstanceIdentifier<Node> nodeIdent = nodeRefIdent.firstIdentifierOf(Node.class); final InstanceIdentifier<SwitchFeatures> swichFeaturesIdent = nodeIdent.augmentation(FlowCapableNode.class).child(SwitchFeatures.class); final SwitchFeatures switchFeatures = newFlowNode.getSwitchFeatures(); connectFlowCapableNode(swichFeaturesIdent, switchFeatures, nodeIdent); } }
@Override public NodeUp createNotification(final FlowCapableNode object, final InstanceIdentifier<FlowCapableNode> ii) { Preconditions.checkArgument(object != null); Preconditions.checkArgument(ii != null); final FlowCapableNodeUpdatedBuilder flowNodeNotifBuilder = new FlowCapableNodeUpdatedBuilder(object); FlowCapableNodeUpdated flowCapableNodeUpdated = flowNodeNotifBuilder.build(); //TODO: Create a builder for NodeUp notification NodeUp nodeUpNotif = new NodeUpImpl(flowCapableNodeUpdated.getIpAddress(), IidFactory.getNodeId(ii)); LOG.info("NicNotification created for Node up: IP", nodeUpNotif.getIp()); return nodeUpNotif; }
@Override public void onNodeUpdated(final NodeUpdated notification) { Preconditions.checkNotNull(notification); final FlowCapableNodeUpdated newFlowNode = notification.getAugmentation(FlowCapableNodeUpdated.class); LOG.info("Received onNodeUpdated for node {} ", newFlowNode); if (newFlowNode != null && newFlowNode.getSwitchFeatures() != null) { final NodeRef nodeRef = notification.getNodeRef(); final InstanceIdentifier<?> nodeRefIdent = nodeRef.getValue(); final InstanceIdentifier<Node> nodeIdent = nodeRefIdent.firstIdentifierOf(Node.class); final InstanceIdentifier<SwitchFeatures> swichFeaturesIdent = nodeIdent.augmentation(FlowCapableNode.class).child(SwitchFeatures.class); final SwitchFeatures switchFeatures = newFlowNode.getSwitchFeatures(); connectFlowCapableNode(swichFeaturesIdent, switchFeatures, nodeIdent); //Send group/meter request to get addition details not present in switch feature response. NodeId nodeId = InstanceIdentifier.keyOf(nodeIdent).getId(); boolean ownershipState = preConfigurationCheck(nodeId); setNodeOwnership(nodeId, ownershipState); LOG.info("onNodeUpdated: Send group/meter feature request to the device {}",nodeIdent); manager.getRpcMsgManager().getGroupFeaturesStat(nodeRef); manager.getRpcMsgManager().getMeterFeaturesStat(nodeRef); } }
if (!Objects.equals(_description, other.getDescription())) { return false; if (!Objects.equals(_group, other.getGroup())) { return false; if (!Objects.equals(_hardware, other.getHardware())) { return false; if (!Objects.equals(_ipAddress, other.getIpAddress())) { return false; if (!Objects.equals(_manufacturer, other.getManufacturer())) { return false; if (!Objects.equals(_meter, other.getMeter())) { return false; if (!Objects.equals(_portNumber, other.getPortNumber())) { return false; if (!Objects.equals(_serialNumber, other.getSerialNumber())) { return false; if (!Objects.equals(_software, other.getSoftware())) { return false; if (!Objects.equals(_staleGroup, other.getStaleGroup())) { return false;