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