Allow building UpfApplication matching only on slice_id
According to the UP4 logical pipeline, the only required match field is
slice_id. All other fields are ternary, hence optional.
Change-Id: I265b43621d6469087e57fda5eb6a4ba350853e9d
(cherry picked from commit ee60f76ae19abeb2162315dd141ce44233880076)
diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfApplication.java b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfApplication.java
index 017de89..fed1eb9 100644
--- a/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfApplication.java
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfApplication.java
@@ -261,9 +261,6 @@
}
public UpfApplication build() {
- checkArgument(ipPrefix != null || l4PortRange != null ||
- ipProto != null,
- "At least one match field is required");
checkNotNull(sliceId, "Slice ID must be provided");
checkNotNull(appId, "Application ID must be provided");
checkNotNull(priority, "Priority must be provided");