use of org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.StaleMeterBuilder in project openflowplugin by opendaylight.
the class MeterListenerTest method staleMeterCreationTest.
@Test
public void staleMeterCreationTest() throws Exception {
addFlowCapableNode(NODE_KEY);
StaleMeterKey meterKey = new StaleMeterKey(new MeterId((long) 2000));
InstanceIdentifier<StaleMeter> meterII = InstanceIdentifier.create(Nodes.class).child(Node.class, NODE_KEY).augmentation(FlowCapableNode.class).child(StaleMeter.class, meterKey);
StaleMeter meter = new StaleMeterBuilder().setKey(meterKey).setMeterName("stale_meter_one").build();
WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction();
writeTx.put(LogicalDatastoreType.CONFIGURATION, meterII, meter);
assertCommit(writeTx.submit());
}
Aggregations