commit | 230aedbd99217a3a8a3b41dcb03ce81c8bf7ef97 | [log] [tgz] |
---|---|---|
author | Kevin Chuang <cachuang@cs.nctu.edu.tw> | Wed May 02 16:26:04 2018 +0800 |
committer | Carmelo Cascone <carmelo@opennetworking.org> | Thu May 03 18:50:01 2018 +0000 |
tree | be320082cc986096e7d351050408644accbf61cc | |
parent | 3793e11aaafa7dc2c4066732f6681d781dfad47d [diff] |
Initialize behaviour attributes before perform meter operation Change-Id: I51dff2db29762a7d475acea95d1bb1a0e67661c8 (cherry picked from commit c267df20515b3ea9f72c6893d4c70d133246a0a8)
diff --git a/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/P4RuntimeMeterProgrammable.java b/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/P4RuntimeMeterProgrammable.java index 04654c8..d7a204e 100644 --- a/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/P4RuntimeMeterProgrammable.java +++ b/drivers/p4runtime/src/main/java/org/onosproject/drivers/p4runtime/P4RuntimeMeterProgrammable.java
@@ -83,6 +83,10 @@ @Override public CompletableFuture<Boolean> performMeterOperation(MeterOperation meterOp) { + if (!setupBehaviour()) { + return CompletableFuture.completedFuture(false); + } + return CompletableFuture.completedFuture(processMeterOp(meterOp)); }