Added a simple constructor for code demo tomorrow.
Change-Id: I4bdebf68cc35c98b4c141f244cac424335094c9c
diff --git a/core/api/src/main/java/org/onosproject/net/intent/HostToHostIntent.java b/core/api/src/main/java/org/onosproject/net/intent/HostToHostIntent.java
index 1a6c50a..e78d78c 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/HostToHostIntent.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/HostToHostIntent.java
@@ -20,6 +20,8 @@
import org.onosproject.core.ApplicationId;
import org.onosproject.net.HostId;
import org.onosproject.net.Link;
+import org.onosproject.net.flow.DefaultTrafficSelector;
+import org.onosproject.net.flow.DefaultTrafficTreatment;
import org.onosproject.net.flow.TrafficSelector;
import org.onosproject.net.flow.TrafficTreatment;
import org.onosproject.net.intent.constraint.LinkTypeConstraint;
@@ -37,6 +39,22 @@
private final HostId two;
/**
+ * Creates a new host-to-host intent with the supplied host pair and no
+ * other traffic selection or treatment criteria.
+ *
+ * @param appId application identifier
+ * @param one first host
+ * @param two second host
+ * @throws NullPointerException if {@code one} or {@code two} is null.
+ */
+ public HostToHostIntent(ApplicationId appId, HostId one, HostId two) {
+ this(appId, one, two,
+ DefaultTrafficSelector.builder().build(),
+ DefaultTrafficTreatment.builder().build(),
+ ImmutableList.of(new LinkTypeConstraint(false, Link.Type.OPTICAL)));
+ }
+
+ /**
* Creates a new host-to-host intent with the supplied host pair.
*
* @param appId application identifier