commit | 3684dc7c5c3d3fa95a0ea077c4489ccba1ec38cc | [log] [tgz] |
---|---|---|
author | Jayasree Ghosh <jghosh@partner.ciena.com> | Thu Jun 09 18:07:19 2016 +0530 |
committer | Ray Milkey <ray@onlab.us> | Tue Jun 14 11:54:43 2016 -0700 |
tree | bad554e491b0fa7f404ae88e99459d26a5adc874 | |
parent | c96e25824ab473b82828a0b5018a48e007133257 [diff] [blame] |
ONOS-4635:Fix Issue with add flows using flowobjective-forward REST API with incorrect priority Change-Id: I929918b61aec83c2dc2cdca456dfdb1d2d736c01
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultForwardingObjective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultForwardingObjective.java index 84e38af..f83d5e1 100644 --- a/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultForwardingObjective.java +++ b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultForwardingObjective.java
@@ -283,6 +283,8 @@ checkArgument(nextId != null || treatment != null, "Must supply at " + "least a treatment and/or a nextId"); checkNotNull(appId, "Must supply an application id"); + checkArgument(priority <= MAX_PRIORITY && priority >= MIN_PRIORITY, "Priority " + + "out of range"); op = Operation.ADD; return new DefaultForwardingObjective(this); }