use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupRef in project openflowplugin by opendaylight.
the class GroupForwarder method add.
@Override
public Future<RpcResult<AddGroupOutput>> add(final InstanceIdentifier<Group> identifier, final Group addDataObj, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
LOG.trace("Forwarding Group ADD request [Tbl id, node Id {} {} {}", identifier, nodeIdent, addDataObj);
final AddGroupInputBuilder builder = new AddGroupInputBuilder(addDataObj);
builder.setNode(new NodeRef(nodeIdent.firstIdentifierOf(Node.class)));
builder.setGroupRef(new GroupRef(identifier));
return salGroupService.addGroup(builder.build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupRef 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.types.rev131018.GroupRef in project openflowplugin by opendaylight.
the class GroupForwarder method add.
@Override
public Future<RpcResult<AddGroupOutput>> add(final InstanceIdentifier<Group> identifier, final Group addDataObj, final InstanceIdentifier<FlowCapableNode> nodeIdent) {
final Group group = addDataObj;
final AddGroupInputBuilder builder = new AddGroupInputBuilder(group);
builder.setNode(new NodeRef(nodeIdent.firstIdentifierOf(Node.class)));
builder.setGroupRef(new GroupRef(identifier));
builder.setTransactionUri(new Uri(provider.getNewTransactionId()));
return this.provider.getSalGroupService().addGroup(builder.build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupRef 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");
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupRef in project openflowplugin by opendaylight.
the class GroupNotificationSupplierImpl method deleteNotification.
@Override
public GroupRemoved deleteNotification(final InstanceIdentifier<Group> path) {
Preconditions.checkArgument(path != null);
final GroupRemovedBuilder builder = new GroupRemovedBuilder();
builder.setGroupId(path.firstKeyOf(Group.class, GroupKey.class).getGroupId());
builder.setGroupRef(new GroupRef(path));
builder.setNode(createNodeRef(path));
return builder.build();
}
Aggregations