Search in sources :

Example 1 with GroupUpdated

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

the class GroupNotificationSupplierImplTest method testUpdate.

@Test
public void testUpdate() {
    final GroupUpdated notification = notifSupplierImpl.updateNotification(createTestGroup(), 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) GroupUpdated(org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.GroupUpdated) 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) NodeKey(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey) Test(org.junit.Test)

Example 2 with GroupUpdated

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

the class GroupNotificationSupplierImpl method updateNotification.

@Override
public GroupUpdated updateNotification(final Group group, final InstanceIdentifier<Group> path) {
    Preconditions.checkArgument(group != null);
    Preconditions.checkArgument(path != null);
    final GroupUpdatedBuilder builder = new GroupUpdatedBuilder(group);
    builder.setGroupRef(new GroupRef(path));
    builder.setNode(createNodeRef(path));
    return builder.build();
}
Also used : GroupUpdatedBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.GroupUpdatedBuilder) 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 GroupUpdated (org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.GroupUpdated)1 GroupUpdatedBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.GroupUpdatedBuilder)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