onos
onos copied to clipboard
Onos 2.5
Do anyone know why indirect meter installed by onos would be invalid after 10-15s? And i tried to add translator to record the pimeterconfig, but it seems not work. Could anyone help me?
Here is my code:
public void installEgressPortMeter(PortNumber portNumber, Long rate) {
PiMeterId egressPortMeterId = PiMeterId.of("egress.port_meters_egress.egress_port_meter");
PiMeterCellId egressMeterCellId = PiMeterCellId.ofIndirect(egressPortMeterId, 1);
PiMeterCellConfig meterConfig = PiMeterCellConfig.builder()
.withMeterCellId(egressMeterCellId)
.withMeterBand(new PiMeterBand(PiMeterBandType.COMMITTED, rate, rate))
.withMeterBand(new PiMeterBand(PiMeterBandType.PEAK, rate + 1, rate + 1))
.build();
P4RuntimeWriteClient.WriteRequest request = client.write(1, piPipeconf)
.entity(meterConfig, P4RuntimeWriteClient.UpdateType.MODIFY);
log.info("write meters for device={} ", deviceId);
if (!request.pendingUpdates().isEmpty()) {
boolean result = request.submitSync().isSuccess();
log.info("response is successful: {}", result);
}
}
Hi @XiaoM1573, this is the ONF bot 🤖 I'm glad you want to contribute to our projects! However, before accepting your contribution, we need to ask you to sign a Contributor License Agreement (CLA). You can do it online, it will take only a few minutes:
✒️ 👉 https://cla.opennetworking.org
After signing, make sure to add your Github user ID XiaoM1573 to the agreement.
For more information or help:" https://wiki.opennetworking.org/x/BgCUI