Search in sources :

Example 1 with GroupRemoved

use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.GroupRemoved in project openflowplugin by opendaylight.

the class GroupNotificationSupplierImplTest method testDelete.

@Test
public void testDelete() {
    final GroupRemoved notification = notifSupplierImpl.deleteNotification(createTestGroupPath());
    assertNotNull(notification);
    assertEquals(GROUP_ID, notification.getGroupId().getValue());
    assertEquals(GROUP_ID, notification.getGroupRef().getValue().firstKeyOf(Group.class, GroupKey.class).getGroupId().getValue());
    assertEquals(FLOW_NODE_ID, notification.getNode().getValue().firstKeyOf(Node.class, NodeKey.class).getId().getValue());
}
Also used : Group(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group) FlowCapableNode(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode) Node(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node) GroupKey(org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.GroupKey) GroupRemoved(org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.GroupRemoved) NodeKey(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey) Test(org.junit.Test)

Example 2 with GroupRemoved

use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.GroupRemoved 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

Test (org.junit.Test)1 FlowCapableNode (org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode)1 GroupRemoved (org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.GroupRemoved)1 GroupRemovedBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.GroupRemovedBuilder)1 GroupRef (org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.GroupRef)1 Group (org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group)1 GroupKey (org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.GroupKey)1 Node (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node)1 NodeKey (org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey)1