use of org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.MeterUpdated in project openflowplugin by opendaylight.
the class MeterNotificationSupplierImplTest method testUpdate.
@Test
public void testUpdate() {
final MeterUpdated notification = notifSupplierImpl.updateNotification(createTestMeter(), 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.MeterUpdated in project openflowplugin by opendaylight.
the class MeterNotificationSupplierImpl method updateNotification.
@Override
public MeterUpdated updateNotification(final Meter meter, final InstanceIdentifier<Meter> path) {
Preconditions.checkArgument(meter != null);
Preconditions.checkArgument(path != null);
final MeterUpdatedBuilder builder = new MeterUpdatedBuilder(meter);
builder.setMeterRef(new MeterRef(path));
builder.setNode(createNodeRef(path));
return builder.build();
}
Aggregations