use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.pcupd.message.pcupd.message.updates.Path in project bgpcep by opendaylight.
the class Stateful07PCReportMessageParser method serializeReport.
private void serializeReport(final Reports report, final ByteBuf buffer) {
if (report.getSrp() != null) {
serializeObject(report.getSrp(), buffer);
}
serializeObject(report.getLsp(), buffer);
final Path p = report.getPath();
if (p != null) {
serializeObject(p.getEro(), buffer);
serializeObject(p.getLspa(), buffer);
serializeObject(p.getBandwidth(), buffer);
serializeObject(p.getReoptimizationBandwidth(), buffer);
if (p.getMetrics() != null) {
for (final Metrics m : p.getMetrics()) {
serializeObject(m.getMetric(), buffer);
}
}
serializeObject(p.getIro(), buffer);
serializeObject(p.getRro(), buffer);
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.pcupd.message.pcupd.message.updates.Path in project bgpcep by opendaylight.
the class Stateful07PCUpdateRequestMessageParser method serializeUpdate.
protected void serializeUpdate(final Updates update, final ByteBuf buffer) {
serializeObject(update.getSrp(), buffer);
serializeObject(update.getLsp(), buffer);
final Path p = update.getPath();
if (p != null) {
serializeObject(p.getEro(), buffer);
serializeObject(p.getLspa(), buffer);
serializeObject(p.getBandwidth(), buffer);
serializeObject(p.getReoptimizationBandwidth(), buffer);
if (p.getMetrics() != null) {
for (final Metrics m : p.getMetrics()) {
serializeObject(m.getMetric(), buffer);
}
}
serializeObject(p.getIro(), buffer);
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.pcupd.message.pcupd.message.updates.Path in project openflowplugin by opendaylight.
the class AbstractNotificationSupplierBase method getNodeII.
/**
* Method returns a keyed {@link InstanceIdentifier} for {@link Node} from inventory
* because this path is a base for every OF paths.
*
* @param ii - key for keyed {@link Node} {@link InstanceIdentifier}
* @return Keyed InstanceIdentifier for Node
*/
protected static KeyedInstanceIdentifier<Node, NodeKey> getNodeII(final InstanceIdentifier<?> ii) {
final NodeKey key = ii.firstKeyOf(Node.class, NodeKey.class);
Preconditions.checkArgument(key != null);
return InstanceIdentifier.create(Nodes.class).child(Node.class, key);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.pcupd.message.pcupd.message.updates.Path in project openflowplugin by opendaylight.
the class NodeConnectorNotificationSupplierImpl method createNotification.
@Override
public NodeConnectorUpdated createNotification(final FlowCapableNodeConnector flowCapableNodeConnector, final InstanceIdentifier<FlowCapableNodeConnector> path) {
Preconditions.checkArgument(flowCapableNodeConnector != null);
Preconditions.checkArgument(path != null);
final NodeConnectorUpdatedBuilder notifBuilder = new NodeConnectorUpdatedBuilder();
final FlowCapableNodeConnectorUpdatedBuilder connNotifBuilder = new FlowCapableNodeConnectorUpdatedBuilder(flowCapableNodeConnector);
notifBuilder.setId(path.firstKeyOf(NodeConnector.class, NodeConnectorKey.class).getId());
notifBuilder.setNodeConnectorRef(new NodeConnectorRef(path));
notifBuilder.addAugmentation(FlowCapableNodeConnectorUpdated.class, connNotifBuilder.build());
return notifBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.pcupd.message.pcupd.message.updates.Path in project openflowplugin by opendaylight.
the class NodeConnectorNotificationSupplierImpl method deleteNotification.
@Override
public NodeConnectorRemoved deleteNotification(final InstanceIdentifier<FlowCapableNodeConnector> path) {
Preconditions.checkArgument(path != null);
final NodeConnectorRemovedBuilder notifBuilder = new NodeConnectorRemovedBuilder();
notifBuilder.setNodeConnectorRef(new NodeConnectorRef(path));
return notifBuilder.build();
}
Aggregations