https://docs.opendaylight.org/projects/integration-distribution/en/latest/platform-versions.html
- upgrade pom to use ODL Magnesium target dev dependecies
https://wiki.opendaylight.org/view/Magnesium_platform_upgrade
- force jsr305 version
- disable SpotBugs enforcement in artifacts when needed
- UintXX yangtools migration
https://git.opendaylight.org/gerrit/c/mdsal/+/83960
- migrate class BindingStreamEventWriter
from org.opendaylight.yangtools.yang.binding package
to org.opendaylight.mdsal.binding.dom.codec.api
- unforce maven-bundle-plugin version in api/pom.xml
and ordmodels/device/pom.xml build sections
- unfoce iana-afn-safi version in ordmodels/device/pom.xml dependencies
TODO:
for next changes to come in the release:
- migrate Junit to yangtools UintXX
- propose fixes to reactivate SpotBugs enforcement
and get rid of "deprecated marked for removal"
JIRA: TRNSPRTPCE-198
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I20dfe87985a1273e3f0864e6a4d26880fc80d197
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
- <version>4.0.11</version>
+ <version>5.0.9</version>
<relativePath/>
</parent>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <version>3.0.1</version>
+ <!--version>3.0.1</version-->
<extensions>true</extensions>
<configuration>
<instructions>
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
- <version>4.0.11</version>
+ <version>5.0.9</version>
<relativePath />
</parent>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>netconf-artifacts</artifactId>
- <version>1.7.2-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-artifacts</artifactId>
- <version>4.0.11</version>
+ <version>5.0.9</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
+ <version>3.0.2</version>
<optional>true</optional>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
+
+<!-- checkstyle and spotbugds enforced by odlparent since Magnesium -->
+ <properties>
+ <!-- odlparent.checkstyle.enforce>false</odlparent.checkstyle.enforce -->
+ <odlparent.spotbugs.enforce>false</odlparent.spotbugs.enforce>
+ </properties>
+
</project>
*/
private SchemaContext getSchemaContext(List<YangModuleInfo> moduleInfos) {
this.moduleInfoBackedCntxt.addModuleInfos(moduleInfos);
- Optional<SchemaContext> tryToCreateSchemaContext =
- this.moduleInfoBackedCntxt.tryToCreateSchemaContext();
+ Optional<? extends SchemaContext> tryToCreateSchemaContext =
+ this.moduleInfoBackedCntxt.tryToCreateSchemaContext();
if (!tryToCreateSchemaContext.isPresent()) {
LOG.error("Could not create the initial schema context. Schema context is empty");
throw new IllegalStateException();
// Get value for max Srg from info subtree, required for iteration
// if not present assume to be 20 (temporary)
if (ordmInfo.getMaxSrgs() != null) {
- maxSrg = ordmInfo.getMaxSrgs();
+ maxSrg = ordmInfo.getMaxSrgs().toJava();
} else {
maxSrg = 20;
}
Timeouts.DEVICE_READ_TIMEOUT, Timeouts.DEVICE_READ_TIMEOUT_UNIT);
if (ordmSrgObject.isPresent()) {
srgCps.addAll(ordmSrgObject.get().getCircuitPacks());
- cpPerSrg.put(ordmSrgObject.get().getSrgNumber(), srgCps);
+ cpPerSrg.put(ordmSrgObject.get().getSrgNumber().toJava(), srgCps);
}
}
LOG.info("Device {} has {} Srg", deviceId, cpPerSrg.size());
// Get value for max degree from info subtree, required for iteration
// if not present assume to be 20 (temporary)
if (ordmInfo.getMaxDegrees() != null) {
- maxDegree = ordmInfo.getMaxDegrees();
+ maxDegree = ordmInfo.getMaxDegrees().toJava();
} else {
maxDegree = 20;
}
Integer maxDegree;
if (ordmInfo.getMaxDegrees() != null) {
- maxDegree = ordmInfo.getMaxDegrees();
+ maxDegree = ordmInfo.getMaxDegrees().toJava();
} else {
maxDegree = 20;
}
for (Xponder xponder:deviceObject.get().getXponder()) {
line = 1;
client = 1;
- Integer xponderNb = xponder.getXpdrNumber();
+ Integer xponderNb = xponder.getXpdrNumber().toJava();
XpdrNodeTypes xponderType = xponder.getXpdrType();
for (XpdrPort xpdrPort : xponder.getXpdrPort()) {
String circuitPackName = xpdrPort.getCircuitPackName();
// Get value for max Srg from info subtree, required for iteration
// if not present assume to be 20 (temporary)
if (ordmInfo.getMaxSrgs() != null) {
- maxSrg = ordmInfo.getMaxSrgs();
+ maxSrg = ordmInfo.getMaxSrgs().toJava();
} else {
maxSrg = 20;
}
Timeouts.DEVICE_READ_TIMEOUT, Timeouts.DEVICE_READ_TIMEOUT_UNIT);
if (ordmSrgObject.isPresent()) {
srgCps.addAll(ordmSrgObject.get().getCircuitPacks());
- cpPerSrg.put(ordmSrgObject.get().getSrgNumber(), srgCps);
+ cpPerSrg.put(ordmSrgObject.get().getSrgNumber().toJava(), srgCps);
}
}
LOG.info("Device {} has {} Srg", deviceId, cpPerSrg.size());
// Get value for max degree from info subtree, required for iteration
// if not present assume to be 20 (temporary)
if (ordmInfo.getMaxDegrees() != null) {
- maxDegree = ordmInfo.getMaxDegrees();
+ maxDegree = ordmInfo.getMaxDegrees().toJava();
} else {
maxDegree = 20;
}
Integer maxDegree;
if (ordmInfo.getMaxDegrees() != null) {
- maxDegree = ordmInfo.getMaxDegrees();
+ maxDegree = ordmInfo.getMaxDegrees().toJava();
} else {
maxDegree = 20;
}
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>5.0.5</version>
+ <version>6.0.4</version>
<relativePath/>
</parent>
<name>OpenDaylight :: transportpce :: api</name>
<properties>
- <netconf.version>1.7.2-SNAPSHOT</netconf.version>
+ <netconf.version>1.8.0-SNAPSHOT</netconf.version>
<configfile.directory>etc/opendaylight/karaf</configfile.directory>
</properties>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>5.0.5</version>
+ <version>6.0.4</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>5.0.5</version>
+ <version>6.0.4</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>5.0.5</version>
+ <version>6.0.4</version>
<relativePath/>
</parent>
<name>OpenDaylight :: transportpce</name>
<properties>
- <mdsal.version>1.10.2-SNAPSHOT</mdsal.version>
- <netconf.version>1.7.2-SNAPSHOT</netconf.version>
- <restconf.version>1.10.2-SNAPSHOT</restconf.version>
+ <mdsal.version>1.11.0-SNAPSHOT</mdsal.version>
+ <netconf.version>1.8.0-SNAPSHOT</netconf.version>
+ <restconf.version>1.11.0-SNAPSHOT</restconf.version>
<configfile.directory>etc/opendaylight/karaf</configfile.directory>
</properties>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>5.0.5</version>
+ <version>6.0.4</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
- <version>4.0.11</version>
+ <version>5.0.9</version>
<relativePath />
</parent>
<version>${project.version}</version>
</dependency>
</dependencies>
+
+<!-- checkstyle and spotbugds enforced by odlparent since Magnesium -->
+ <properties>
+ <!-- odlparent.checkstyle.enforce>false</odlparent.checkstyle.enforce -->
+ <odlparent.spotbugs.enforce>false</odlparent.spotbugs.enforce>
+ </properties>
+
</project>
String startTimetampStr = getCurrentTimestamp();
String nodeId = prepareDashString(deviceInfo.getNodeId());
- Long nodeNumber = deviceInfo.getNodeNumber();
+ Long nodeNumber = deviceInfo.getNodeNumber().toJava();
String nodeTypeEnu = deviceInfo.getNodeType().getName();
String clli = prepareDashString(deviceInfo.getClli());
String vendor = prepareDashString(deviceInfo.getVendor());
//String serialId = "";
String nodeId = prepareDashString(deviceInfo.getNodeId());
- Long nodeNumber = deviceInfo.getNodeNumber();
+ Long nodeNumber = deviceInfo.getNodeNumber().toJava();
Integer nodeTypeEnu = deviceInfo.getNodeType().getIntValue();
String clli = prepareDashString(deviceInfo.getClli());
String vendor = prepareDashString(deviceInfo.getVendor());
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>karaf4-parent</artifactId>
- <version>5.0.5</version>
+ <version>6.0.4</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>bundle-parent</artifactId>
- <version>5.0.5</version>
+ <version>6.0.4</version>
<relativePath/>
</parent>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
+ <version>3.0.2</version>
<optional>true</optional>
</dependency>
</dependencies>
+
+<!-- checkstyle and spotbugds enforced by odlparent since Magnesium -->
+ <properties>
+ <!-- odlparent.checkstyle.enforce>false</odlparent.checkstyle.enforce -->
+ <odlparent.spotbugs.enforce>false</odlparent.spotbugs.enforce>
+ </properties>
+
</project>
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
- <version>4.0.11</version>
+ <version>5.0.9</version>
<relativePath/>
</parent>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
+ <version>3.0.2</version>
<optional>true</optional>
</dependency>
</dependencies>
+
+<!-- checkstyle and spotbugds enforced by odlparent since Magnesium -->
+ <properties>
+ <!-- odlparent.checkstyle.enforce>false</odlparent.checkstyle.enforce -->
+ <odlparent.spotbugs.enforce>false</odlparent.spotbugs.enforce>
+ </properties>
+
</project>
String nodeId = input.getNodes().get(i).getNodeId();
String srcTpId = input.getNodes().get(i).getSrcTp();
String destTpId = input.getNodes().get(i).getDestTp();
- Long wlNumber = input.getWaveNumber();
+ Long wlNumber = input.getWaveNumber().toJava();
String connectionNumber = srcTpId + "-" + destTpId + "-" + wlNumber;
if (destTpId.toLowerCase().contains("srg")) {
crossConnect.setPowerLevel(nodeId, OpticalControlMode.Off, null, connectionNumber);
package org.opendaylight.transportpce.olm;
import com.google.common.util.concurrent.ListenableFuture;
-import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.types.rev161014.ResourceTypeEnum;
import org.opendaylight.yangtools.yang.common.RpcResult;
import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
+import org.opendaylight.yangtools.yang.common.Uint64;
public class OlmPowerServiceRpcImplTest extends AbstractTest {
.setPmParameterName(new PmParameterNameBuilder()
.setExtension("123")
.setType(PmNamesEnum.DefectSeconds).build())
- .setPmParameterValue(new PmDataType(BigInteger.valueOf(1234))).build())
+ .setPmParameterValue(new PmDataType(Uint64.valueOf(1234))).build())
.build();
List<Measurements> measurementsList = new ArrayList<Measurements>();
measurementsList.add(measurements);
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
- <version>4.0.11</version>
+ <version>5.0.9</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
- <version>4.0.11</version>
+ <version>5.0.9</version>
<relativePath/>
</parent>
<dependency>
<groupId>org.opendaylight.netconf</groupId>
<artifactId>netconf-artifacts</artifactId>
- <version>1.7.2-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.opendaylight.mdsal.model</groupId>
<artifactId>iana-afn-safi</artifactId>
- <version>2013.07.04.16.3</version>
+ <!--version>2013.07.04.17.9</version-->
</dependency>
<dependency>
<groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <version>3.0.1</version>
+ <!--version>3.0.1</version-->
<extensions>true</extensions>
<configuration>
<instructions>
</plugin>
</plugins>
</build>
+
</project>
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
- <version>4.0.11</version>
+ <version>5.0.9</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
- <version>4.0.11</version>
+ <version>5.0.9</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
- <version>4.0.11</version>
+ <version>5.0.9</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
- <version>4.0.11</version>
+ <version>5.0.9</version>
<relativePath/>
</parent>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
+ <version>3.0.2</version>
<optional>true</optional>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
+
+<!-- checkstyle and spotbugds enforced by odlparent since Magnesium -->
+ <properties>
+ <!-- odlparent.checkstyle.enforce>false</odlparent.checkstyle.enforce -->
+ <odlparent.spotbugs.enforce>false</odlparent.spotbugs.enforce>
+ </properties>
+
</project>
Latency latency = tmpGeneral.getLatency();
if (latency != null) {
- constraints.setMaxLatency(latency.getMaxLatency());
+ constraints.setMaxLatency(latency.getMaxLatency().toJava());
LOG.info("In readGeneralContrains: read latency {}", latency.toString());
}
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ztoa.direction.ZToA;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.pce.resource.resource.Resource;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
+import org.opendaylight.yangtools.yang.common.Uint32;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/*
* Construct the GnpyServiceImpl
*/
- public GnpyServiceImpl(PathComputationRequestInput input, AToZDirection atoz, Long requestId, GnpyTopoImpl gnpyTopo,
- PceConstraints pceHardConstraints) throws GnpyException {
+ public GnpyServiceImpl(PathComputationRequestInput input, AToZDirection atoz, Uint32 requestId,
+ GnpyTopoImpl gnpyTopo, PceConstraints pceHardConstraints) throws GnpyException {
this.elements = gnpyTopo.getElements();
this.mapDisgNodeRefNode = gnpyTopo.getMapDisgNodeRefNode();
this.mapNodeRefIp = gnpyTopo.getMapNodeRefIp();
this.mapFiberIp = gnpyTopo.getMapFiberIp();
this.trxList = gnpyTopo.getTrxList();
try {
- this.pathRequest = extractPathRequest(input, atoz, requestId, pceHardConstraints);
+ this.pathRequest = extractPathRequest(input, atoz, requestId.toJava(), pceHardConstraints);
this.synchronization = extractSynchronization(requestId);
} catch (NullPointerException e) {
throw new GnpyException("In GnpyServiceImpl: one of the elements is null",e);
}
}
- public GnpyServiceImpl(PathComputationRequestInput input, ZToADirection ztoa, Long requestId, GnpyTopoImpl gnpyTopo,
- PceConstraints pceHardConstraints) throws GnpyException {
+ public GnpyServiceImpl(PathComputationRequestInput input, ZToADirection ztoa, Uint32 requestId,
+ GnpyTopoImpl gnpyTopo, PceConstraints pceHardConstraints) throws GnpyException {
this.elements = gnpyTopo.getElements();
this.mapDisgNodeRefNode = gnpyTopo.getMapDisgNodeRefNode();
this.mapNodeRefIp = gnpyTopo.getMapNodeRefIp();
this.mapFiberIp = gnpyTopo.getMapFiberIp();
this.trxList = gnpyTopo.getTrxList();
try {
- pathRequest = extractPathRequest(input, ztoa, requestId, pceHardConstraints);
+ pathRequest = extractPathRequest(input, ztoa, requestId.toJava(), pceHardConstraints);
synchronization = extractSynchronization(requestId);
} catch (NullPointerException e) {
throw new GnpyException("In GnpyServiceImpl: one of the elements of service is null",e);
ExplicitRouteObjects explicitRouteObjects = new ExplicitRouteObjectsBuilder()
.setRouteObjectIncludeExclude(routeObjectIncludeExcludes).build();
//Create Path Constraint
- PathConstraints pathConstraints = createPathConstraints(atoz.getRate(),atoz.getAToZWavelengthNumber());
+ PathConstraints pathConstraints =
+ createPathConstraints(atoz.getRate().toJava(),atoz.getAToZWavelengthNumber().toJava());
// Create the path request
List<PathRequest> pathRequestList = new ArrayList<>();
if (element.getUid().contains(ipAddress.getIpv4Address().getValue())) {
if ((this.currentNodeIpAddress == null) || (this.currentNodeIpAddress != ipAddress)) {
this.currentNodeIpAddress = ipAddress;
- RouteObjectIncludeExclude routeObjectIncludeExclude = addRouteObjectIncludeExclude(ipAddress, 1);
+ RouteObjectIncludeExclude routeObjectIncludeExclude =
+ addRouteObjectIncludeExclude(ipAddress, Uint32.valueOf(1));
routeObjectIncludeExcludes.add(routeObjectIncludeExclude);
index++;
found = true;
throw new GnpyException(String.format("In gnpyServiceImpl addNodeRouteObject : fiberIp of %s is null",
subLink));
}
- RouteObjectIncludeExclude routeObjectIncludeExclude = addRouteObjectIncludeExclude(fiberIp, 1);
+ RouteObjectIncludeExclude routeObjectIncludeExclude =
+ addRouteObjectIncludeExclude(fiberIp, Uint32.valueOf(1));
routeObjectIncludeExcludes.add(routeObjectIncludeExclude);
index++;
}
}
// Add routeObjectIncludeExclude
- private RouteObjectIncludeExclude addRouteObjectIncludeExclude(IpAddress ipAddress, long teTpValue) {
+ private RouteObjectIncludeExclude addRouteObjectIncludeExclude(IpAddress ipAddress, Uint32 teTpValue) {
TeNodeId teNodeId = new TeNodeId(ipAddress);
TeTpId teTpId = new TeTpId(teTpValue);
NumUnnumHop numUnnumHop = new org.opendaylight.yang.gen.v1.gnpy.path.rev200202.explicit.route.hop.type.num
}
//Create the synchronization
- private List<Synchronization> extractSynchronization(Long requestId) {
+ private List<Synchronization> extractSynchronization(Uint32 requestId) {
// Create RequestIdNumber
- List<Long> requestIdNumber = new ArrayList<>();
+ List<Uint32> requestIdNumber = new ArrayList<>();
requestIdNumber.add(requestId);
// Create a synchronization
Svec svec = new SvecBuilder().setRelaxable(true)
this.synchronization = synchronization;
}
-}
\ No newline at end of file
+}
// Compute the length of the link
List<LinkConcatenation> linkConcatenationList = span.getLinkConcatenation();
for (LinkConcatenation linkConcatenation : linkConcatenationList) {
- double srlgLength = linkConcatenation.getSRLGLength();
+ double srlgLength = linkConcatenation.getSRLGLength().toJava();
//convert to kilometer
length += srlgLength / CONVERT_KM_M;
}
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.routing.constraints.rev171017.routing.constraints.sp.HardConstraints;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
+import org.opendaylight.yangtools.yang.common.Uint32;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private GnpyTopoImpl gnpyTopo = null;
private GnpyResult gnpyAtoZ;
private GnpyResult gnpyZtoA;
- private Long requestId;
+ private Uint32 requestId;
public GnpyUtilitiesImpl(NetworkTransactionService networkTransaction, PathComputationRequestInput input)
throws GnpyException {
this.input = input;
this.gnpyAtoZ = null;
this.gnpyZtoA = null;
- this.requestId = (long) 0;
+ this.requestId = Uint32.valueOf(0);
}
public boolean verifyComputationByGnpy(AToZDirection atoz, ZToADirection ztoa, PceConstraints pceHardConstraints)
}
public GnpyResult gnpyResponseOneDirection(GnpyServiceImpl gnpySvc) throws GnpyException, Exception {
- requestId++;
+ requestId = Uint32.valueOf((requestId.toJava()) + 1);
List<PathRequest> pathRequestList = gnpySvc.getPathRequest();
List<Synchronization> synchronizationList = gnpySvc.getSynchronization();
// Send the computed path to GNPY tool
import org.opendaylight.transportpce.pce.networkanalyzer.PceResult;
import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmLinkType;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
+import org.opendaylight.yangtools.yang.common.Uint16;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
case "1GE":
pceResult.setRC(ResponseCodes.RESPONSE_FAILED);
pceResult.setServiceType(serviceType);
- Map<String, Integer> tribPort = chooseTribPort(path, allPceNodes);
- Map<String, List<Integer>> tribSlot = chooseTribSlot(path, allPceNodes, tribSlotNb);
+ Map<String, Uint16> tribPort = chooseTribPort(path, allPceNodes);
+ Map<String, List<Uint16>> tribSlot = chooseTribSlot(path, allPceNodes, tribSlotNb);
if (tribPort != null && tribSlot != null) {
pceResult.setResultTribPort(tribPort);
return listOfElements;
}
- private Map<String, Integer> chooseTribPort(GraphPath<String,
+ private Map<String, Uint16> chooseTribPort(GraphPath<String,
PceGraphEdge> path, Map<NodeId, PceNode> allPceNodes) {
LOG.info("In choosetribPort: edgeList = {} ", path.getEdgeList().toString());
- Map<String, Integer> tribPortMap = new HashMap<>();
+ Map<String, Uint16> tribPortMap = new HashMap<>();
for (PceGraphEdge edge : path.getEdgeList()) {
NodeId linkSrcNode = edge.link().getSourceId();
String linkDestTp = edge.link().getDestTP().toString();
PceNode pceOtnNodeSrc = allPceNodes.get(linkSrcNode);
PceNode pceOtnNodeDest = allPceNodes.get(linkDestNode);
- List<Integer> srcTpnPool = pceOtnNodeSrc.getAvailableTribPorts().get(linkSrcTp);
- List<Integer> destTpnPool = pceOtnNodeDest.getAvailableTribPorts().get(linkDestTp);
- List<Integer> commonEdgeTpnPool = new ArrayList<>();
- for (Integer integer : srcTpnPool) {
+ List<Uint16> srcTpnPool = pceOtnNodeSrc.getAvailableTribPorts().get(linkSrcTp);
+ List<Uint16> destTpnPool = pceOtnNodeDest.getAvailableTribPorts().get(linkDestTp);
+ List<Uint16> commonEdgeTpnPool = new ArrayList<>();
+ for (Uint16 integer : srcTpnPool) {
if (destTpnPool.contains(integer)) {
commonEdgeTpnPool.add(integer);
}
return tribPortMap;
}
- private Map<String, List<Integer>> chooseTribSlot(GraphPath<String,
+ private Map<String, List<Uint16>> chooseTribSlot(GraphPath<String,
PceGraphEdge> path, Map<NodeId, PceNode> allPceNodes, int nbSlot) {
LOG.info("In choosetribSlot2: edgeList = {} ", path.getEdgeList().toString());
- Map<String, List<Integer>> tribSlotMap = new HashMap<>();
+ Map<String, List<Uint16>> tribSlotMap = new HashMap<>();
for (PceGraphEdge edge : path.getEdgeList()) {
NodeId linkSrcNode = edge.link().getSourceId();
String linkDestTp = edge.link().getDestTP().toString();
PceNode pceOtnNodeSrc = allPceNodes.get(linkSrcNode);
PceNode pceOtnNodeDest = allPceNodes.get(linkDestNode);
- List<Integer> srcTsPool = pceOtnNodeSrc.getAvailableTribSlots().get(linkSrcTp);
- List<Integer> destTsPool = pceOtnNodeDest.getAvailableTribSlots().get(linkDestTp);
- List<Integer> commonEdgeTsPool = new ArrayList<>();
- List<Integer> tribSlotList = new ArrayList<>();
- for (Integer integer : srcTsPool) {
+ List<Uint16> srcTsPool = pceOtnNodeSrc.getAvailableTribSlots().get(linkSrcTp);
+ List<Uint16> destTsPool = pceOtnNodeDest.getAvailableTribSlots().get(linkDestTp);
+ List<Uint16> commonEdgeTsPool = new ArrayList<>();
+ List<Uint16> tribSlotList = new ArrayList<>();
+ for (Uint16 integer : srcTsPool) {
if (destTsPool.contains(integer)) {
commonEdgeTsPool.add(integer);
}
int index = 0;
while (discontinue && (commonEdgeTsPool.size() - index >= nbSlot)) {
discontinue = false;
- Integer val = commonEdgeTsPool.get(index);
+ Integer val = commonEdgeTsPool.get(index).toJava();
for (int i = 0; i < nbSlot; i++) {
if (commonEdgeTsPool.get(index + i).equals(val + i)) {
tribSlotList.add(commonEdgeTsPool.get(index + i));
return tribSlotMap;
}
- private List<List<Integer>> chooseTribSlot3(GraphPath<String, PceGraphEdge> path,
+ private List<List<Uint16>> chooseTribSlot3(GraphPath<String, PceGraphEdge> path,
Map<NodeId, PceNode> allPceNodes) {
- List<List<Integer>> tribSlot = new ArrayList<>();
+ List<List<Uint16>> tribSlot = new ArrayList<>();
boolean statusOK = true;
boolean check = false;
Object nodeClass = allPceNodes.getClass();
Object tpd = allPceNodes.get(edge.link().getDestTP());
if ((pceNode.getAvailableTribSlots().containsKey(tps.toString()))
&& (pceNode.getAvailableTribSlots().containsKey(tpd.toString()))) {
- List<Integer> tribSlotEdgeSourceN = new ArrayList<>();
- List<Integer> tribSlotEdgeDestN = new ArrayList<>();
+ List<Uint16> tribSlotEdgeSourceN = new ArrayList<>();
+ List<Uint16> tribSlotEdgeDestN = new ArrayList<>();
tribSlotEdgeSourceN = pceNode.getAvailableTribSlots().get(tps.toString());
tribSlotEdgeDestN = pceNode.getAvailableTribSlots().get(tps.toString());
check = false;
try {
List<LinkConcatenation> linkList = getOmsAttributesSpan(link).getLinkConcatenation();
for (LinkConcatenation lc : linkList) {
- srlgList.add(lc.getSRLGId());
+ srlgList.add(lc.getSRLGId().toJava());
}
} catch (NullPointerException e) {
LOG.debug("No concatenation for this link");
for (org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130.networks.network.link
.LinkConcatenation lc : linkConcatenation) {
- srlgList.add(lc.getSRLGId());
+ srlgList.add(lc.getSRLGId().toJava());
}
} catch (NullPointerException e) {
LOG.debug("No concatenation for this link");
&& link.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev181130
.Link1.class).getAvailableBandwidth() != null) {
return link.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev181130
- .Link1.class).getAvailableBandwidth();
+ .Link1.class).getAvailableBandwidth().toJava();
} else {
LOG.warn("MapUtils: no Available Bandwidth available for link {}", link.getLinkId());
return 0L;
&& link.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev181130
.Link1.class).getUsedBandwidth() != null) {
return link.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev181130
- .Link1.class).getUsedBandwidth();
+ .Link1.class).getUsedBandwidth().toJava();
} else {
LOG.warn("MapUtils: no Available Bandwidth available for link {}", link.getLinkId());
return 0L;
}
serviceFormatA = input.getServiceAEnd().getServiceFormat().getName();
serviceFormatZ = input.getServiceZEnd().getServiceFormat().getName();
- serviceRate = input.getServiceAEnd().getServiceRate();
+ serviceRate = input.getServiceAEnd().getServiceRate().toJava();
LOG.info("parseInput: A and Z :[{}] and [{}]", anodeId, znodeId);
if (!(serviceFormatA.equals(serviceFormatZ))) {
serviceFormatA, String.valueOf(serviceRate));
}
- returnStructure.setRate(input.getServiceAEnd().getServiceRate());
+ returnStructure.setRate(input.getServiceAEnd().getServiceRate().toJava());
returnStructure.setServiceFormat(input.getServiceAEnd().getServiceFormat());
return true;
}
private Long calcLatency(Link link) {
Link1 link1 = null;
link1 = link.augmentation(Link1.class);
- Long tmplatency = link1.getLinkLatency();
+ Long tmplatency = link1.getLinkLatency().toJava();
if (tmplatency != null) {
return tmplatency;
}
double tmp = 0;
for (int i = 0; i < this.omsAttributesSpan.getLinkConcatenation().size(); i++) {
//Length is expressed in meter and latency is expressed in ms according to OpenROADM MSA
- tmp += this.omsAttributesSpan.getLinkConcatenation().get(i).getSRLGLength() / CELERITY;
+ tmp += this.omsAttributesSpan.getLinkConcatenation().get(i).getSRLGLength().toJava() / CELERITY;
LOG.info("In PceLink: The latency of link {} == {}",link.getLinkId(),tmp);
}
tmplatency = (long) Math.ceil(tmp);
import java.util.List;
import java.util.Map;
-
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
+import org.opendaylight.yangtools.yang.common.Uint16;
public interface PceNode {
String getPceNodeType();
boolean checkWL(long index);
- Map<String, List<Integer>> getAvailableTribPorts();
+ Map<String, List<Uint16>> getAvailableTribPorts();
- Map<String, List<Integer>> getAvailableTribSlots();
+ Map<String, List<Uint16>> getAvailableTribSlots();
}
import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
+import org.opendaylight.yangtools.yang.common.Uint16;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
}
for (org.opendaylight.yang.gen.v1.http.org.openroadm.srg.rev181130.srg.node.attributes
.AvailableWavelengths awl : srgAvailableWL) {
- this.availableWLindex.add(awl.getIndex());
+ this.availableWLindex.add(awl.getIndex().toJava());
LOG.debug("initWLlist: SRG next = {} in {}", awl.getIndex(), this.toString());
}
break;
}
for (org.opendaylight.yang.gen.v1.http.org.openroadm.degree.rev181130.degree.node.attributes
.AvailableWavelengths awl : degAvailableWL) {
- this.availableWLindex.add(awl.getIndex());
+ this.availableWLindex.add(awl.getIndex().toJava());
LOG.debug("initWLlist: DEGREE next = {} in {}", awl.getIndex(), this.toString());
}
break;
}
@Override
- public Map<String, List<Integer>> getAvailableTribPorts() {
+ public Map<String, List<Uint16>> getAvailableTribPorts() {
// TODO Auto-generated method stub
return null;
}
@Override
- public Map<String, List<Integer>> getAvailableTribSlots() {
+ public Map<String, List<Uint16>> getAvailableTribSlots() {
// TODO Auto-generated method stub
return null;
}
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.TpId;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.node.TerminationPoint;
+import org.opendaylight.yangtools.yang.common.Uint16;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private final String pceNodeType;
private final String otnServiceType;
- private Map<String, List<Integer>> tpAvailableTribPort = new TreeMap<String, List<Integer>>();
- private Map<String, List<Integer>> tpAvailableTribSlot = new TreeMap<String, List<Integer>>();
+ private Map<String, List<Uint16>> tpAvailableTribPort = new TreeMap<String, List<Uint16>>();
+ private Map<String, List<Uint16>> tpAvailableTribSlot = new TreeMap<String, List<Uint16>>();
private Map<String, OpenroadmTpType> availableXponderTp = new TreeMap<String, OpenroadmTpType>();
private List<String> usedXpdrNWTps = new ArrayList<String>();
private List<TpId> availableXpdrNWTps;
for (OduSwitchingPools ospx : osp) {
List<NonBlockingList> nbl = ospx.getNonBlockingList();
for (NonBlockingList nbll : nbl) {
- if (nbll.getAvailableInterconnectBandwidth() >= neededBW) {
+ if (nbll.getAvailableInterconnectBandwidth().toJava() >= neededBW) {
List<TpId> tplist = new ArrayList<TpId>(nbll.getTpList());
if ((tplist.contains(tp1.getTpId())) & (tplist.contains(tp2.getTpId()))) {
LOG.debug("validateSwitchingPoolBandwidth: couple of tp {} x {} valid for crossconnection",
&& tp.augmentation(TerminationPoint1.class).getXpdrTpPortConnectionAttributes().getOdtuTpnPool().get(0)
.getOdtuType().equals(ODTU4TsAllocated.class)) {
@Nullable
- List<Integer> tpnPool = tp.augmentation(TerminationPoint1.class).getXpdrTpPortConnectionAttributes()
+ List<Uint16> tpnPool = tp.augmentation(TerminationPoint1.class).getXpdrTpPortConnectionAttributes()
.getOdtuTpnPool().get(0).getTpnPool();
if (tpnPool != null) {
tpAvailableTribPort.put(tp.getTpId().getValue(), tpnPool);
for (TerminationPoint tp : networkTpList) {
if (tp.augmentation(TerminationPoint1.class).getXpdrTpPortConnectionAttributes().getTsPool() != null) {
@Nullable
- List<Integer> tsPool = tp.augmentation(TerminationPoint1.class).getXpdrTpPortConnectionAttributes()
+ List<Uint16> tsPool = tp.augmentation(TerminationPoint1.class).getXpdrTpPortConnectionAttributes()
.getTsPool();
tpAvailableTribSlot.put(tp.getTpId().getValue(), tsPool);
}
}
@Override
- public Map<String, List<Integer>> getAvailableTribPorts() {
+ public Map<String, List<Uint16>> getAvailableTribPorts() {
return tpAvailableTribPort;
}
@Override
- public Map<String, List<Integer>> getAvailableTribSlots() {
+ public Map<String, List<Uint16>> getAvailableTribSlots() {
return tpAvailableTribSlot;
}
import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev190531.ServiceFormat;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.AToZDirection;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev171017.path.description.ZToADirection;
+import org.opendaylight.yangtools.yang.common.Uint16;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private boolean calcStatus = false;
private String responseCode = ResponseCodes.RESPONSE_FAILED;
private long resultWavelength = -1;
- private Map<String, Integer> resultTribPort;
- private Map<String, List<Integer>> resultTribSlot;
+ private Map<String, Uint16> resultTribPort;
+ private Map<String, List<Uint16>> resultTribSlot;
private Integer resultTribSlotNb = -1;
private String serviceType = "";
this.calcMessage = calcMessage;
}
- public Map<String, Integer> getResultTribPort() {
+ public Map<String, Uint16> getResultTribPort() {
return resultTribPort;
}
- public void setResultTribPort(Map<String, Integer> resultTribPort) {
+ public void setResultTribPort(Map<String, Uint16> resultTribPort) {
this.resultTribPort = resultTribPort;
}
- public Map<String, List<Integer>> getResultTribSlot() {
+ public Map<String, List<Uint16>> getResultTribSlot() {
return resultTribSlot;
}
- public void setResultTribSlot(Map<String, List<Integer>> resultTribSlot) {
+ public void setResultTribSlot(Map<String, List<Uint16>> resultTribSlot) {
this.resultTribSlot = resultTribSlot;
}
Assert.assertEquals(atozSize, ztoaSize);
Long actualAToZWavel = output.getResponseParameters().getPathDescription().getAToZDirection()
- .getAToZWavelengthNumber();
+ .getAToZWavelengthNumber().toJava();
Long expectedAToZWavel = expectedOutput.getResponseParameters().getPathDescription().getAToZDirection()
- .getAToZWavelengthNumber();
+ .getAToZWavelengthNumber().toJava();
Assert.assertEquals(actualAToZWavel, expectedAToZWavel);
Long actualZtoAWavel = output.getResponseParameters().getPathDescription().getZToADirection()
- .getZToAWavelengthNumber();
+ .getZToAWavelengthNumber().toJava();
Long expectedZtoAWavel = expectedOutput.getResponseParameters().getPathDescription().getZToADirection()
- .getZToAWavelengthNumber();
+ .getZToAWavelengthNumber().toJava();
Assert.assertEquals(actualZtoAWavel, expectedZtoAWavel);
- Long actualAToZRate = output.getResponseParameters().getPathDescription().getAToZDirection().getRate();
+ Long actualAToZRate = output.getResponseParameters().getPathDescription().getAToZDirection().getRate().toJava();
Long expectedAToZRate = expectedOutput.getResponseParameters().getPathDescription().getAToZDirection()
- .getRate();
+ .getRate().toJava();
Assert.assertEquals(expectedAToZRate, actualAToZRate);
- Long actualZToARate = output.getResponseParameters().getPathDescription().getZToADirection().getRate();
+ Long actualZToARate = output.getResponseParameters().getPathDescription().getZToADirection().getRate().toJava();
Long expectedZToARate = expectedOutput.getResponseParameters().getPathDescription().getZToADirection()
- .getRate();
+ .getRate().toJava();
Assert.assertEquals(actualZToARate, expectedZToARate);
}
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent</artifactId>
- <version>5.0.5</version>
+ <version>6.0.4</version>
<relativePath/>
</parent>
</plugin>
</plugins>
</build>
+
</project>
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
- <version>4.0.11</version>
+ <version>5.0.9</version>
<relativePath/>
</parent>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
+ <version>3.0.2</version>
<optional>true</optional>
</dependency>
</dependencies>
+
+<!-- checkstyle and spotbugds enforced by odlparent since Magnesium -->
+ <properties>
+ <!-- odlparent.checkstyle.enforce>false</odlparent.checkstyle.enforce -->
+ <odlparent.spotbugs.enforce>false</odlparent.spotbugs.enforce>
+ </properties>
+
</project>
ServicePathInputBuilder servicePathInputBuilder = new ServicePathInputBuilder()
.setServiceName(serviceName)
.setOperation(ServicePathInput.Operation.Create)
- .setWaveNumber(Long.valueOf(pathDescription.getAToZDirection().getAToZWavelengthNumber()))
+ .setWaveNumber(Long.valueOf(pathDescription.getAToZDirection().getAToZWavelengthNumber().toJava()))
.setNodes(nodeLists.getList());
return new ServicePathInputData(servicePathInputBuilder.build(), nodeLists);
}
ServicePathInputBuilder servicePathInputBuilder = new ServicePathInputBuilder()
.setOperation(ServicePathInput.Operation.Create)
.setServiceName(serviceName)
- .setWaveNumber(Long.valueOf(pathDescription.getZToADirection().getZToAWavelengthNumber()))
+ .setWaveNumber(Long.valueOf(pathDescription.getZToADirection().getZToAWavelengthNumber().toJava()))
.setNodes(nodeLists.getList());
return new ServicePathInputData(servicePathInputBuilder.build(), nodeLists);
}
List<NodeIdPair> ztoaTpIds = getZToATpList(pathDescription);
deleteAvailableWL(atozTpIds.stream().map(NodeIdPair::getNodeID).distinct().collect(Collectors.toList()),
- pathDescription.getAToZDirection().getAToZWavelengthNumber());
+ pathDescription.getAToZDirection().getAToZWavelengthNumber().toJava());
deleteAvailableWL(ztoaTpIds.stream().map(NodeIdPair::getNodeID).distinct().collect(Collectors.toList()),
- pathDescription.getZToADirection().getZToAWavelengthNumber());
+ pathDescription.getZToADirection().getZToAWavelengthNumber().toJava());
- addUsedWL(pathDescription.getAToZDirection().getAToZWavelengthNumber(), atozTpIds);
- addUsedWL(pathDescription.getZToADirection().getZToAWavelengthNumber(), ztoaTpIds);
+ addUsedWL(pathDescription.getAToZDirection().getAToZWavelengthNumber().toJava(), atozTpIds);
+ addUsedWL(pathDescription.getZToADirection().getZToAWavelengthNumber().toJava(), ztoaTpIds);
}
@Override
List<NodeIdPair> atozTpIds = getAToZTpList(pathDescription);
List<NodeIdPair> ztoaTpIds = getZToATpList(pathDescription);
- deleteUsedWL(pathDescription.getAToZDirection().getAToZWavelengthNumber(), atozTpIds);
- deleteUsedWL(pathDescription.getZToADirection().getZToAWavelengthNumber(), ztoaTpIds);
+ deleteUsedWL(pathDescription.getAToZDirection().getAToZWavelengthNumber().toJava(), atozTpIds);
+ deleteUsedWL(pathDescription.getZToADirection().getZToAWavelengthNumber().toJava(), ztoaTpIds);
addAvailableWL(atozTpIds.stream().map(NodeIdPair::getNodeID).distinct().collect(Collectors.toList()),
- pathDescription.getAToZDirection().getAToZWavelengthNumber());
+ pathDescription.getAToZDirection().getAToZWavelengthNumber().toJava());
addAvailableWL(ztoaTpIds.stream().map(NodeIdPair::getNodeID).distinct().collect(Collectors.toList()),
- pathDescription.getZToADirection().getZToAWavelengthNumber());
+ pathDescription.getZToADirection().getZToAWavelengthNumber().toJava());
}
private List<NodeIdPair> getAToZTpList(PathDescription pathDescription) {
import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.odu.interfaces.rev181019.odu.container.OduBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.odu.interfaces.rev181019.opu.OpuBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.odu.interfaces.rev181019.parent.odu.allocation.ParentOduAllocationBuilder;
+import org.opendaylight.yangtools.yang.common.Uint16;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
.setMonitoringMode(OduAttributes.MonitoringMode.Terminated);
LOG.debug("Inside the ODU2e creation {} {} {}",isNetworkPort,tribPortNumber,tribSlotIndex);
if (isNetworkPort) {
- List<Integer> tribSlots = new ArrayList<>();
- int newIdx = tribSlotIndex;
+ List<Uint16> tribSlots = new ArrayList<>();
+ Uint16 newIdx = Uint16.valueOf(tribSlotIndex);
tribSlots.add(newIdx);
IntStream.range(tribSlotIndex, tribSlotIndex + 8).forEach(
- nbr -> tribSlots.add(nbr)
+ nbr -> tribSlots.add(Uint16.valueOf(nbr))
);
ParentOduAllocationBuilder parentOduAllocationBuilder = new ParentOduAllocationBuilder()
.setTribPortNumber(tribPortNumber)
.setMonitoringMode(OduAttributes.MonitoringMode.Terminated);
if (isNetworkPort) {
LOG.debug("Network port is true");
- List<Integer> tribSlots = new ArrayList<>();
- tribSlots.add(tribSlot); //add trib slots
+ List<Uint16> tribSlots = new ArrayList<>();
+ tribSlots.add(Uint16.valueOf(tribSlot)); //add trib slots
ParentOduAllocationBuilder parentOduAllocationBuilder = new ParentOduAllocationBuilder()
//set trib port numbers
.setTribPortNumber(tribPortNumber)
.setOduFunction(ODUTTPCTP.class)
.setMonitoringMode(OduAttributes.MonitoringMode.Terminated);
if (isNetworkPort) {
- List<Integer> tribSlots = new ArrayList<>();
+ List<Uint16> tribSlots = new ArrayList<>();
IntStream.range(tribSlotIndex, tribSlotIndex + 8).forEach(
- nbr -> tribSlots.add(nbr)
+ nbr -> tribSlots.add(Uint16.valueOf(nbr))
);
ParentOduAllocationBuilder parentOduAllocationBuilder = new ParentOduAllocationBuilder()
//set trib port numbers
if (this.deviceTransactionManager.isDeviceMounted(nodeId)) {
String srcTp = node.getSrcTp();
String destTp = node.getDestTp();
- Long waveNumber = input.getWaveNumber();
+ Long waveNumber = input.getWaveNumber().toJava();
if ((destTp != null) && destTp.contains(StringConstants.NETWORK_TOKEN)) {
crossConnectFlag++;
Mapping mapping = this.portMapping.getMapping(nodeId,destTp);
LOG.info("Deleting service setup on node {}", nodeId);
String srcTp;
String destTp;
- Long waveNumber = input.getWaveNumber();
+ Long waveNumber = input.getWaveNumber().toJava();
if (node.getDestTp() == null) {
LOG.error("Destination termination point must not be null.");
return;
for (PortIfTypeConfig portIfTypeConfig : portIfTypeConfigList) {
if (portIfTypeConfig.getCircuitPackName().equals(circuitPackName)
&& portIfTypeConfig.getPortName().equals(portName)) {
- return possiblePortConfig.getConfigId();
+ return possiblePortConfig.getConfigId().toJava();
}
}
}
//check supported interface types
-}
\ No newline at end of file
+}
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
- <version>4.0.11</version>
+ <version>5.0.9</version>
<relativePath/>
</parent>
<version>${project.version}</version>
</dependency>
</dependencies>
+
+<!-- checkstyle and spotbugds enforced by odlparent since Magnesium -->
+ <properties>
+ <!-- odlparent.checkstyle.enforce>false</odlparent.checkstyle.enforce -->
+ <odlparent.spotbugs.enforce>false</odlparent.spotbugs.enforce>
+ </properties>
+
</project>
String message = "";
if (serviceEnd != null) {
try {
- Long serviceRate = serviceEnd.getServiceRate();
+ Long serviceRate = serviceEnd.getServiceRate().toJava();
ServiceFormat serviceformat = serviceEnd.getServiceFormat();
String clli = serviceEnd.getClli();
if ((serviceRate == null) || (serviceRate <= 0)) {
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
- <version>4.0.11</version>
+ <version>5.0.9</version>
<relativePath/>
</parent>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>mdsal-artifacts</artifactId>
- <version>4.0.3</version>
+ <version>5.0.9</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependency>
</dependencies>
+
+<!-- checkstyle and spotbugds enforced by odlparent since Magnesium -->
+ <properties>
+ <!-- odlparent.checkstyle.enforce>false</odlparent.checkstyle.enforce -->
+ <odlparent.spotbugs.enforce>false</odlparent.spotbugs.enforce>
+ </properties>
+
</project>
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
- <version>4.0.11</version>
+ <version>5.0.9</version>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>bundle-parent</artifactId>
- <version>5.0.5</version>
+ <version>6.0.4</version>
<relativePath/>
</parent>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
+ <version>3.0.2</version>
<optional>true</optional>
</dependency>
</dependencies>
+
+<!-- checkstyle and spotbugds enforced by odlparent since Magnesium -->
+ <properties>
+ <!-- odlparent.checkstyle.enforce>false</odlparent.checkstyle.enforce -->
+ <odlparent.spotbugs.enforce>false</odlparent.spotbugs.enforce>
+ </properties>
+
</project>