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());
}
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();
}
Aggregations