Committed by
Jonathan Hart
Reflects the change of TrafficTreatment.Builder.setMpls() input paramter (int to MplsLabel)
Change-Id: Icc4345e60008c8d4f8c50cd8edab0622f7e0b6fc
Showing
4 changed files
with
11 additions
and
7 deletions
... | @@ -20,6 +20,7 @@ import java.util.HashSet; | ... | @@ -20,6 +20,7 @@ import java.util.HashSet; |
20 | import java.util.List; | 20 | import java.util.List; |
21 | import java.util.Set; | 21 | import java.util.Set; |
22 | 22 | ||
23 | +import org.onlab.packet.MplsLabel; | ||
23 | import org.onosproject.core.ApplicationId; | 24 | import org.onosproject.core.ApplicationId; |
24 | import org.onosproject.net.DeviceId; | 25 | import org.onosproject.net.DeviceId; |
25 | import org.onosproject.net.Link; | 26 | import org.onosproject.net.Link; |
... | @@ -125,7 +126,7 @@ public class DefaultEdgeGroupHandler extends DefaultGroupHandler { | ... | @@ -125,7 +126,7 @@ public class DefaultEdgeGroupHandler extends DefaultGroupHandler { |
125 | newNeighborLink.dst().deviceId())) | 126 | newNeighborLink.dst().deviceId())) |
126 | .setEthSrc(nodeMacAddr) | 127 | .setEthSrc(nodeMacAddr) |
127 | .pushMpls() | 128 | .pushMpls() |
128 | - .setMpls(ns.getEdgeLabel()); | 129 | + .setMpls(MplsLabel.mplsLabel(ns.getEdgeLabel())); |
129 | GroupBucket updatedBucket = DefaultGroupBucket. | 130 | GroupBucket updatedBucket = DefaultGroupBucket. |
130 | createSelectGroupBucket(tBuilder.build()); | 131 | createSelectGroupBucket(tBuilder.build()); |
131 | GroupBuckets updatedBuckets = new GroupBuckets( | 132 | GroupBuckets updatedBuckets = new GroupBuckets( | ... | ... |
... | @@ -26,6 +26,7 @@ import java.util.List; | ... | @@ -26,6 +26,7 @@ import java.util.List; |
26 | import java.util.Set; | 26 | import java.util.Set; |
27 | 27 | ||
28 | import org.onlab.packet.MacAddress; | 28 | import org.onlab.packet.MacAddress; |
29 | +import org.onlab.packet.MplsLabel; | ||
29 | import org.onosproject.core.ApplicationId; | 30 | import org.onosproject.core.ApplicationId; |
30 | import org.onosproject.net.DeviceId; | 31 | import org.onosproject.net.DeviceId; |
31 | import org.onosproject.net.Link; | 32 | import org.onosproject.net.Link; |
... | @@ -186,7 +187,7 @@ public class DefaultGroupHandler { | ... | @@ -186,7 +187,7 @@ public class DefaultGroupHandler { |
186 | portDeviceMap.get(port))) | 187 | portDeviceMap.get(port))) |
187 | .setEthSrc(nodeMacAddr) | 188 | .setEthSrc(nodeMacAddr) |
188 | .pushMpls() | 189 | .pushMpls() |
189 | - .setMpls(ns.getEdgeLabel()); | 190 | + .setMpls(MplsLabel.mplsLabel(ns.getEdgeLabel())); |
190 | GroupBucket removeBucket = DefaultGroupBucket. | 191 | GroupBucket removeBucket = DefaultGroupBucket. |
191 | createSelectGroupBucket(tBuilder.build()); | 192 | createSelectGroupBucket(tBuilder.build()); |
192 | GroupBuckets removeBuckets = new GroupBuckets( | 193 | GroupBuckets removeBuckets = new GroupBuckets( |
... | @@ -332,7 +333,7 @@ public class DefaultGroupHandler { | ... | @@ -332,7 +333,7 @@ public class DefaultGroupHandler { |
332 | .setEthDst(deviceConfig.getDeviceMac(d)) | 333 | .setEthDst(deviceConfig.getDeviceMac(d)) |
333 | .setEthSrc(nodeMacAddr) | 334 | .setEthSrc(nodeMacAddr) |
334 | .pushMpls() | 335 | .pushMpls() |
335 | - .setMpls(ns.getEdgeLabel()); | 336 | + .setMpls(MplsLabel.mplsLabel(ns.getEdgeLabel())); |
336 | buckets.add(DefaultGroupBucket.createSelectGroupBucket( | 337 | buckets.add(DefaultGroupBucket.createSelectGroupBucket( |
337 | tBuilder.build())); | 338 | tBuilder.build())); |
338 | } | 339 | } | ... | ... |
... | @@ -19,6 +19,7 @@ import java.util.Arrays; | ... | @@ -19,6 +19,7 @@ import java.util.Arrays; |
19 | import java.util.HashSet; | 19 | import java.util.HashSet; |
20 | import java.util.Set; | 20 | import java.util.Set; |
21 | 21 | ||
22 | +import org.onlab.packet.MplsLabel; | ||
22 | import org.onosproject.core.ApplicationId; | 23 | import org.onosproject.core.ApplicationId; |
23 | import org.onosproject.net.DeviceId; | 24 | import org.onosproject.net.DeviceId; |
24 | import org.onosproject.net.Link; | 25 | import org.onosproject.net.Link; |
... | @@ -113,7 +114,7 @@ public class DefaultTransitGroupHandler extends DefaultGroupHandler { | ... | @@ -113,7 +114,7 @@ public class DefaultTransitGroupHandler extends DefaultGroupHandler { |
113 | newNeighborLink.dst().deviceId())) | 114 | newNeighborLink.dst().deviceId())) |
114 | .setEthSrc(nodeMacAddr) | 115 | .setEthSrc(nodeMacAddr) |
115 | .pushMpls() | 116 | .pushMpls() |
116 | - .setMpls(ns.getEdgeLabel()); | 117 | + .setMpls(MplsLabel.mplsLabel(ns.getEdgeLabel())); |
117 | GroupBucket updatedBucket = DefaultGroupBucket. | 118 | GroupBucket updatedBucket = DefaultGroupBucket. |
118 | createSelectGroupBucket(tBuilder.build()); | 119 | createSelectGroupBucket(tBuilder.build()); |
119 | GroupBuckets updatedBuckets = new GroupBuckets( | 120 | GroupBuckets updatedBuckets = new GroupBuckets( | ... | ... |
... | @@ -23,6 +23,7 @@ import java.util.HashMap; | ... | @@ -23,6 +23,7 @@ import java.util.HashMap; |
23 | import java.util.Iterator; | 23 | import java.util.Iterator; |
24 | import java.util.List; | 24 | import java.util.List; |
25 | 25 | ||
26 | +import org.onlab.packet.MplsLabel; | ||
26 | import org.onosproject.core.ApplicationId; | 27 | import org.onosproject.core.ApplicationId; |
27 | import org.onosproject.core.GroupId; | 28 | import org.onosproject.core.GroupId; |
28 | import org.onosproject.grouphandler.GroupBucketIdentifier.BucketOutputType; | 29 | import org.onosproject.grouphandler.GroupBucketIdentifier.BucketOutputType; |
... | @@ -111,7 +112,7 @@ public class PolicyGroupHandler extends DefaultGroupHandler { | ... | @@ -111,7 +112,7 @@ public class PolicyGroupHandler extends DefaultGroupHandler { |
111 | getDeviceMac(neighbor)) | 112 | getDeviceMac(neighbor)) |
112 | .setEthSrc(nodeMacAddr) | 113 | .setEthSrc(nodeMacAddr) |
113 | .pushMpls() | 114 | .pushMpls() |
114 | - .setMpls(label); | 115 | + .setMpls(MplsLabel.mplsLabel(label)); |
115 | outBuckets.add(DefaultGroupBucket. | 116 | outBuckets.add(DefaultGroupBucket. |
116 | createSelectGroupBucket(tBuilder.build())); | 117 | createSelectGroupBucket(tBuilder.build())); |
117 | GroupDescription desc = new | 118 | GroupDescription desc = new |
... | @@ -176,7 +177,7 @@ public class PolicyGroupHandler extends DefaultGroupHandler { | ... | @@ -176,7 +177,7 @@ public class PolicyGroupHandler extends DefaultGroupHandler { |
176 | getDeviceMac(neighbor)) | 177 | getDeviceMac(neighbor)) |
177 | .setEthSrc(nodeMacAddr) | 178 | .setEthSrc(nodeMacAddr) |
178 | .pushMpls() | 179 | .pushMpls() |
179 | - .setMpls(bucketId.label()); | 180 | + .setMpls(MplsLabel.mplsLabel(bucketId.label())); |
180 | //TODO: BoS | 181 | //TODO: BoS |
181 | outBuckets.add(DefaultGroupBucket. | 182 | outBuckets.add(DefaultGroupBucket. |
182 | createSelectGroupBucket(tBuilder.build())); | 183 | createSelectGroupBucket(tBuilder.build())); |
... | @@ -217,7 +218,7 @@ public class PolicyGroupHandler extends DefaultGroupHandler { | ... | @@ -217,7 +218,7 @@ public class PolicyGroupHandler extends DefaultGroupHandler { |
217 | TrafficTreatment.Builder tBuilder = | 218 | TrafficTreatment.Builder tBuilder = |
218 | DefaultTrafficTreatment.builder(); | 219 | DefaultTrafficTreatment.builder(); |
219 | tBuilder.pushMpls() | 220 | tBuilder.pushMpls() |
220 | - .setMpls(bucketId.label()); | 221 | + .setMpls(MplsLabel.mplsLabel(bucketId.label())); |
221 | //TODO: BoS | 222 | //TODO: BoS |
222 | if (bucketId.type() == BucketOutputType.PORT) { | 223 | if (bucketId.type() == BucketOutputType.PORT) { |
223 | DeviceId neighbor = portDeviceMap. | 224 | DeviceId neighbor = portDeviceMap. | ... | ... |
-
Please register or login to post a comment