@Override public void onNodeUpdated(NodeUpdated notification) { LOG.debug("NodeUpdated Notification ..................."); LOG.debug("NodeRef " + notification.getNodeRef()); LOG.debug("----------------------------------------------------------------------"); nodeUpdated.add(notification); } }
public NodeUpdatedBuilder(NodeUpdated base) { this._id = base.getId(); this._nodeConnector = base.getNodeConnector(); this._nodeRef = base.getNodeRef(); if (base instanceof NodeUpdatedImpl) { NodeUpdatedImpl impl = (NodeUpdatedImpl) base; if (!impl.augmentation.isEmpty()) { this.augmentation = new HashMap<>(impl.augmentation); } } else if (base instanceof AugmentationHolder) { @SuppressWarnings("unchecked") Map<Class<? extends Augmentation<NodeUpdated>>, Augmentation<NodeUpdated>> aug =((AugmentationHolder<NodeUpdated>) base).augmentations(); if (!aug.isEmpty()) { this.augmentation = new HashMap<>(aug); } } }
public static HashSet<Property> toADNodeProperties(final NodeUpdated nu) { final FlowCapableNodeUpdated fcnu = nu.getAugmentation(FlowCapableNodeUpdated.class); if (fcnu != null) { HashSet<Property> adNodeProperties = toADNodeProperties(fcnu, nu.getId()); adNodeProperties.add(toADDescription(nu.getNodeRef())); return adNodeProperties; } return new HashSet<org.opendaylight.controller.sal.core.Property>(); }
return false; if (!Objects.equals(_nodeRef, other.getNodeRef())) { return false;
@Override public void applyOperation(ReadWriteTransaction tx) { final NodeRef ref = node.getNodeRef(); @SuppressWarnings("unchecked") InstanceIdentifierBuilder<Node> builder = ((InstanceIdentifier<Node>) ref.getValue()).builder(); InstanceIdentifierBuilder<FlowCapableNode> augmentation = builder.augmentation(FlowCapableNode.class); final InstanceIdentifier<FlowCapableNode> path = augmentation.build(); CheckedFuture readFuture = tx.read(LogicalDatastoreType.OPERATIONAL, path); Futures.addCallback(readFuture, new FutureCallback<Optional<? extends DataObject>>() { @Override public void onSuccess(Optional<? extends DataObject> optional) { enqueueWriteNodeDataTx(node, flowNode, path); if (!optional.isPresent()) { enqueuePutTable0Tx(ref); } } @Override public void onFailure(Throwable throwable) { LOG.debug(String.format("Can't retrieve node data for node %s. Writing node data with table0.", node)); enqueueWriteNodeDataTx(node, flowNode, path); enqueuePutTable0Tx(ref); } }); } });
@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 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); } }
public void onNodeUpdatedInternal(final NodeUpdated notification) { final NodeRef ref = notification.getNodeRef();