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>(); }
if (!Objects.equals(_id, other.getId())) { return false;
@Override public void onNodeUpdated(NodeUpdated nodeUpdated) { LOG.debug("Node updated {}", nodeUpdated); NodeId nodeId = nodeUpdated.getId(); FlowCapableNodeUpdated switchDesc = nodeUpdated.getAugmentation(FlowCapableNodeUpdated.class); if (switchDesc != null) { LOG.info("Node {}, OpenFlow description {}", nodeId, switchDesc); } //Remove all flows using RPC call to MD-SAL Flow Service RemoveFlowInputBuilder flowBuilder = new RemoveFlowInputBuilder() .setBarrier(true) .setNode(InventoryUtils.getNodeRef(nodeId)); salFlowService.removeFlow(flowBuilder.build()); }
final InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node> nodeRef = InstanceIdentifier.builder(Nodes.class) .child(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node.class, new NodeKey(notification.getId())) .toInstance(); try {