use of org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.MeterRemoved in project openflowplugin by opendaylight.
the class MeterNotificationSupplierImplTest method testDelete.
@Test
public void testDelete() {
final MeterRemoved notification = notifSupplierImpl.deleteNotification(createTestMeterPath());
assertNotNull(notification);
assertEquals(METER_ID, notification.getMeterId().getValue());
assertEquals(METER_ID, notification.getMeterRef().getValue().firstKeyOf(Meter.class, MeterKey.class).getMeterId().getValue());
assertEquals(FLOW_NODE_ID, notification.getNode().getValue().firstKeyOf(Node.class, NodeKey.class).getId().getValue());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.MeterRemoved in project openflowplugin by opendaylight.
the class MeterNotificationSupplierImpl method deleteNotification.
@Override
public MeterRemoved deleteNotification(final InstanceIdentifier<Meter> path) {
Preconditions.checkArgument(path != null);
final MeterRemovedBuilder builder = new MeterRemovedBuilder();
builder.setMeterId(path.firstKeyOf(Meter.class, MeterKey.class).getMeterId());
builder.setMeterRef(new MeterRef(path));
builder.setNode(createNodeRef(path));
return builder.build();
}
Aggregations