commit | c267df20515b3ea9f72c6893d4c70d133246a0a8 | [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:49:46 2018 +0000 |
tree | 70982d7d6e4bf76e2dc93a75dbe157b932ddb4e5 | |
parent | aab4ccf45937edef687a32f27c88d5e5176eb6cf [diff] |
Initialize behaviour attributes before perform meter operation Change-Id: I51dff2db29762a7d475acea95d1bb1a0e67661c8
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)); }