Search in sources :

Example 11 with GroupRef

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());
}
Also used : NodeRef(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef) GroupRef(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupRef) AddGroupInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.AddGroupInputBuilder)

Example 12 with GroupRef

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());
}
Also used : NodeRef(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef) RemoveGroupInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.RemoveGroupInputBuilder) GroupRef(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupRef)

Example 13 with GroupRef

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());
}
Also used : StaleGroup(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.StaleGroup) Group(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group) NodeRef(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef) GroupRef(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupRef) Uri(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri) AddGroupInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.AddGroupInputBuilder)

Example 14 with GroupRef

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");
}
Also used : StaleGroup(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.StaleGroup) Group(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group) NodeRef(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) RemoveGroupInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.RemoveGroupInputBuilder) GroupRef(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupRef) Uri(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri)

Example 15 with GroupRef

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();
}
Also used : GroupRemovedBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.GroupRemovedBuilder) GroupRef(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupRef)

Aggregations

GroupRef (org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupRef)12 NodeRef (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeRef)8 Group (org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group)6 GroupRef (org.gluu.oxtrust.model.scim2.GroupRef)5 ArrayList (java.util.ArrayList)4 Address (org.gluu.oxtrust.model.scim2.Address)4 Email (org.gluu.oxtrust.model.scim2.Email)4 Entitlement (org.gluu.oxtrust.model.scim2.Entitlement)4 Im (org.gluu.oxtrust.model.scim2.Im)4 PhoneNumber (org.gluu.oxtrust.model.scim2.PhoneNumber)4 Photo (org.gluu.oxtrust.model.scim2.Photo)4 Role (org.gluu.oxtrust.model.scim2.Role)4 X509Certificate (org.gluu.oxtrust.model.scim2.X509Certificate)4 Uri (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Uri)4 StaleGroup (org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.StaleGroup)4 GluuCustomPerson (org.gluu.oxtrust.model.GluuCustomPerson)3 AddGroupInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.AddGroupInputBuilder)3 RemoveGroupInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.RemoveGroupInputBuilder)3 RpcResult (org.opendaylight.yangtools.yang.common.RpcResult)3 IOException (java.io.IOException)2