refactoring OpticalPathIntent yet again
Change-Id: Ibbad495b45f2d461eced6cae2a221887466a83c2
Showing
1 changed file
with
5 additions
and
2 deletions
... | @@ -5,11 +5,13 @@ import java.util.Collection; | ... | @@ -5,11 +5,13 @@ import java.util.Collection; |
5 | import org.onlab.onos.ApplicationId; | 5 | import org.onlab.onos.ApplicationId; |
6 | import org.onlab.onos.net.ConnectPoint; | 6 | import org.onlab.onos.net.ConnectPoint; |
7 | import org.onlab.onos.net.Link; | 7 | import org.onlab.onos.net.Link; |
8 | +import org.onlab.onos.net.NetworkResource; | ||
8 | import org.onlab.onos.net.Path; | 9 | import org.onlab.onos.net.Path; |
9 | 10 | ||
10 | import com.google.common.base.MoreObjects; | 11 | import com.google.common.base.MoreObjects; |
12 | +import com.google.common.collect.ImmutableSet; | ||
11 | 13 | ||
12 | -public class OpticalPathIntent extends ConnectivityIntent { | 14 | +public class OpticalPathIntent extends Intent { |
13 | 15 | ||
14 | private final ConnectPoint src; | 16 | private final ConnectPoint src; |
15 | private final ConnectPoint dst; | 17 | private final ConnectPoint dst; |
... | @@ -21,7 +23,8 @@ public class OpticalPathIntent extends ConnectivityIntent { | ... | @@ -21,7 +23,8 @@ public class OpticalPathIntent extends ConnectivityIntent { |
21 | ConnectPoint dst, | 23 | ConnectPoint dst, |
22 | Path path) { | 24 | Path path) { |
23 | super(id(OpticalPathIntent.class, src, dst), | 25 | super(id(OpticalPathIntent.class, src, dst), |
24 | - appId, resources(path.links()), null, null); | 26 | + appId, |
27 | + ImmutableSet.<NetworkResource>copyOf(path.links())); | ||
25 | this.src = src; | 28 | this.src = src; |
26 | this.dst = dst; | 29 | this.dst = dst; |
27 | this.path = path; | 30 | this.path = path; | ... | ... |
-
Please register or login to post a comment