Add support for reconfiguring interfaces in SDN-IP.
Change-Id: I2ea85d85432e661c3cbdca5e5a8b16678a242369
diff --git a/core/api/src/main/java/org/onosproject/net/intent/MultiPointToSinglePointIntent.java b/core/api/src/main/java/org/onosproject/net/intent/MultiPointToSinglePointIntent.java
index ac6061c..44d407e 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/MultiPointToSinglePointIntent.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/MultiPointToSinglePointIntent.java
@@ -100,6 +100,17 @@
}
/**
+ * Creates a new builder pre-populated with the information in the given
+ * intent.
+ *
+ * @param intent initial intent
+ * @return intent builder
+ */
+ public static Builder builder(MultiPointToSinglePointIntent intent) {
+ return new Builder(intent);
+ }
+
+ /**
* Builder of a multi point to single point intent.
*/
public static final class Builder extends ConnectivityIntent.Builder {
@@ -110,6 +121,19 @@
// Hide constructor
}
+ /**
+ * Creates a new builder pre-populated with information from the given
+ * intent.
+ *
+ * @param intent initial intent
+ */
+ protected Builder(MultiPointToSinglePointIntent intent) {
+ super(intent);
+
+ this.ingressPoints(intent.ingressPoints())
+ .egressPoint(intent.egressPoint());
+ }
+
@Override
public Builder appId(ApplicationId appId) {
return (Builder) super.appId(appId);