Add support for reconfiguring interfaces in SDN-IP.
Change-Id: I2ea85d85432e661c3cbdca5e5a8b16678a242369
diff --git a/core/api/src/main/java/org/onosproject/net/intent/ConnectivityIntent.java b/core/api/src/main/java/org/onosproject/net/intent/ConnectivityIntent.java
index 7caee3e..13f07a2 100644
--- a/core/api/src/main/java/org/onosproject/net/intent/ConnectivityIntent.java
+++ b/core/api/src/main/java/org/onosproject/net/intent/ConnectivityIntent.java
@@ -96,6 +96,26 @@
protected TrafficTreatment treatment = DefaultTrafficTreatment.emptyTreatment();
protected List<Constraint> constraints = ImmutableList.of();
+ /**
+ * Creates a new empty builder.
+ */
+ protected Builder() {
+ }
+
+ /**
+ * Creates a new builder pre-populated with the information in the given
+ * intent.
+ *
+ * @param intent initial intent
+ */
+ protected Builder(ConnectivityIntent intent) {
+ super(intent);
+
+ this.selector(intent.selector())
+ .treatment(intent.treatment())
+ .constraints(intent.constraints());
+ }
+
@Override
public Builder appId(ApplicationId appId) {
return (Builder) super.appId(appId);
@@ -111,7 +131,6 @@
return (Builder) super.priority(priority);
}
-
/**
* Sets the traffic selector for the intent that will be built.
*
@@ -146,7 +165,6 @@
}
}
-
/**
* Returns the match specifying the type of traffic.
*