[ONOS-4687] GoldenEye - Label map download issues.
Change-Id: I5b56ccc6b8bad3c585f4d33ddd6d9094751c8797
Showing
15 changed files
with
67 additions
and
54 deletions
... | @@ -893,9 +893,7 @@ public class PceManager implements PceService { | ... | @@ -893,9 +893,7 @@ public class PceManager implements PceService { |
893 | 893 | ||
894 | // Check whether device has SR-TE Capability | 894 | // Check whether device has SR-TE Capability |
895 | if (cfg.labelStackCap()) { | 895 | if (cfg.labelStackCap()) { |
896 | - if (!srTeHandler.allocateNodeLabel(deviceId, lsrId)) { | 896 | + srTeHandler.allocateNodeLabel(deviceId, lsrId); |
897 | - log.error("Node label allocation for a device id {} has failed.", deviceId.toString()); | ||
898 | - } | ||
899 | } | 897 | } |
900 | } | 898 | } |
901 | 899 | ||
... | @@ -974,10 +972,7 @@ public class PceManager implements PceService { | ... | @@ -974,10 +972,7 @@ public class PceManager implements PceService { |
974 | 972 | ||
975 | // Check whether device has SR-TE Capability | 973 | // Check whether device has SR-TE Capability |
976 | if (cfg.labelStackCap()) { | 974 | if (cfg.labelStackCap()) { |
977 | - if (!srTeHandler.allocateAdjacencyLabel(link)) { | 975 | + srTeHandler.allocateAdjacencyLabel(link); |
978 | - log.error("Unable to allocate adjacency label for a link {}.", link.toString()); | ||
979 | - return; | ||
980 | - } | ||
981 | } | 976 | } |
982 | 977 | ||
983 | return; | 978 | return; |
... | @@ -1209,16 +1204,13 @@ public class PceManager implements PceService { | ... | @@ -1209,16 +1204,13 @@ public class PceManager implements PceService { |
1209 | if (cfg.labelStackCap()) { | 1204 | if (cfg.labelStackCap()) { |
1210 | if (mastershipService.getLocalRole(deviceId) == MastershipRole.MASTER) { | 1205 | if (mastershipService.getLocalRole(deviceId) == MastershipRole.MASTER) { |
1211 | // Allocate node-label | 1206 | // Allocate node-label |
1212 | - if (!srTeHandler.allocateNodeLabel(deviceId, lsrId)) { | 1207 | + srTeHandler.allocateNodeLabel(deviceId, lsrId); |
1213 | - log.error("Node label allocation for a device id {} has failed.", deviceId.toString()); | ||
1214 | - } | ||
1215 | 1208 | ||
1216 | // Allocate adjacency label to links which are | 1209 | // Allocate adjacency label to links which are |
1217 | // originated from this specific device id | 1210 | // originated from this specific device id |
1218 | Set<Link> links = linkService.getDeviceEgressLinks(deviceId); | 1211 | Set<Link> links = linkService.getDeviceEgressLinks(deviceId); |
1219 | for (Link link : links) { | 1212 | for (Link link : links) { |
1220 | if (!srTeHandler.allocateAdjacencyLabel(link)) { | 1213 | if (!srTeHandler.allocateAdjacencyLabel(link)) { |
1221 | - log.debug("Unable to allocate adjacency labels for a link {}.", link.toString()); | ||
1222 | return; | 1214 | return; |
1223 | } | 1215 | } |
1224 | } | 1216 | } |
... | @@ -1240,6 +1232,7 @@ public class PceManager implements PceService { | ... | @@ -1240,6 +1232,7 @@ public class PceManager implements PceService { |
1240 | return false; | 1232 | return false; |
1241 | } | 1233 | } |
1242 | 1234 | ||
1235 | + if (pceStore.getGlobalNodeLabel(deviceId) != null) { | ||
1243 | Map<DeviceId, LabelResourceId> globalNodeLabelMap = pceStore.getGlobalNodeLabels(); | 1236 | Map<DeviceId, LabelResourceId> globalNodeLabelMap = pceStore.getGlobalNodeLabels(); |
1244 | 1237 | ||
1245 | for (Entry<DeviceId, LabelResourceId> entry : globalNodeLabelMap.entrySet()) { | 1238 | for (Entry<DeviceId, LabelResourceId> entry : globalNodeLabelMap.entrySet()) { |
... | @@ -1248,8 +1241,8 @@ public class PceManager implements PceService { | ... | @@ -1248,8 +1241,8 @@ public class PceManager implements PceService { |
1248 | Device srcDevice = deviceService.getDevice(entry.getKey()); | 1241 | Device srcDevice = deviceService.getDevice(entry.getKey()); |
1249 | 1242 | ||
1250 | /* | 1243 | /* |
1251 | - * If there is a slight difference in timing such that if device subsystem has removed the device but PCE | 1244 | + * If there is a slight difference in timing such that if device subsystem has removed the device but |
1252 | - * store still has it, just ignore such devices. | 1245 | + * PCE store still has it, just ignore such devices. |
1253 | */ | 1246 | */ |
1254 | if (srcDevice == null) { | 1247 | if (srcDevice == null) { |
1255 | continue; | 1248 | continue; |
... | @@ -1276,6 +1269,7 @@ public class PceManager implements PceService { | ... | @@ -1276,6 +1269,7 @@ public class PceManager implements PceService { |
1276 | Objective.Operation.ADD); | 1269 | Objective.Operation.ADD); |
1277 | } | 1270 | } |
1278 | } | 1271 | } |
1272 | + } | ||
1279 | 1273 | ||
1280 | srTeHandler.advertiseNodeLabelRule(deviceId, | 1274 | srTeHandler.advertiseNodeLabelRule(deviceId, |
1281 | LabelResourceId.labelResourceId(0), | 1275 | LabelResourceId.labelResourceId(0), | ... | ... |
... | @@ -28,7 +28,6 @@ import java.util.Set; | ... | @@ -28,7 +28,6 @@ import java.util.Set; |
28 | import org.onlab.packet.IpAddress; | 28 | import org.onlab.packet.IpAddress; |
29 | import org.onlab.packet.IpPrefix; | 29 | import org.onlab.packet.IpPrefix; |
30 | import org.onlab.packet.MplsLabel; | 30 | import org.onlab.packet.MplsLabel; |
31 | -import org.onlab.packet.TpPort; | ||
32 | import org.onosproject.core.ApplicationId; | 31 | import org.onosproject.core.ApplicationId; |
33 | import org.onosproject.incubator.net.resource.label.DefaultLabelResource; | 32 | import org.onosproject.incubator.net.resource.label.DefaultLabelResource; |
34 | import org.onosproject.incubator.net.resource.label.LabelResource; | 33 | import org.onosproject.incubator.net.resource.label.LabelResource; |
... | @@ -184,7 +183,7 @@ public final class PceccSrTeBeHandler { | ... | @@ -184,7 +183,7 @@ public final class PceccSrTeBeHandler { |
184 | 183 | ||
185 | // Check whether node-label was already configured for this specific device. | 184 | // Check whether node-label was already configured for this specific device. |
186 | if (pceStore.getGlobalNodeLabel(specificDeviceId) != null) { | 185 | if (pceStore.getGlobalNodeLabel(specificDeviceId) != null) { |
187 | - log.error("Node label was already configured for device {}.", specificDeviceId.toString()); | 186 | + log.debug("Node label was already configured for device {}.", specificDeviceId.toString()); |
188 | return false; | 187 | return false; |
189 | } | 188 | } |
190 | 189 | ||
... | @@ -228,13 +227,16 @@ public final class PceccSrTeBeHandler { | ... | @@ -228,13 +227,16 @@ public final class PceccSrTeBeHandler { |
228 | 227 | ||
229 | // Push to device | 228 | // Push to device |
230 | // Push label information of specificDeviceId to otherDevId in list and vice versa. | 229 | // Push label information of specificDeviceId to otherDevId in list and vice versa. |
230 | + if (!otherDevId.equals(specificDeviceId)) { | ||
231 | advertiseNodeLabelRule(otherDevId, specificLabelId, | 231 | advertiseNodeLabelRule(otherDevId, specificLabelId, |
232 | IpPrefix.valueOf(IpAddress.valueOf(specificLsrId), PREFIX_LENGTH), | 232 | IpPrefix.valueOf(IpAddress.valueOf(specificLsrId), PREFIX_LENGTH), |
233 | Objective.Operation.ADD, false); | 233 | Objective.Operation.ADD, false); |
234 | + | ||
234 | advertiseNodeLabelRule(specificDeviceId, otherLabelId, | 235 | advertiseNodeLabelRule(specificDeviceId, otherLabelId, |
235 | IpPrefix.valueOf(IpAddress.valueOf(otherLsrId), PREFIX_LENGTH), | 236 | IpPrefix.valueOf(IpAddress.valueOf(otherLsrId), PREFIX_LENGTH), |
236 | Objective.Operation.ADD, false); | 237 | Objective.Operation.ADD, false); |
237 | } | 238 | } |
239 | + } | ||
238 | 240 | ||
239 | return true; | 241 | return true; |
240 | } | 242 | } |
... | @@ -519,8 +521,8 @@ public final class PceccSrTeBeHandler { | ... | @@ -519,8 +521,8 @@ public final class PceccSrTeBeHandler { |
519 | TrafficSelector.Builder selectorBuilder = DefaultTrafficSelector.builder(); | 521 | TrafficSelector.Builder selectorBuilder = DefaultTrafficSelector.builder(); |
520 | 522 | ||
521 | selectorBuilder.matchMplsLabel(MplsLabel.mplsLabel(labelId.id().intValue())); | 523 | selectorBuilder.matchMplsLabel(MplsLabel.mplsLabel(labelId.id().intValue())); |
522 | - selectorBuilder.matchTcpSrc(TpPort.tpPort((int) srcPortNum.toLong())); | 524 | + selectorBuilder.matchIPSrc(IpPrefix.valueOf((int) srcPortNum.toLong(), 32)); |
523 | - selectorBuilder.matchTcpDst(TpPort.tpPort((int) dstPortNum.toLong())); | 525 | + selectorBuilder.matchIPDst(IpPrefix.valueOf((int) dstPortNum.toLong(), 32)); |
524 | 526 | ||
525 | TrafficTreatment treatment = DefaultTrafficTreatment.builder().build(); | 527 | TrafficTreatment treatment = DefaultTrafficTreatment.builder().build(); |
526 | 528 | ... | ... |
... | @@ -219,19 +219,19 @@ public class DistributedPceStore implements PceStore { | ... | @@ -219,19 +219,19 @@ public class DistributedPceStore implements PceStore { |
219 | @Override | 219 | @Override |
220 | public LabelResourceId getGlobalNodeLabel(DeviceId id) { | 220 | public LabelResourceId getGlobalNodeLabel(DeviceId id) { |
221 | checkNotNull(id, DEVICE_ID_NULL); | 221 | checkNotNull(id, DEVICE_ID_NULL); |
222 | - return globalNodeLabelMap.get(id).value(); | 222 | + return globalNodeLabelMap.get(id) == null ? null : globalNodeLabelMap.get(id).value(); |
223 | } | 223 | } |
224 | 224 | ||
225 | @Override | 225 | @Override |
226 | public LabelResourceId getAdjLabel(Link link) { | 226 | public LabelResourceId getAdjLabel(Link link) { |
227 | checkNotNull(link, LINK_NULL); | 227 | checkNotNull(link, LINK_NULL); |
228 | - return adjLabelMap.get(link).value(); | 228 | + return adjLabelMap.get(link) == null ? null : adjLabelMap.get(link).value(); |
229 | } | 229 | } |
230 | 230 | ||
231 | @Override | 231 | @Override |
232 | public PceccTunnelInfo getTunnelInfo(TunnelId tunnelId) { | 232 | public PceccTunnelInfo getTunnelInfo(TunnelId tunnelId) { |
233 | checkNotNull(tunnelId, TUNNEL_ID_NULL); | 233 | checkNotNull(tunnelId, TUNNEL_ID_NULL); |
234 | - return tunnelInfoMap.get(tunnelId).value(); | 234 | + return tunnelInfoMap.get(tunnelId) == null ? null : tunnelInfoMap.get(tunnelId).value(); |
235 | } | 235 | } |
236 | 236 | ||
237 | @Override | 237 | @Override | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.provider.pcep.tunnel.impl; | 16 | +package org.onosproject.pcep.controller; |
17 | 17 | ||
18 | /** | 18 | /** |
19 | * Collection of keys for annotation for PCEP tunnels. | 19 | * Collection of keys for annotation for PCEP tunnels. | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.provider.pcep.tunnel.impl; | 16 | +package org.onosproject.pcep.controller; |
17 | 17 | ||
18 | import static org.slf4j.LoggerFactory.getLogger; | 18 | import static org.slf4j.LoggerFactory.getLogger; |
19 | 19 | ... | ... |
... | @@ -62,6 +62,8 @@ import org.onosproject.pcepio.types.PcepValueType; | ... | @@ -62,6 +62,8 @@ import org.onosproject.pcepio.types.PcepValueType; |
62 | import org.slf4j.Logger; | 62 | import org.slf4j.Logger; |
63 | import org.slf4j.LoggerFactory; | 63 | import org.slf4j.LoggerFactory; |
64 | 64 | ||
65 | +import static org.onosproject.pcep.controller.PcepSyncStatus.NOT_SYNCED; | ||
66 | + | ||
65 | /** | 67 | /** |
66 | * Channel handler deals with the pcc client connection and dispatches | 68 | * Channel handler deals with the pcc client connection and dispatches |
67 | * messages from client to the appropriate locations. | 69 | * messages from client to the appropriate locations. |
... | @@ -233,6 +235,11 @@ class PcepChannelHandler extends IdleStateAwareChannelHandler { | ... | @@ -233,6 +235,11 @@ class PcepChannelHandler extends IdleStateAwareChannelHandler { |
233 | h.pcepPacketStats); | 235 | h.pcepPacketStats); |
234 | //Get pc instance and set capabilities | 236 | //Get pc instance and set capabilities |
235 | h.pc.setCapability(h.capability); | 237 | h.pc.setCapability(h.capability); |
238 | + | ||
239 | + // Initilialize DB sync status. | ||
240 | + h.pc.setLspDbSyncStatus(NOT_SYNCED); | ||
241 | + h.pc.setLabelDbSyncStatus(NOT_SYNCED); | ||
242 | + | ||
236 | // set the status of pcc as connected | 243 | // set the status of pcc as connected |
237 | h.pc.setConnected(true); | 244 | h.pc.setConnected(true); |
238 | h.pc.setChannel(h.channel); | 245 | h.pc.setChannel(h.channel); |
... | @@ -258,6 +265,7 @@ class PcepChannelHandler extends IdleStateAwareChannelHandler { | ... | @@ -258,6 +265,7 @@ class PcepChannelHandler extends IdleStateAwareChannelHandler { |
258 | log.debug("Keep alive time : " + keepAliveTimer); | 265 | log.debug("Keep alive time : " + keepAliveTimer); |
259 | 266 | ||
260 | //set the state handshake completion. | 267 | //set the state handshake completion. |
268 | + | ||
261 | h.sendKeepAliveMessage(); | 269 | h.sendKeepAliveMessage(); |
262 | h.pcepPacketStats.addOutPacket(); | 270 | h.pcepPacketStats.addOutPacket(); |
263 | h.setHandshakeComplete(true); | 271 | h.setHandshakeComplete(true); | ... | ... |
... | @@ -434,10 +434,16 @@ public class PcepClientControllerImpl implements PcepClientController { | ... | @@ -434,10 +434,16 @@ public class PcepClientControllerImpl implements PcepClientController { |
434 | } | 434 | } |
435 | 435 | ||
436 | List<PcepStateReport> syncStateRptList = pc.getSyncMsgList(pccId); | 436 | List<PcepStateReport> syncStateRptList = pc.getSyncMsgList(pccId); |
437 | + if (syncStateRptList == null) { | ||
438 | + // When there are no LSPs to sync, directly end-of-sync PCRpt will come and the | ||
439 | + // list will be null. | ||
440 | + syncStateRptList = Collections.EMPTY_LIST; | ||
441 | + } | ||
442 | + | ||
437 | Iterator<PcepStateReport> stateRptListIterator = syncStateRptList.iterator(); | 443 | Iterator<PcepStateReport> stateRptListIterator = syncStateRptList.iterator(); |
438 | 444 | ||
439 | // For every report, fetch PLSP id, local LSP id and symbolic path name from the message. | 445 | // For every report, fetch PLSP id, local LSP id and symbolic path name from the message. |
440 | - while (syncStateRptList.iterator().hasNext()) { | 446 | + while (stateRptListIterator.hasNext()) { |
441 | PcepStateReport stateRpt = stateRptListIterator.next(); | 447 | PcepStateReport stateRpt = stateRptListIterator.next(); |
442 | Tunnel tunnel = null; | 448 | Tunnel tunnel = null; |
443 | 449 | ... | ... |
... | @@ -73,7 +73,7 @@ public class PcepClientImpl implements PcepClientDriver { | ... | @@ -73,7 +73,7 @@ public class PcepClientImpl implements PcepClientDriver { |
73 | private byte sessionId; | 73 | private byte sessionId; |
74 | private PcepPacketStatsImpl pktStats; | 74 | private PcepPacketStatsImpl pktStats; |
75 | private Map<LspKey, Boolean> lspDelegationInfo; | 75 | private Map<LspKey, Boolean> lspDelegationInfo; |
76 | - private Map<PccId, List<PcepStateReport>> sycRptCache = new HashMap<>(); | 76 | + private Map<PccId, List<PcepStateReport>> syncRptCache = new HashMap<>(); |
77 | 77 | ||
78 | @Override | 78 | @Override |
79 | public void init(PccId pccId, PcepVersion pcepVersion, PcepPacketStats pktStats) { | 79 | public void init(PccId pccId, PcepVersion pcepVersion, PcepPacketStats pktStats) { |
... | @@ -267,24 +267,24 @@ public class PcepClientImpl implements PcepClientDriver { | ... | @@ -267,24 +267,24 @@ public class PcepClientImpl implements PcepClientDriver { |
267 | @Override | 267 | @Override |
268 | public void initializeSyncMsgList(PccId pccId) { | 268 | public void initializeSyncMsgList(PccId pccId) { |
269 | List<PcepStateReport> rptMsgList = new LinkedList<>(); | 269 | List<PcepStateReport> rptMsgList = new LinkedList<>(); |
270 | - sycRptCache.put(pccId, rptMsgList); | 270 | + syncRptCache.put(pccId, rptMsgList); |
271 | } | 271 | } |
272 | 272 | ||
273 | @Override | 273 | @Override |
274 | public List<PcepStateReport> getSyncMsgList(PccId pccId) { | 274 | public List<PcepStateReport> getSyncMsgList(PccId pccId) { |
275 | - return sycRptCache.get(pccId); | 275 | + return syncRptCache.get(pccId); |
276 | } | 276 | } |
277 | 277 | ||
278 | @Override | 278 | @Override |
279 | public void removeSyncMsgList(PccId pccId) { | 279 | public void removeSyncMsgList(PccId pccId) { |
280 | - sycRptCache.remove(pccId); | 280 | + syncRptCache.remove(pccId); |
281 | } | 281 | } |
282 | 282 | ||
283 | @Override | 283 | @Override |
284 | public void addSyncMsgToList(PccId pccId, PcepStateReport rptMsg) { | 284 | public void addSyncMsgToList(PccId pccId, PcepStateReport rptMsg) { |
285 | - List<PcepStateReport> rptMsgList = sycRptCache.get(pccId); | 285 | + List<PcepStateReport> rptMsgList = syncRptCache.get(pccId); |
286 | rptMsgList.add(rptMsg); | 286 | rptMsgList.add(rptMsg); |
287 | - sycRptCache.put(pccId, rptMsgList); | 287 | + syncRptCache.put(pccId, rptMsgList); |
288 | } | 288 | } |
289 | 289 | ||
290 | @Override | 290 | @Override | ... | ... |
This diff is collapsed. Click to expand it.
... | @@ -82,6 +82,7 @@ import org.onosproject.pcep.controller.PcepClientListener; | ... | @@ -82,6 +82,7 @@ import org.onosproject.pcep.controller.PcepClientListener; |
82 | import org.onosproject.pcep.controller.PcepEventListener; | 82 | import org.onosproject.pcep.controller.PcepEventListener; |
83 | import org.onosproject.pcep.controller.PcepLspStatus; | 83 | import org.onosproject.pcep.controller.PcepLspStatus; |
84 | import org.onosproject.pcep.controller.PcepLspSyncAction; | 84 | import org.onosproject.pcep.controller.PcepLspSyncAction; |
85 | +import org.onosproject.pcep.controller.SrpIdGenerators; | ||
85 | import org.onosproject.pcepio.exceptions.PcepParseException; | 86 | import org.onosproject.pcepio.exceptions.PcepParseException; |
86 | import org.onosproject.pcepio.protocol.PcInitiatedLspRequest; | 87 | import org.onosproject.pcepio.protocol.PcInitiatedLspRequest; |
87 | import org.onosproject.pcepio.protocol.PcepAttribute; | 88 | import org.onosproject.pcepio.protocol.PcepAttribute; |
... | @@ -131,13 +132,13 @@ import static org.onosproject.net.PortNumber.portNumber; | ... | @@ -131,13 +132,13 @@ import static org.onosproject.net.PortNumber.portNumber; |
131 | import static org.onosproject.pcep.api.PcepDpid.uri; | 132 | import static org.onosproject.pcep.api.PcepDpid.uri; |
132 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.WITH_SIGNALLING; | 133 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.WITH_SIGNALLING; |
133 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.SR_WITHOUT_SIGNALLING; | 134 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.SR_WITHOUT_SIGNALLING; |
134 | -import static org.onosproject.provider.pcep.tunnel.impl.PcepAnnotationKeys.BANDWIDTH; | 135 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.BANDWIDTH; |
135 | -import static org.onosproject.provider.pcep.tunnel.impl.PcepAnnotationKeys.LOCAL_LSP_ID; | 136 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.LOCAL_LSP_ID; |
136 | -import static org.onosproject.provider.pcep.tunnel.impl.PcepAnnotationKeys.LSP_SIG_TYPE; | 137 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.LSP_SIG_TYPE; |
137 | -import static org.onosproject.provider.pcep.tunnel.impl.PcepAnnotationKeys.PCC_TUNNEL_ID; | 138 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.PCC_TUNNEL_ID; |
138 | -import static org.onosproject.provider.pcep.tunnel.impl.PcepAnnotationKeys.PLSP_ID; | 139 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.PLSP_ID; |
139 | -import static org.onosproject.provider.pcep.tunnel.impl.PcepAnnotationKeys.DELEGATE; | 140 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.DELEGATE; |
140 | -import static org.onosproject.provider.pcep.tunnel.impl.PcepAnnotationKeys.COST_TYPE; | 141 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.COST_TYPE; |
141 | import static org.onosproject.provider.pcep.tunnel.impl.RequestType.CREATE; | 142 | import static org.onosproject.provider.pcep.tunnel.impl.RequestType.CREATE; |
142 | import static org.onosproject.provider.pcep.tunnel.impl.RequestType.DELETE; | 143 | import static org.onosproject.provider.pcep.tunnel.impl.RequestType.DELETE; |
143 | import static org.onosproject.provider.pcep.tunnel.impl.RequestType.LSP_STATE_RPT; | 144 | import static org.onosproject.provider.pcep.tunnel.impl.RequestType.LSP_STATE_RPT; | ... | ... |
... | @@ -23,7 +23,7 @@ import static org.onosproject.net.DefaultAnnotations.EMPTY; | ... | @@ -23,7 +23,7 @@ import static org.onosproject.net.DefaultAnnotations.EMPTY; |
23 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.WITH_SIGNALLING; | 23 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.WITH_SIGNALLING; |
24 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.SR_WITHOUT_SIGNALLING; | 24 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.SR_WITHOUT_SIGNALLING; |
25 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.WITHOUT_SIGNALLING_AND_WITHOUT_SR; | 25 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.WITHOUT_SIGNALLING_AND_WITHOUT_SR; |
26 | -import static org.onosproject.provider.pcep.tunnel.impl.PcepAnnotationKeys.LSP_SIG_TYPE; | 26 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.LSP_SIG_TYPE; |
27 | 27 | ||
28 | import java.io.IOException; | 28 | import java.io.IOException; |
29 | import java.util.ArrayList; | 29 | import java.util.ArrayList; | ... | ... |
... | @@ -23,7 +23,7 @@ import static org.hamcrest.Matchers.nullValue; | ... | @@ -23,7 +23,7 @@ import static org.hamcrest.Matchers.nullValue; |
23 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.WITH_SIGNALLING; | 23 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.WITH_SIGNALLING; |
24 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.SR_WITHOUT_SIGNALLING; | 24 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.SR_WITHOUT_SIGNALLING; |
25 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.WITHOUT_SIGNALLING_AND_WITHOUT_SR; | 25 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.WITHOUT_SIGNALLING_AND_WITHOUT_SR; |
26 | -import static org.onosproject.provider.pcep.tunnel.impl.PcepAnnotationKeys.LSP_SIG_TYPE; | 26 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.LSP_SIG_TYPE; |
27 | 27 | ||
28 | import java.io.IOException; | 28 | import java.io.IOException; |
29 | import java.util.ArrayList; | 29 | import java.util.ArrayList; | ... | ... |
... | @@ -19,12 +19,12 @@ import static org.hamcrest.MatcherAssert.assertThat; | ... | @@ -19,12 +19,12 @@ import static org.hamcrest.MatcherAssert.assertThat; |
19 | import static org.hamcrest.core.Is.is; | 19 | import static org.hamcrest.core.Is.is; |
20 | import static org.onosproject.incubator.net.tunnel.Tunnel.Type.MPLS; | 20 | import static org.onosproject.incubator.net.tunnel.Tunnel.Type.MPLS; |
21 | import static org.onosproject.incubator.net.tunnel.Tunnel.State.INIT; | 21 | import static org.onosproject.incubator.net.tunnel.Tunnel.State.INIT; |
22 | -import static org.onosproject.provider.pcep.tunnel.impl.PcepAnnotationKeys.BANDWIDTH; | 22 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.BANDWIDTH; |
23 | -import static org.onosproject.provider.pcep.tunnel.impl.PcepAnnotationKeys.LOCAL_LSP_ID; | 23 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.LOCAL_LSP_ID; |
24 | -import static org.onosproject.provider.pcep.tunnel.impl.PcepAnnotationKeys.LSP_SIG_TYPE; | 24 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.LSP_SIG_TYPE; |
25 | -import static org.onosproject.provider.pcep.tunnel.impl.PcepAnnotationKeys.PCC_TUNNEL_ID; | 25 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.PCC_TUNNEL_ID; |
26 | -import static org.onosproject.provider.pcep.tunnel.impl.PcepAnnotationKeys.PLSP_ID; | 26 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.PLSP_ID; |
27 | -import static org.onosproject.provider.pcep.tunnel.impl.PcepAnnotationKeys.DELEGATE; | 27 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.DELEGATE; |
28 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.WITHOUT_SIGNALLING_AND_WITHOUT_SR; | 28 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.WITHOUT_SIGNALLING_AND_WITHOUT_SR; |
29 | import static org.onosproject.pcep.controller.PcepSyncStatus.SYNCED; | 29 | import static org.onosproject.pcep.controller.PcepSyncStatus.SYNCED; |
30 | import static org.onosproject.net.Device.Type.ROUTER; | 30 | import static org.onosproject.net.Device.Type.ROUTER; | ... | ... |
... | @@ -20,7 +20,7 @@ import static org.hamcrest.Matchers.nullValue; | ... | @@ -20,7 +20,7 @@ import static org.hamcrest.Matchers.nullValue; |
20 | import static org.hamcrest.core.IsNot.not; | 20 | import static org.hamcrest.core.IsNot.not; |
21 | import static org.onosproject.net.DefaultAnnotations.EMPTY; | 21 | import static org.onosproject.net.DefaultAnnotations.EMPTY; |
22 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.WITH_SIGNALLING; | 22 | import static org.onosproject.provider.pcep.tunnel.impl.LspType.WITH_SIGNALLING; |
23 | -import static org.onosproject.provider.pcep.tunnel.impl.PcepAnnotationKeys.LSP_SIG_TYPE; | 23 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.LSP_SIG_TYPE; |
24 | 24 | ||
25 | import java.io.IOException; | 25 | import java.io.IOException; |
26 | import java.util.ArrayList; | 26 | import java.util.ArrayList; | ... | ... |
... | @@ -20,7 +20,9 @@ import static org.hamcrest.Matchers.nullValue; | ... | @@ -20,7 +20,9 @@ import static org.hamcrest.Matchers.nullValue; |
20 | import static org.hamcrest.core.Is.is; | 20 | import static org.hamcrest.core.Is.is; |
21 | import static org.hamcrest.core.IsNot.not; | 21 | import static org.hamcrest.core.IsNot.not; |
22 | import static org.onosproject.net.DefaultAnnotations.EMPTY; | 22 | import static org.onosproject.net.DefaultAnnotations.EMPTY; |
23 | -import static org.onosproject.provider.pcep.tunnel.impl.PcepAnnotationKeys.LSP_SIG_TYPE; | 23 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.LSP_SIG_TYPE; |
24 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.LOCAL_LSP_ID; | ||
25 | +import static org.onosproject.pcep.controller.PcepAnnotationKeys.PLSP_ID; | ||
24 | 26 | ||
25 | import java.io.IOException; | 27 | import java.io.IOException; |
26 | import java.util.ArrayList; | 28 | import java.util.ArrayList; |
... | @@ -112,8 +114,8 @@ public class PcepUpdateTunnelProviderTest { | ... | @@ -112,8 +114,8 @@ public class PcepUpdateTunnelProviderTest { |
112 | path = new DefaultPath(pid, links, 20, EMPTY); | 114 | path = new DefaultPath(pid, links, 20, EMPTY); |
113 | 115 | ||
114 | Annotations annotations = DefaultAnnotations.builder() | 116 | Annotations annotations = DefaultAnnotations.builder() |
115 | - .set(PcepAnnotationKeys.PLSP_ID, "1") | 117 | + .set(PLSP_ID, "1") |
116 | - .set(PcepAnnotationKeys.LOCAL_LSP_ID, "1") | 118 | + .set(LOCAL_LSP_ID, "1") |
117 | .set(LSP_SIG_TYPE, WITH_SIGNALLING.name()) | 119 | .set(LSP_SIG_TYPE, WITH_SIGNALLING.name()) |
118 | .build(); | 120 | .build(); |
119 | 121 | ||
... | @@ -173,8 +175,8 @@ public class PcepUpdateTunnelProviderTest { | ... | @@ -173,8 +175,8 @@ public class PcepUpdateTunnelProviderTest { |
173 | 175 | ||
174 | Annotations annotations = DefaultAnnotations.builder() | 176 | Annotations annotations = DefaultAnnotations.builder() |
175 | .set(LSP_SIG_TYPE, WITH_SIGNALLING.name()) | 177 | .set(LSP_SIG_TYPE, WITH_SIGNALLING.name()) |
176 | - .set(PcepAnnotationKeys.PLSP_ID, "1") | 178 | + .set(PLSP_ID, "1") |
177 | - .set(PcepAnnotationKeys.LOCAL_LSP_ID, "1") | 179 | + .set(LOCAL_LSP_ID, "1") |
178 | .build(); | 180 | .build(); |
179 | 181 | ||
180 | tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS, | 182 | tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS, |
... | @@ -233,8 +235,8 @@ public class PcepUpdateTunnelProviderTest { | ... | @@ -233,8 +235,8 @@ public class PcepUpdateTunnelProviderTest { |
233 | 235 | ||
234 | Annotations annotations = DefaultAnnotations.builder() | 236 | Annotations annotations = DefaultAnnotations.builder() |
235 | .set(LSP_SIG_TYPE, SR_WITHOUT_SIGNALLING.name()) | 237 | .set(LSP_SIG_TYPE, SR_WITHOUT_SIGNALLING.name()) |
236 | - .set(PcepAnnotationKeys.PLSP_ID, "1") | 238 | + .set(PLSP_ID, "1") |
237 | - .set(PcepAnnotationKeys.LOCAL_LSP_ID, "1") | 239 | + .set(LOCAL_LSP_ID, "1") |
238 | .build(); | 240 | .build(); |
239 | 241 | ||
240 | tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS, | 242 | tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS, |
... | @@ -293,8 +295,8 @@ public class PcepUpdateTunnelProviderTest { | ... | @@ -293,8 +295,8 @@ public class PcepUpdateTunnelProviderTest { |
293 | 295 | ||
294 | Annotations annotations = DefaultAnnotations.builder() | 296 | Annotations annotations = DefaultAnnotations.builder() |
295 | .set(LSP_SIG_TYPE, WITHOUT_SIGNALLING_AND_WITHOUT_SR.name()) | 297 | .set(LSP_SIG_TYPE, WITHOUT_SIGNALLING_AND_WITHOUT_SR.name()) |
296 | - .set(PcepAnnotationKeys.PLSP_ID, "1") | 298 | + .set(PLSP_ID, "1") |
297 | - .set(PcepAnnotationKeys.LOCAL_LSP_ID, "1") | 299 | + .set(LOCAL_LSP_ID, "1") |
298 | .build(); | 300 | .build(); |
299 | 301 | ||
300 | tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS, | 302 | tunnel = new DefaultTunnel(pid, ipTunnelEndPointSrc, ipTunnelEndPointDst, Tunnel.Type.MPLS, | ... | ... |
-
Please register or login to post a comment