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