use of org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.MeterRef in project openflowplugin by opendaylight.
the class MeterForwarder method update.
@Override
public void update(final InstanceIdentifier<Meter> identifier, final Meter original, final Meter update, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
final UpdateMeterInputBuilder builder = new UpdateMeterInputBuilder();
builder.setNode(new NodeRef(nodeIdent.firstIdentifierOf(Node.class)));
builder.setMeterRef(new MeterRef(identifier));
builder.setTransactionUri(new Uri(provider.getNewTransactionId()));
builder.setUpdatedMeter(new UpdatedMeterBuilder(update).build());
builder.setOriginalMeter(new OriginalMeterBuilder(original).build());
final Future<RpcResult<UpdateMeterOutput>> resultFuture = this.provider.getSalMeterService().updateMeter(builder.build());
JdkFutures.addErrorLogging(resultFuture, LOG, "updateMeter");
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.MeterRef in project openflowplugin by opendaylight.
the class MeterForwarder method remove.
@Override
public void remove(final InstanceIdentifier<Meter> identifier, final Meter removeDataObj, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
final RemoveMeterInputBuilder builder = new RemoveMeterInputBuilder(removeDataObj);
builder.setNode(new NodeRef(nodeIdent.firstIdentifierOf(Node.class)));
builder.setMeterRef(new MeterRef(identifier));
builder.setTransactionUri(new Uri(provider.getNewTransactionId()));
final Future<RpcResult<RemoveMeterOutput>> resultFuture = this.provider.getSalMeterService().removeMeter(builder.build());
JdkFutures.addErrorLogging(resultFuture, LOG, "removeMeter");
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.MeterRef in project openflowplugin by opendaylight.
the class MeterForwarder method remove.
@Override
public Future<RpcResult<RemoveMeterOutput>> remove(final InstanceIdentifier<Meter> identifier, final Meter removeDataObj, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
LOG.trace("Received the Meter REMOVE request [Tbl id, node Id {} {}", identifier, nodeIdent);
final RemoveMeterInputBuilder builder = new RemoveMeterInputBuilder(removeDataObj);
builder.setNode(new NodeRef(nodeIdent.firstIdentifierOf(Node.class)));
builder.setMeterRef(new MeterRef(identifier));
return salMeterService.removeMeter(builder.build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.MeterRef in project openflowplugin by opendaylight.
the class MeterForwarder method add.
@Override
public Future<RpcResult<AddMeterOutput>> add(final InstanceIdentifier<Meter> identifier, final Meter addDataObj, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
LOG.trace("Received the Meter ADD request [Tbl id, node Id {} {} {}", identifier, nodeIdent, addDataObj);
final AddMeterInputBuilder builder = new AddMeterInputBuilder(addDataObj);
builder.setNode(new NodeRef(nodeIdent.firstIdentifierOf(Node.class)));
builder.setMeterRef(new MeterRef(identifier));
return salMeterService.addMeter(builder.build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.MeterRef in project openflowplugin by opendaylight.
the class MeterForwarder method update.
@Override
public Future<RpcResult<UpdateMeterOutput>> update(final InstanceIdentifier<Meter> identifier, final Meter original, final Meter update, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
LOG.trace("Received the Meter UPDATE request [Tbl id, node Id {} {} {}", identifier, nodeIdent, update);
final UpdateMeterInputBuilder builder = new UpdateMeterInputBuilder();
builder.setNode(new NodeRef(nodeIdent.firstIdentifierOf(Node.class)));
builder.setMeterRef(new MeterRef(identifier));
builder.setUpdatedMeter(new UpdatedMeterBuilder(update).build());
builder.setOriginalMeter(new OriginalMeterBuilder(original).build());
return salMeterService.updateMeter(builder.build());
}
Aggregations