use of org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef in project openflowplugin by opendaylight.
the class FlatBatchGroupAdapters method adaptFlatBatchUpdateGroup.
/**
* Adapt flat batch update group.
* @param planStep batch step containing changes of the same type
* @param node pointer for RPC routing
* @return input suitable for {@link org.opendaylight.yang.gen.v1.urn
* .opendaylight.groups.service.rev160315.SalGroupsBatchService#updateGroupsBatch(UpdateGroupsBatchInput)}
*/
public static UpdateGroupsBatchInput adaptFlatBatchUpdateGroup(final BatchPlanStep planStep, final NodeRef node) {
final List<BatchUpdateGroups> batchGroups = new ArrayList<>();
for (FlatBatchUpdateGroup batchUpdateGroup : planStep.<FlatBatchUpdateGroup>getTaskBag()) {
final BatchUpdateGroups updateGroups = new BatchUpdateGroupsBuilder(batchUpdateGroup).build();
batchGroups.add(updateGroups);
}
return new UpdateGroupsBatchInputBuilder().setBarrierAfter(planStep.isBarrierAfter()).setNode(node).setBatchUpdateGroups(batchGroups).build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef in project openflowplugin by opendaylight.
the class DeviceManagerImplTest method sendNodeRemovedNotification.
@Test
public void sendNodeRemovedNotification() throws Exception {
deviceManager.sendNodeAddedNotification(DUMMY_IDENTIFIER);
deviceManager.sendNodeRemovedNotification(DUMMY_IDENTIFIER);
deviceManager.sendNodeRemovedNotification(DUMMY_IDENTIFIER);
verify(notificationPublishService).offerNotification(new NodeRemovedBuilder().setNodeRef(new NodeRef(DUMMY_IDENTIFIER)).build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef in project openflowplugin by opendaylight.
the class DeviceManagerImplTest method sendNodeAddedNotification.
@Test
public void sendNodeAddedNotification() throws Exception {
deviceManager.sendNodeAddedNotification(DUMMY_IDENTIFIER);
deviceManager.sendNodeAddedNotification(DUMMY_IDENTIFIER);
verify(notificationPublishService).offerNotification(new NodeUpdatedBuilder().setId(DUMMY_NODE_ID).setNodeRef(new NodeRef(DUMMY_IDENTIFIER)).build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef in project openflowplugin by opendaylight.
the class NodeChangeListenerImpl method prepareTopologyNode.
private static org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.Node prepareTopologyNode(final NodeId nodeIdInTopology, final InstanceIdentifier<FlowCapableNode> iiToNodeInInventory) {
final InventoryNode inventoryNode = new InventoryNodeBuilder().setInventoryNodeRef(new NodeRef(iiToNodeInInventory.firstIdentifierOf(Node.class))).build();
final NodeBuilder topologyNodeBuilder = new NodeBuilder();
topologyNodeBuilder.setNodeId(nodeIdInTopology);
topologyNodeBuilder.addAugmentation(InventoryNode.class, inventoryNode);
return topologyNodeBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef in project openflowplugin by opendaylight.
the class PacketOutConvertorTest method createNodeRef.
private static NodeRef createNodeRef(final String nodeId) {
NodeKey key = new NodeKey(new NodeId(nodeId));
InstanceIdentifier<Node> path = InstanceIdentifier.<Nodes>builder(Nodes.class).<Node, NodeKey>child(Node.class, key).build();
return new NodeRef(path);
}
Aggregations