[CORD-2721] Implement group bucket modification
Change-Id: I0f637ec4ff2b0c12db53d70fed195ea28e542535
diff --git a/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultNextObjective.java b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultNextObjective.java
index 671cc5f..8c466c9 100644
--- a/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultNextObjective.java
+++ b/core/api/src/main/java/org/onosproject/net/flowobjective/DefaultNextObjective.java
@@ -316,6 +316,24 @@
}
@Override
+ public NextObjective modify() {
+ return modify(null);
+ }
+
+ @Override
+ public NextObjective modify(ObjectiveContext context) {
+ treatments = listBuilder.build();
+ op = Operation.MODIFY;
+ this.context = context;
+ checkNotNull(appId, "Must supply an application id");
+ checkNotNull(id, "id cannot be null");
+ checkNotNull(type, "The type cannot be null");
+ checkArgument(!treatments.isEmpty(), "Must have at least one treatment");
+
+ return new DefaultNextObjective(this);
+ }
+
+ @Override
public NextObjective verify() {
return verify(null);
}