use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.group.update.OriginalGroup in project openflowplugin by opendaylight.
the class SalGroupServiceImplTest method updateGroup.
private void updateGroup() {
final UpdatedGroup updatedGroup = new UpdatedGroupBuilder().setGroupId(new GroupId(DUMMY_GROUP_ID)).build();
final OriginalGroup originalGroup = new OriginalGroupBuilder().setGroupId(new GroupId(DUMMY_GROUP_ID)).build();
final UpdateGroupInput updateGroupInput = new UpdateGroupInputBuilder().setUpdatedGroup(updatedGroup).setOriginalGroup(originalGroup).build();
this.<UpdateGroupOutput>mockSuccessfulFuture();
salGroupService.updateGroup(updateGroupInput);
verify(mockedRequestContextStack).createRequestContext();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.group.update.OriginalGroup in project openflowplugin by opendaylight.
the class GroupForwarder method update.
@Override
public void update(final InstanceIdentifier<Group> identifier, final Group original, final Group update, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
final Group originalGroup = original;
final Group updatedGroup = update;
final UpdateGroupInputBuilder builder = new UpdateGroupInputBuilder();
builder.setNode(new NodeRef(nodeIdent.firstIdentifierOf(Node.class)));
builder.setGroupRef(new GroupRef(identifier));
builder.setTransactionUri(new Uri(provider.getNewTransactionId()));
builder.setUpdatedGroup(new UpdatedGroupBuilder(updatedGroup).build());
builder.setOriginalGroup(new OriginalGroupBuilder(originalGroup).build());
final Future<RpcResult<UpdateGroupOutput>> resultFuture = this.provider.getSalGroupService().updateGroup(builder.build());
JdkFutures.addErrorLogging(resultFuture, LOG, "updateGroup");
}
Aggregations