use of org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRemoved in project openflowplugin by opendaylight.
the class NodeNotificationSupplierImpl method deleteNotification.
@Override
public NodeRemoved deleteNotification(final InstanceIdentifier<FlowCapableNode> path) {
Preconditions.checkArgument(path != null);
final NodeRemovedBuilder delNodeNotifBuilder = new NodeRemovedBuilder();
delNodeNotifBuilder.setNodeRef(new NodeRef(path));
return delNodeNotifBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRemoved in project openflowplugin by opendaylight.
the class DeviceMastershipManager method onNodeRemoved.
@Override
public void onNodeRemoved(NodeRemoved notification) {
LOG.debug("NodeRemoved notification received : {}", notification);
NodeId nodeId = notification.getNodeRef().getValue().firstKeyOf(Node.class).getId();
final DeviceMastership mastership = deviceMasterships.remove(nodeId);
if (mastership != null) {
mastership.close();
LOG.info("Unregistered FRM cluster singleton service for service id : {}", nodeId.getValue());
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRemoved in project openflowplugin by opendaylight.
the class NodeNotificationSupplierImplTest method testDelete.
@Test
public void testDelete() {
final NodeRemoved notification = notifSupplierImpl.deleteNotification(createTestFlowCapableNodePath());
assertNotNull(notification);
assertEquals(FLOW_NODE_ID, notification.getNodeRef().getValue().firstKeyOf(Node.class, NodeKey.class).getId().getValue());
}
Aggregations