use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.Identifier in project openflowplugin by opendaylight.
the class MeterForwarder method removeWithResult.
@Override
public Future<RpcResult<RemoveMeterOutput>> removeWithResult(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()));
return this.provider.getSalMeterService().removeMeter(builder.build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.Identifier 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) {
final AddMeterInputBuilder builder = new AddMeterInputBuilder(addDataObj);
builder.setNode(new NodeRef(nodeIdent.firstIdentifierOf(Node.class)));
builder.setMeterRef(new MeterRef(identifier));
builder.setTransactionUri(new Uri(provider.getNewTransactionId()));
return this.provider.getSalMeterService().addMeter(builder.build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev200120.Identifier 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.params.xml.ns.yang.bgp.linkstate.rev200120.Identifier 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.params.xml.ns.yang.bgp.linkstate.rev200120.Identifier in project openflowplugin by opendaylight.
the class MeterForwarder method createStaleMarkEntity.
@Override
public void createStaleMarkEntity(InstanceIdentifier<Meter> identifier, Meter del, InstanceIdentifier<FlowCapableNode> nodeIdent) {
LOG.debug("Creating Stale-Mark entry for the switch {} for meter {} ", nodeIdent.toString(), del.toString());
StaleMeter staleMeter = makeStaleMeter(del);
persistStaleMeter(staleMeter, nodeIdent);
}
Aggregations