use of org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.GroupAdded in project openflowplugin by opendaylight.
the class GroupNotificationSupplierImplTest method testCreate.
@Test
public void testCreate() {
final GroupAdded notification = notifSupplierImpl.createNotification(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.GroupAdded in project openflowplugin by opendaylight.
the class GroupNotificationSupplierImpl method createNotification.
@Override
public GroupAdded createNotification(final Group dataTreeItemObject, final InstanceIdentifier<Group> path) {
Preconditions.checkArgument(dataTreeItemObject != null);
Preconditions.checkArgument(path != null);
final GroupAddedBuilder builder = new GroupAddedBuilder(dataTreeItemObject);
builder.setGroupRef(new GroupRef(path));
builder.setNode(createNodeRef(path));
return builder.build();
}
Aggregations