Committed by
Gerrit Code Review
[ONOS-4707] GoldenEye - SR-TE LSPs setup issues
Change-Id: I03f169147227876323cac1315975b57f52d514b5
Showing
2 changed files
with
8 additions
and
9 deletions
| ... | @@ -254,6 +254,7 @@ public class PceManager implements PceService { | ... | @@ -254,6 +254,7 @@ public class PceManager implements PceService { |
| 254 | 254 | ||
| 255 | tunnelConsumerIdGen = coreService.getIdGenerator(TUNNEL_CONSUMER_ID_GEN_TOPIC); | 255 | tunnelConsumerIdGen = coreService.getIdGenerator(TUNNEL_CONSUMER_ID_GEN_TOPIC); |
| 256 | localLspIdIdGen = coreService.getIdGenerator(LOCAL_LSP_ID_GEN_TOPIC); | 256 | localLspIdIdGen = coreService.getIdGenerator(LOCAL_LSP_ID_GEN_TOPIC); |
| 257 | + localLspIdIdGen.getNewId(); // To prevent 0, the 1st value generated from being used in protocol. | ||
| 257 | localLspIdFreeList = storageService.<Short>setBuilder() | 258 | localLspIdFreeList = storageService.<Short>setBuilder() |
| 258 | .withName("pcepLocalLspIdDeletedList") | 259 | .withName("pcepLocalLspIdDeletedList") |
| 259 | .withSerializer(Serializer.using(KryoNamespaces.API)) | 260 | .withSerializer(Serializer.using(KryoNamespaces.API)) | ... | ... |
| ... | @@ -1091,15 +1091,6 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid | ... | @@ -1091,15 +1091,6 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid |
| 1091 | pcepTunnelApiMapper.addToCoreTunnelRequestQueue(pcepTunnelData); | 1091 | pcepTunnelApiMapper.addToCoreTunnelRequestQueue(pcepTunnelData); |
| 1092 | int srpId = SrpIdGenerators.create(); | 1092 | int srpId = SrpIdGenerators.create(); |
| 1093 | TunnelId tunnelId = tunnel.tunnelId(); | 1093 | TunnelId tunnelId = tunnel.tunnelId(); |
| 1094 | - int plspId = 0; | ||
| 1095 | - | ||
| 1096 | - if (!(pcepTunnelApiMapper.checkFromTunnelDBQueue(tunnelId))) { | ||
| 1097 | - log.error("Tunnel doesnot exists. Tunnel id {}" + tunnelId.toString()); | ||
| 1098 | - return; | ||
| 1099 | - } else { | ||
| 1100 | - PcepTunnelData pcepTunnelDbData = pcepTunnelApiMapper.getDataFromTunnelDBQueue(tunnelId); | ||
| 1101 | - plspId = pcepTunnelDbData.plspId(); | ||
| 1102 | - } | ||
| 1103 | 1094 | ||
| 1104 | PcepValueType tlv; | 1095 | PcepValueType tlv; |
| 1105 | LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>(); | 1096 | LinkedList<PcepValueType> llOptionalTlv = new LinkedList<PcepValueType>(); |
| ... | @@ -1121,8 +1112,11 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid | ... | @@ -1121,8 +1112,11 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid |
| 1121 | 1112 | ||
| 1122 | String localLspIdString = tunnel.annotations().value(LOCAL_LSP_ID); | 1113 | String localLspIdString = tunnel.annotations().value(LOCAL_LSP_ID); |
| 1123 | String pccTunnelIdString = tunnel.annotations().value(PCC_TUNNEL_ID); | 1114 | String pccTunnelIdString = tunnel.annotations().value(PCC_TUNNEL_ID); |
| 1115 | + String pLspIdString = tunnel.annotations().value(PLSP_ID); | ||
| 1116 | + | ||
| 1124 | short localLspId = 0; | 1117 | short localLspId = 0; |
| 1125 | short pccTunnelId = 0; | 1118 | short pccTunnelId = 0; |
| 1119 | + int plspId = 0; | ||
| 1126 | 1120 | ||
| 1127 | if (localLspIdString != null) { | 1121 | if (localLspIdString != null) { |
| 1128 | localLspId = Short.valueOf(localLspIdString); | 1122 | localLspId = Short.valueOf(localLspIdString); |
| ... | @@ -1132,6 +1126,10 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid | ... | @@ -1132,6 +1126,10 @@ public class PcepTunnelProvider extends AbstractProvider implements TunnelProvid |
| 1132 | pccTunnelId = Short.valueOf(pccTunnelIdString); | 1126 | pccTunnelId = Short.valueOf(pccTunnelIdString); |
| 1133 | } | 1127 | } |
| 1134 | 1128 | ||
| 1129 | + if (pLspIdString != null) { | ||
| 1130 | + plspId = Integer.valueOf(pLspIdString); | ||
| 1131 | + } | ||
| 1132 | + | ||
| 1135 | tlv = new StatefulIPv4LspIdentifiersTlv((((IpTunnelEndPoint) tunnel.src()) | 1133 | tlv = new StatefulIPv4LspIdentifiersTlv((((IpTunnelEndPoint) tunnel.src()) |
| 1136 | .ip().getIp4Address().toInt()), | 1134 | .ip().getIp4Address().toInt()), |
| 1137 | localLspId, pccTunnelId, 0, (((IpTunnelEndPoint) tunnel.dst()).ip() | 1135 | localLspId, pccTunnelId, 0, (((IpTunnelEndPoint) tunnel.dst()).ip() | ... | ... |
-
Please register or login to post a comment