use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.RemoveGroupOutput in project openflowplugin by opendaylight.
the class SalGroupServiceImplTest method removeGroup.
private void removeGroup() throws Exception {
final GroupId dummyGroupId = new GroupId(DUMMY_GROUP_ID);
RemoveGroupInput removeGroupInput = new RemoveGroupInputBuilder().setGroupId(dummyGroupId).build();
this.<RemoveGroupOutput>mockSuccessfulFuture();
salGroupService.removeGroup(removeGroupInput);
verify(mockedRequestContextStack).createRequestContext();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.RemoveGroupOutput in project openflowplugin by opendaylight.
the class GroupForwarder method removeWithResult.
// TODO: Pull this into ForwardingRulesCommiter and override it here
@Override
public Future<RpcResult<RemoveGroupOutput>> removeWithResult(final InstanceIdentifier<Group> identifier, final Group removeDataObj, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
final Group group = removeDataObj;
final RemoveGroupInputBuilder builder = new RemoveGroupInputBuilder(group);
builder.setNode(new NodeRef(nodeIdent.firstIdentifierOf(Node.class)));
builder.setGroupRef(new GroupRef(identifier));
builder.setTransactionUri(new Uri(provider.getNewTransactionId()));
return this.provider.getSalGroupService().removeGroup(builder.build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.RemoveGroupOutput in project openflowplugin by opendaylight.
the class GroupForwarder method remove.
@Override
public Future<RpcResult<RemoveGroupOutput>> remove(final InstanceIdentifier<Group> identifier, final Group removeDataObj, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
LOG.trace("Forwarding Table REMOVE request [Tbl id, node Id {} {}", identifier, nodeIdent);
final RemoveGroupInputBuilder builder = new RemoveGroupInputBuilder(removeDataObj);
builder.setNode(new NodeRef(nodeIdent.firstIdentifierOf(Node.class)));
builder.setGroupRef(new GroupRef(identifier));
// fix group removal - no buckets allowed
builder.setBuckets(null);
return salGroupService.removeGroup(builder.build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.RemoveGroupOutput in project openflowplugin by opendaylight.
the class SyncPlanPushStrategyIncrementalImpl method flushRemoveGroupPortionAndBarrier.
private ListenableFuture<RpcResult<Void>> flushRemoveGroupPortionAndBarrier(final InstanceIdentifier<FlowCapableNode> nodeIdent, final ItemSyncBox<Group> groupsPortion) {
List<ListenableFuture<RpcResult<RemoveGroupOutput>>> allResults = new ArrayList<>();
for (Group group : groupsPortion.getItemsToPush()) {
final KeyedInstanceIdentifier<Group, GroupKey> groupIdent = nodeIdent.child(Group.class, group.getKey());
allResults.add(JdkFutureAdapters.listenInPoolThread(groupForwarder.remove(groupIdent, group, nodeIdent)));
}
final ListenableFuture<RpcResult<Void>> singleVoidResult = Futures.transform(Futures.allAsList(allResults), ReconcileUtil.<RemoveGroupOutput>createRpcResultCondenser("group remove"), MoreExecutors.directExecutor());
return Futures.transformAsync(singleVoidResult, ReconcileUtil.chainBarrierFlush(PathUtil.digNodePath(nodeIdent), transactionService), MoreExecutors.directExecutor());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.RemoveGroupOutput in project openflowplugin by opendaylight.
the class GroupForwarder method remove.
@Override
public void remove(final InstanceIdentifier<Group> identifier, final Group removeDataObj, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
final Group group = removeDataObj;
final RemoveGroupInputBuilder builder = new RemoveGroupInputBuilder(group);
builder.setNode(new NodeRef(nodeIdent.firstIdentifierOf(Node.class)));
builder.setGroupRef(new GroupRef(identifier));
builder.setTransactionUri(new Uri(provider.getNewTransactionId()));
final Future<RpcResult<RemoveGroupOutput>> resultFuture = this.provider.getSalGroupService().removeGroup(builder.build());
JdkFutures.addErrorLogging(resultFuture, LOG, "removeGroup");
}
Aggregations