Add a constructor in LinkCollectionIntent to have constraints
Change-Id: I59143342aa7868a3badf0da580887d5995611a18
Showing
1 changed file
with
25 additions
and
2 deletions
... | @@ -22,6 +22,7 @@ import org.onlab.onos.net.Link; | ... | @@ -22,6 +22,7 @@ import org.onlab.onos.net.Link; |
22 | import org.onlab.onos.net.flow.TrafficSelector; | 22 | import org.onlab.onos.net.flow.TrafficSelector; |
23 | import org.onlab.onos.net.flow.TrafficTreatment; | 23 | import org.onlab.onos.net.flow.TrafficTreatment; |
24 | 24 | ||
25 | +import java.util.List; | ||
25 | import java.util.Set; | 26 | import java.util.Set; |
26 | 27 | ||
27 | /** | 28 | /** |
... | @@ -50,8 +51,30 @@ public final class LinkCollectionIntent extends ConnectivityIntent { | ... | @@ -50,8 +51,30 @@ public final class LinkCollectionIntent extends ConnectivityIntent { |
50 | TrafficTreatment treatment, | 51 | TrafficTreatment treatment, |
51 | Set<Link> links, | 52 | Set<Link> links, |
52 | ConnectPoint egressPoint) { | 53 | ConnectPoint egressPoint) { |
53 | - super(id(LinkCollectionIntent.class, selector, treatment, links, egressPoint), | 54 | + this(appId, selector , treatment, links, egressPoint, null); |
54 | - appId, resources(links), selector, treatment); | 55 | + } |
56 | + | ||
57 | + /** | ||
58 | + * Creates a new actionable intent capable of funneling the selected | ||
59 | + * traffic along the specified convergent tree and out the given egress point | ||
60 | + * satisfying the specified constraints. | ||
61 | + * | ||
62 | + * @param appId application identifier | ||
63 | + * @param selector traffic match | ||
64 | + * @param treatment action | ||
65 | + * @param links traversed links | ||
66 | + * @param egressPoint egress point | ||
67 | + * @param constraints optional list of constraints | ||
68 | + * @throws NullPointerException {@code path} is null | ||
69 | + */ | ||
70 | + public LinkCollectionIntent(ApplicationId appId, | ||
71 | + TrafficSelector selector, | ||
72 | + TrafficTreatment treatment, | ||
73 | + Set<Link> links, | ||
74 | + ConnectPoint egressPoint, | ||
75 | + List<Constraint> constraints) { | ||
76 | + super(id(LinkCollectionIntent.class, selector, treatment, links, egressPoint, constraints), | ||
77 | + appId, resources(links), selector, treatment, constraints); | ||
55 | this.links = links; | 78 | this.links = links; |
56 | this.egressPoint = egressPoint; | 79 | this.egressPoint = egressPoint; |
57 | } | 80 | } | ... | ... |
-
Please register or login to post a comment