use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev200120.pcep.client.attributes.path.computation.client.reported.lsp.Path in project openflowplugin by opendaylight.
the class QueueStatNotificationSupplierImpl method createNotification.
@Override
public QueueStatisticsUpdate createNotification(final FlowCapableNodeConnectorQueueStatisticsData statisticsDataTreeItem, final InstanceIdentifier<FlowCapableNodeConnectorQueueStatisticsData> path) {
Preconditions.checkArgument(statisticsDataTreeItem != null);
Preconditions.checkArgument(path != null);
final NodeConnectorBuilder connBuilder = new NodeConnectorBuilder();
final NodeConnectorKey key = path.firstKeyOf(NodeConnector.class, NodeConnectorKey.class);
connBuilder.setId(key.getId());
connBuilder.setKey(key);
final QueueIdAndStatisticsMapBuilder queueStatMapBuilder = new QueueIdAndStatisticsMapBuilder(statisticsDataTreeItem.getFlowCapableNodeConnectorQueueStatistics());
final QueueStatisticsUpdateBuilder builder = new QueueStatisticsUpdateBuilder();
builder.setId(getNodeId(path));
builder.setMoreReplies(Boolean.FALSE);
builder.setQueueIdAndStatisticsMap(Collections.singletonList(queueStatMapBuilder.build()));
builder.setNodeConnector(Collections.singletonList(connBuilder.build()));
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev200120.pcep.client.attributes.path.computation.client.reported.lsp.Path 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.params.xml.ns.yang.topology.pcep.rev200120.pcep.client.attributes.path.computation.client.reported.lsp.Path in project openflowplugin by opendaylight.
the class FlowNotificationSupplierImpl method updateNotification.
@Override
public FlowUpdated updateNotification(final Flow flow, final InstanceIdentifier<Flow> path) {
Preconditions.checkArgument(flow != null);
Preconditions.checkArgument(path != null);
final FlowUpdatedBuilder builder = new FlowUpdatedBuilder(flow);
builder.setFlowRef(new FlowRef(path));
builder.setNode(createNodeRef(path));
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev200120.pcep.client.attributes.path.computation.client.reported.lsp.Path in project openflowplugin by opendaylight.
the class MeterNotificationSupplierImpl method updateNotification.
@Override
public MeterUpdated updateNotification(final Meter meter, final InstanceIdentifier<Meter> path) {
Preconditions.checkArgument(meter != null);
Preconditions.checkArgument(path != null);
final MeterUpdatedBuilder builder = new MeterUpdatedBuilder(meter);
builder.setMeterRef(new MeterRef(path));
builder.setNode(createNodeRef(path));
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.pcep.rev200120.pcep.client.attributes.path.computation.client.reported.lsp.Path in project openflowplugin by opendaylight.
the class FlowStatNotificationSupplierImpl method createNotification.
@Override
public FlowsStatisticsUpdate createNotification(final FlowStatistics flowStatistics, final InstanceIdentifier<FlowStatistics> path) {
Preconditions.checkArgument(flowStatistics != null);
Preconditions.checkArgument(path != null);
final FlowAndStatisticsMapListBuilder fsmlBuilder = new FlowAndStatisticsMapListBuilder(flowStatistics);
fsmlBuilder.setFlowId(new FlowId(path.firstKeyOf(Flow.class, FlowKey.class).getId().getValue()));
final FlowsStatisticsUpdateBuilder builder = new FlowsStatisticsUpdateBuilder();
builder.setId(getNodeId(path));
builder.setMoreReplies(Boolean.FALSE);
// NOTE : fix if it needs, but we have to ask DataStore for the NodeConnector list
builder.setNodeConnector(Collections.<NodeConnector>emptyList());
builder.setFlowAndStatisticsMapList(Collections.singletonList(fsmlBuilder.build()));
return builder.build();
}
Aggregations