commit | fb4b04a53ba04e5ce1fd428d7f60204169c7e7ab | [log] [tgz] |
---|---|---|
author | Carolina Fernandez <cfermart@gmail.com> | Sat Dec 24 14:48:16 2016 +0100 |
committer | Jonathan Hart <jono@onlab.us> | Wed Jan 11 17:49:40 2017 +0000 |
tree | 4f56c948a72012cde473af6ac997f4c369966735 | |
parent | 874900ec363da57928d6f087527e6e9cbfbc0645 [diff] |
Fix wrong random priority generation Change-Id: I62d5c518fe0117534e79ae197a50b3d84a1e620f
diff --git a/cli/src/main/java/org/onosproject/cli/net/AddTestFlowsCommand.java b/cli/src/main/java/org/onosproject/cli/net/AddTestFlowsCommand.java index 792ebbf..1f69190 100644 --- a/cli/src/main/java/org/onosproject/cli/net/AddTestFlowsCommand.java +++ b/cli/src/main/java/org/onosproject/cli/net/AddTestFlowsCommand.java
@@ -92,7 +92,8 @@ .matchEthDst(MacAddress.valueOf((Integer.MAX_VALUE - i) * RandomUtils.nextInt())); - int randomPriority = RandomUtils.nextInt(); + int randomPriority = RandomUtils.nextInt( + FlowRule.MAX_PRIORITY - FlowRule.MIN_PRIORITY + 1) + FlowRule.MIN_PRIORITY; FlowRule addRule = DefaultFlowRule.builder() .forDevice(d.id())