for (Ports port : cp.getPorts()) {
if (Port.PortQual.XpdrNetwork.equals(port.getPortQual())) {
portMapList.add(createMappingObject(nodeId, port, circuitPackName,
- "XPDR1-"+OpenRoadmInterfacesImpl.NETWORK_TOKEN + line));
+ "XPDR1-" + OpenRoadmInterfacesImpl.NETWORK_TOKEN + line));
//String lcp = port.getLogicalConnectionPoint();
//String regex = "XPDR[0-9]+-NETWORK[0-9]+";
//checkLogicalConnectionPoint(regex, lcp, nodeId, portMapList, circuitPackName, port, "NETWORK", line);
line++;
} else if (Port.PortQual.XpdrClient.equals(port.getPortQual())) {
portMapList.add(createMappingObject(nodeId, port, circuitPackName,
- "XPDR1-"+OpenRoadmInterfacesImpl.CLIENT_TOKEN + client));
+ "XPDR1-" + OpenRoadmInterfacesImpl.CLIENT_TOKEN + client));
//String lcp = port.getLogicalConnectionPoint();
//String regex = "XPDR[0-9]+-CLIENT[0-9]+";
//checkLogicalConnectionPoint(regex, lcp, nodeId, portMapList, circuitPackName, port, "CLIENT", client);
otuBuilder =
new org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev161014.Interface1Builder(
intf2Delete.augmentation(
- org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev161014.Interface1.class));
+ org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev161014.Interface1.class));
OtuBuilder otu = new OtuBuilder(otuBuilder.getOtu());
if (otu.getMaintLoopback() != null) {
MaintLoopbackBuilder maintLoopBackBuilder = new MaintLoopbackBuilder();
CircuitPacksBuilder cpBldr = new CircuitPacksBuilder(cp);
boolean change = false;
if (activate) {
- if (cpBldr.getEquipmentState()!=null && !cpBldr.getEquipmentState().equals(States.NotReservedInuse)) {
+ if (cpBldr.getEquipmentState() != null && !cpBldr.getEquipmentState().equals(States.NotReservedInuse)) {
cpBldr.setEquipmentState(States.NotReservedInuse);
change = true;
}
- } else {
- if ((cpBldr.getEquipmentState()!=null && !cpBldr.getEquipmentState().equals(States.NotReservedAvailable))) {
- cpBldr.setEquipmentState(States.NotReservedAvailable);
- change = true;
- }
+ } else if (
+ (cpBldr.getEquipmentState() != null && !cpBldr.getEquipmentState().equals(States.NotReservedAvailable))) {
+ cpBldr.setEquipmentState(States.NotReservedAvailable);
+ change = true;
}
if (change) {
Future<Optional<DeviceTransaction>> deviceTxFuture = this.deviceTransactionManager.getDeviceTransaction(
}
}
-}
\ No newline at end of file
+}
import org.opendaylight.controller.md.sal.binding.api.MountPoint;
import org.opendaylight.controller.md.sal.binding.api.NotificationService;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.sal.binding.api.RpcConsumerRegistry;
import org.opendaylight.transportpce.common.StringConstants;
import org.opendaylight.transportpce.common.Timeouts;
import org.opendaylight.transportpce.common.device.DeviceTransactionManager;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.OrgOpenroadmDeviceListener;
import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev161014.OrgOpenroadmLldpListener;
import org.opendaylight.yang.gen.v1.http.org.openroadm.tca.rev161014.OrgOpenroadmTcaListener;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.CreateSubscriptionInputBuilder;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.NotificationsService;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netconf.notification._1._0.rev080714.StreamNameType;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.Netconf;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.netmod.notification.rev080714.netconf.Streams;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode;
return false;
}
}
+
+ private OrdLink(){
+ }
}
/*
* Class to check RPCs Compliancy.
*/
-public class PceComplianceCheck {
+public final class PceComplianceCheck {
private static final Logger LOG = LoggerFactory.getLogger(PceComplianceCheck.class);
return new PceComplianceCheckResult(result, message);
}
+ private PceComplianceCheck() {
+ }
+
}
import edu.uci.ics.jung.algorithms.shortestpath.DijkstraShortestPath;
import edu.uci.ics.jung.graph.DirectedSparseMultigraph;
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-
import org.apache.commons.collections15.Transformer;
import org.opendaylight.transportpce.common.ResponseCodes;
import org.opendaylight.transportpce.pce.PceResult.LocalCause;
}
- public void setConstrains(PceConstraints pceHardConstraints, PceConstraints pceSoftConstraints) {
- this.pceHardConstraints = pceHardConstraints;
- this.pceSoftConstraints = pceSoftConstraints;
+ public void setConstrains(PceConstraints pceHardCons, PceConstraints pceSoftCons) {
+ this.pceHardConstraints = pceHardCons;
+ this.pceSoftConstraints = pceSoftCons;
}
}
return this.ztoadirection;
}
- public void setAtoZDirection(AToZDirection atozdirection) {
- this.atozdirection = atozdirection;
+ public void setAtoZDirection(AToZDirection atozdir) {
+ this.atozdirection = atozdir;
}
- public void setZtoADirection(ZToADirection ztoadirection) {
- this.ztoadirection = ztoadirection;
+ public void setZtoADirection(ZToADirection ztoadir) {
+ this.ztoadirection = ztoadir;
}
public long getRate() {
// TODO fix. This is quick workaround for algorithm problem
if ((rc.getLocalCause() == LocalCause.TOO_HIGH_LATENCY)
&& (pceHardConstraints.getPceMetrics() == PceMetric.HopCount)
- && (pceHardConstraints.getMaxLatency() != (long) -1)) {
+ && (pceHardConstraints.getMaxLatency() != -1)) {
pceHardConstraints.setPceMetrics(PceMetric.PropagationDelay);
graph = patchRerunGraph(graph, pceHardConstraints, pceSoftConstraints);
LOG.info("setPathDescription ...");
AToZDirection atoz = rc.getAtoZDirection();
ZToADirection ztoa = rc.getZtoADirection();
- if (atoz == null || atoz.getAToZ() == null) {
+ if ((atoz == null) || (atoz.getAToZ() == null)) {
rc.setRC("400");
LOG.error("In pathComputation empty atoz path after description: result = {}", rc.toString());
return;
}
- if (ztoa == null || ztoa.getZToA() == null) {
+ if ((ztoa == null) || (ztoa.getZToA() == null)) {
rc.setRC("400");
LOG.error("In pathComputation empty ztoa path after description: result = {}", rc.toString());
return;
LOG.info("In pathComputation Graph is Found");
}
- private PceGraph patchRerunGraph(PceGraph graph, PceConstraints pceHardConstraints,
- PceConstraints pceSoftConstraints) {
+ private PceGraph patchRerunGraph(PceGraph graph, PceConstraints pceHardCons, PceConstraints pceSoftCons) {
LOG.info("In pathComputation patchRerunGraph : rerun Graph with metric = PROPAGATION-DELAY ");
- graph.setConstrains(pceHardConstraints, pceSoftConstraints);
+ graph.setConstrains(pceHardCons, pceSoftCons);
graph.calcPath();
return graph;
return OperationResult.ok("Validation successful.");
}
- public ServiceCreateValidation() {
+ private ServiceCreateValidation() {
}
}
return result;
}
- public CheckCoherencyHardSoft() {
+ private CheckCoherencyHardSoft() {
}
}
return new ComplianceCheckResult(result, message);
}
- public ServicehandlerCompliancyCheck() {
+ private ServicehandlerCompliancyCheck() {
}
}
return new ComplianceCheckResult(result, message);
}
- public ServicehandlerTxRxCheck() {
+ private ServicehandlerTxRxCheck() {
}
}
txDirectionBuilder.setLgx(lgx);
serviceAEndBuilder.setTxDirection(txDirectionBuilder.build());
ServiceCreateInputBuilder buildInput = new ServiceCreateInputBuilder(serviceCreateInput);
- ServicehandlerImpl serviceHandler = new ServicehandlerImpl(getDataBroker(), this.pathComputationService, null);
+ this.serviceHandler = new ServicehandlerImpl(getDataBroker(), this.pathComputationService, null);
return serviceHandler.serviceCreate(buildInput.setServiceAEnd(serviceAEndBuilder.build()).build()).get()
.getResult();
}
rxDirectionBuilder.setLgx(lgx);
serviceAEndBuilder.setRxDirection(rxDirectionBuilder.build());
ServiceCreateInputBuilder buildInput = new ServiceCreateInputBuilder(serviceCreateInput);
- ServicehandlerImpl serviceHandler = new ServicehandlerImpl(getDataBroker(), this.pathComputationService, null);
+ this.serviceHandler = new ServicehandlerImpl(getDataBroker(), this.pathComputationService, null);
return serviceHandler.serviceCreate(buildInput.setServiceAEnd(serviceAEndBuilder.build()).build()).get()
.getResult();
}
import org.junit.Test;
import org.opendaylight.transportpce.common.OperationResult;
import org.opendaylight.transportpce.servicehandler.utils.ServiceDataUtils;
-import org.opendaylight.transportpce.servicehandler.validation.checks.CheckCoherencyHardSoft;
-import org.opendaylight.transportpce.servicehandler.validation.checks.ServicehandlerTxRxCheck;
import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev161014.constraints.co.routing.or.general.CoRoutingBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev161014.routing.constraints.HardConstraintsBuilder;
import org.opendaylight.yang.gen.v1.http.org.openroadm.routing.constrains.rev161014.routing.constraints.SoftConstraintsBuilder;
OperationResult result = ServiceCreateValidation.validateServiceCreateRequest(input);
Assert.assertEquals(true, result.isSuccess());
}
-
- @Test
- public void constructServicehandlerTxRxCheck() {
- ServicehandlerTxRxCheck servicehandlerTxRxCheck = new ServicehandlerTxRxCheck();
- Assert.assertEquals(ServicehandlerTxRxCheck.class, servicehandlerTxRxCheck.getClass());
- }
-
- @Test
- public void constructCheckCoherencyHardSoft() {
- CheckCoherencyHardSoft checkCoherencyHardSoft = new CheckCoherencyHardSoft();
- Assert.assertEquals(CheckCoherencyHardSoft.class, checkCoherencyHardSoft.getClass());
- }
-
- @Test
- public void constructServiceCreateValidation() {
- ServiceCreateValidation serviceCreateValidation = new ServiceCreateValidation();
- Assert.assertEquals(ServiceCreateValidation.class, serviceCreateValidation.getClass());
- }
}
Assert.assertEquals("", result.getMessage());
Assert.assertEquals(true, result.hasPassed());
}
-
- @Test
- public void constructServicehandlerCompliancyCheck() {
- ServicehandlerCompliancyCheck servicehandlerCompliancyCheck = new ServicehandlerCompliancyCheck();
- Assert.assertEquals(ServicehandlerCompliancyCheck.class, servicehandlerCompliancyCheck.getClass());
- }
}
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.ListeningExecutorService;
-
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
-
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
*/
private Boolean comp(Resource pathAend, Resource pathZend, String inputAend, String inputZend) {
Boolean result = false;
- if (pathAend != null && pathZend != null && inputAend != null && inputZend != null) {
- if (pathAend instanceof Node && pathZend instanceof Node) {
+ if ((pathAend != null) && (pathZend != null) && (inputAend != null) && (inputZend != null)) {
+ if ((pathAend instanceof Node) && (pathZend instanceof Node)) {
Node aend = (Node) pathAend;
Node zend = (Node) pathZend;
if (aend.getNodeIdentifier().getNodeId().compareToIgnoreCase(inputAend) == 0) {
Boolean result = false;
LOG.info("{} - {}", res1.getClass().getName(), res2.getClass().getName());
if (res1.getClass().getName().compareToIgnoreCase(res2.getClass().getName()) == 0) {
- if (res1 instanceof Node && res2 instanceof Node) {
+ if ((res1 instanceof Node) && (res2 instanceof Node)) {
Node node1 = (Node)res1;
Node node2 = (Node)res2;
if (node1.getNodeIdentifier().getNodeId()
result = true;
}
}
- if (res1 instanceof TerminationPoint && res2 instanceof TerminationPoint) {
+ if ((res1 instanceof TerminationPoint) && (res2 instanceof TerminationPoint)) {
TerminationPoint tp1 = (TerminationPoint)res1;
TerminationPoint tp2 = (TerminationPoint)res2;
if (tp1.getTerminationPointIdentifier().getNodeId()
}
}
}
- if (res1 instanceof Link && res2 instanceof Link) {
+ if ((res1 instanceof Link) && (res2 instanceof Link)) {
Link link1 = (Link)res1;
Link link2 = (Link)res2;
if (link1.getLinkIdentifier().getLinkId().compareTo(link2.getLinkIdentifier().getLinkId()) == 0) {
Boolean trouve = false;
for (int loop = 0;loop < size;loop++) {
id2 = atoz2.getAToZ().get(loop).getId();
- if (id2 != null && id2.compareTo(id1) == 0) {
+ if ((id2 != null) && (id2.compareTo(id1) == 0)) {
res2 = atoz2.getAToZ().get(loop).getResource().getResource();
LOG.info("res2 : {}", res2.toString());
trouve = true;
Boolean trouve = false;
for (int loop = 0;loop < size;loop++) {
id2 = ztoa2.getZToA().get(loop).getId();
- if (id2 != null && id2.compareTo(id1) == 0) {
+ if ((id2 != null) && (id2.compareTo(id1) == 0)) {
res2 = ztoa2.getZToA().get(loop).getResource().getResource();
LOG.info("res2 : {}", res2.toString());
trouve = true;
private Boolean excludeNode(PathDescriptions path, List<String> nodes) {
LOG.info("Testing exclude Nodes ...");
Boolean result = false;
- if (path != null && !nodes.isEmpty()) {
+ if ((path != null) && !nodes.isEmpty()) {
List<AToZ> list = path.getAToZDirection().getAToZ();
if (!list.isEmpty()) {
int index = 0;
boolean found = false;
- while (index < list.size() && !found) {
+ while ((index < list.size()) && !found) {
Resource res = list.get(index).getResource().getResource();
- if (res != null && res instanceof Node) {
+ if ((res != null) && (res instanceof Node)) {
Node node = (Node) res;
for (String exclude : nodes) {
if (exclude.compareToIgnoreCase(node.getNodeIdentifier().getNodeId()) == 0) {
private Boolean diversityService(List<String> existingService, PathDescriptions path, int choice) {
LOG.info("Testing diversity ...");
Boolean result = false;
- if (path != null && choice >= 0 && !existingService.isEmpty()) {
+ if ((path != null) && (choice >= 0) && !existingService.isEmpty()) {
int index = 0;
while (index < existingService.size()) {
String tmp = existingService.get(index);
if (tmp != null) {
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service
.types.rev170426.service.path.PathDescription pathDesc = null;
- if (servicePathList != null && !servicePathList.isEmpty()) {
+ if ((servicePathList != null) && !servicePathList.isEmpty()) {
for (ServicePaths service : servicePathList) {
if (service.getServicePathName().compareTo(tmp) == 0) {
LOG.info("Existing Service '{}' found in ServicePathList ...", tmp);
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service
.types.rev170426.service.path.PathDescription tmp = service.getPathDescription();
if (tmp != null) {
- if (path.getAToZDirection() != null && tmp.getAToZDirection() != null
+ if ((path.getAToZDirection() != null) && (tmp.getAToZDirection() != null)
&& egalAtoZDirection(path.getAToZDirection(), tmp.getAToZDirection())) {
- if (path.getZToADirection() != null && tmp.getZToADirection() != null
+ if ((path.getZToADirection() != null) && (tmp.getZToADirection() != null)
&& egalZtoADirection(path.getZToADirection(), tmp.getZToADirection())) {
result = true;
LOG.info("Path already present in servicePath List");
private List<PathDescriptions> retrievePath(String aendNodeId, String zendNodeId) {
List<PathDescriptions> result = new ArrayList<PathDescriptions>();
List<PathDescriptions> paths = readPathDescriptionList();
- if (!paths.isEmpty() && aendNodeId != null && zendNodeId != null) {
+ if (!paths.isEmpty() && (aendNodeId != null) && (zendNodeId != null)) {
LOG.info("retrieving paths from pathDescription List for {} / {}", aendNodeId, zendNodeId);
for (PathDescriptions tmp : paths) {
Resource pathAend = null;
}
index++;
}
- if (pathAend != null && pathZend != null) {
+ if ((pathAend != null) && (pathZend != null)) {
LOG.info("pathAend : {} - pathZend: {}",pathAend, pathZend);
LOG.info("aendNodeId : {} - zendNodeId : {}", aendNodeId, zendNodeId);
if (comp(pathAend, pathZend, aendNodeId, zendNodeId)) {
PathDescriptions path = it.next();
String name = path.getPathName();
LOG.info("path : {}", name);
- if (name != null && name.contains(contain)) {
+ if ((name != null) && name.contains(contain)) {
LOG.info(" path gets : {}", name);
String [] split = name.split("_");
if (split.length == 3) {
if (cancelInput != null) {
Boolean found = false;
String name = cancelInput.getServiceName();
- if (name != null && !servicePathList.isEmpty()) {
+ if ((name != null) && !servicePathList.isEmpty()) {
for (ServicePaths service : servicePathList) {
if (name.compareTo(service.getServicePathName()) == 0) {
LOG.info("ServicePaths found in ServicePathList !!!");
if (input != null) {
HardConstraints inputHard = input.getHardConstraints();
SoftConstraints inputSoft = input.getSoftConstraints();
- if (inputHard != null || inputSoft != null) {
+ if ((inputHard != null) || (inputSoft != null)) {
constraints = true;
}
path = null;
if (existingService.size() > 0) {
LOG.info("Getting existing service applicability ...");
int choice = -1;
- if (choice < 0
+ if ((choice < 0)
&& diversity.getExistingServiceApplicability().isNode()) {
LOG.info("existing-service-applicability : Node");
choice = 0;
}
- if (choice < 0
+ if ((choice < 0)
&& diversity.getExistingServiceApplicability().isClli()) {
LOG.info("existing-service-applicability : Clli");
choice = 1;
}
- if (choice < 0
+ if ((choice < 0)
&& diversity.getExistingServiceApplicability().isSrlg()) {
LOG.info("existing-service-applicability : Srlg");
choice = 2;
*/
private Boolean writeOrDeleteServicePathList(String serviceName, int choice) {
Boolean result = null;
- if (serviceName != null && serviceName.compareTo(" ") != 0 && choice >= 0 && choice < 2) {
+ if ((serviceName != null) && (serviceName.compareTo(" ") != 0) && (choice >= 0) && (choice < 2)) {
LOG.info("WriteOrDeleting '{}' ServicePaths", serviceName);
WriteTransaction writeTx = db.newWriteOnlyTransaction();
result = true;
return input;
}
- public void setInput(PathComputationRequestInput input) {
- this.input = input;
+ public void setInput(PathComputationRequestInput pathComputationRequestInput) {
+ this.input = pathComputationRequestInput;
}
public CancelResourceReserveInput getCancelInput() {
return cancelInput;
}
- public void setCancelInput(CancelResourceReserveInput input) {
- this.cancelInput = input;
+ public void setCancelInput(CancelResourceReserveInput cancelResourceReserveInput) {
+ this.cancelInput = cancelResourceReserveInput;
}
public DataBroker getDb() {
* @param DataBroker
* Access DataStore
*/
- private boolean initializePathDescriptionList(DataBroker db) {
+ private boolean initializePathDescriptionList(DataBroker dataBroker) {
Boolean result = true;
LOG.info("Preparing to initialize the PathDescription List");
- WriteTransaction transaction = db.newWriteOnlyTransaction();
+ WriteTransaction transaction = dataBroker.newWriteOnlyTransaction();
InstanceIdentifier<PathDescriptionList> iid = InstanceIdentifier.create(PathDescriptionList.class);
PathDescriptionList pathDescriptionList = new PathDescriptionListBuilder().build();
transaction.put(LogicalDatastoreType.OPERATIONAL, iid, pathDescriptionList);
* Access DataStore
* @return <code>true</code> if ok, <code>false</code> else
*/
- private boolean initializeServicePathList(DataBroker db) {
+ private boolean initializeServicePathList(DataBroker dataBroker) {
Boolean result = true;
LOG.info("Preparing to initialize the ServicePathList registry");
- WriteTransaction transaction = db.newWriteOnlyTransaction();
+ WriteTransaction transaction = dataBroker.newWriteOnlyTransaction();
InstanceIdentifier<ServicePathList> iid = InstanceIdentifier.create(ServicePathList.class);
ServicePathList servicePathList = new ServicePathListBuilder().build();
transaction.put(LogicalDatastoreType.OPERATIONAL, iid, servicePathList);
for (Path path : paths) {
tpNodeTp = path.getTpNodeTp();
tpNodeTp.createAToZListHop(order);
- for (AToZ atoz : tpNodeTp.getAToZ()) {
- atozList.add(atoz);
+ for (AToZ tmp : tpNodeTp.getAToZ()) {
+ atozList.add(tmp);
order++;
}
Link link = path.getLink();
for (Path path : paths) {
tpNodeTp = path.getTpNodeTp();
tpNodeTp.createZToAListHop(order);
- for (ZToA ztoa : tpNodeTp.getZToA()) {
- ztoaList.add(ztoa);
+ for (ZToA tmp : tpNodeTp.getZToA()) {
+ ztoaList.add(tmp);
order++;
}
Link link = path.getLink();
String id = Integer.toString(size - index);
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription
.rev170426.pce.resource.resource.Resource res = null;
- for (AToZ atoz : atozList) {
- if (atoz.getId().compareTo(id) == 0) {
- res = atoz.getResource().getResource();
+ for (AToZ tmpAtoz : atozList) {
+ if (tmpAtoz.getId().compareTo(id) == 0) {
+ res = tmpAtoz.getResource().getResource();
if (res != null) {
switch (index) {
if (size > 0) {
String id = Integer.toString(size - 1);
for (ListIterator<AToZ> it = atozList.listIterator(); it.hasNext();) {
- AToZ atoz = it.next();
- if (atoz.getId().compareTo(id) == 0) {
+ AToZ tmpAtoz = it.next();
+ if (tmpAtoz.getId().compareTo(id) == 0) {
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription
- .rev170426.pce.resource.resource.Resource res = atoz.getResource().getResource();
+ .rev170426.pce.resource.resource.Resource res = tmpAtoz.getResource().getResource();
if ((res != null) && (res instanceof Link)) {
Link link = new LinkBuilder()
.setLinkIdentifier(new LinkIdentifierBuilder()
.setLinkId(atozLink)
.build())
.build();
- AToZKey atozKey = new AToZKey(atoz.key());
+ AToZKey atozKey = new AToZKey(tmpAtoz.key());
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
.pathdescription.rev170426.pce.resource.Resource resource = new ResourceBuilder()
.setResource(link).build();
int size = atozList.size();
if (size > 0) {
String id = Integer.toString(0);
- for (AToZ atoz : atozList) {
- if (atoz.getId().compareTo(id) == 0) {
+ for (AToZ tmpAtoz : atozList) {
+ if (tmpAtoz.getId().compareTo(id) == 0) {
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription
- .rev170426.pce.resource.resource.Resource res = atoz.getResource().getResource();
+ .rev170426.pce.resource.resource.Resource res = tmpAtoz.getResource().getResource();
if ((res != null) && (res instanceof TerminationPoint)) {
TerminationPoint tp = (TerminationPoint) res;
if ((tp != null) && tp.getTerminationPointIdentifier().getTpId().contains(beginBy)) {
import java.util.ArrayList;
import java.util.List;
-
import org.apache.commons.lang3.StringUtils;
import org.opendaylight.transportpce.stubpce.TpNodeTp;
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev170426.pce.resource.resource.resource.Link;
return isXpdrSrgAbsent;
}
- public void setXpdrSrgAbsent(boolean isXpdrSrgAbsent) {
- this.isXpdrSrgAbsent = isXpdrSrgAbsent;
+ public void setXpdrSrgAbsent(boolean xpdrSrgAbsent) {
+ this.isXpdrSrgAbsent = xpdrSrgAbsent;
}
}
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
-
import java.util.List;
return lcps;
}
- public void setLpcs(List<LogicalConnectionPoint> lcps) {
- this.lcps = lcps;
+ public void setLpcs(List<LogicalConnectionPoint> logicalConPoints) {
+ this.lcps = logicalConPoints;
}
@Override
* @param paths NodeLinkNode list paths
* @return PathDescriptionsOrdered List of direct paths
*/
- public SortedSet<PathDescriptionsOrdered> getDirectPathDesc(String aend, String zend,List<NodeLinkNode> paths) {
+ public SortedSet<PathDescriptionsOrdered> getDirectPathDesc(String aend, String zend,
+ List<NodeLinkNode> nodeLinkNodes) {
List<AToZDirection> atozdirectionPaths = new ArrayList<AToZDirection>();
SortedSet<PathDescriptionsOrdered> result = new TreeSet<PathDescriptionsOrdered>();
SuperNode aendSp = getSuperNode(aend);
SuperNode zendSp = getSuperNode(zend);
- if (!paths.isEmpty()) {
- for (NodeLinkNode tmp : paths) {
+ if (!nodeLinkNodes.isEmpty()) {
+ for (NodeLinkNode tmp : nodeLinkNodes) {
if (tmp.getDirect()) {
LOG.info("Direct NodeLinkNode : {}", tmp.toString());
String atozLink = null;
* @param paths NodeLinkNode list paths
* @return PathDescriptionsOrdered List of indirect paths
*/
- public SortedSet<PathDescriptionsOrdered> getIndirectPathDesc(String aend, String zend,List<NodeLinkNode> paths) {
+ public SortedSet<PathDescriptionsOrdered> getIndirectPathDesc(String aend, String zend,
+ List<NodeLinkNode> nodeLinkNodes) {
List<AToZDirection> atozdirectionPaths = new ArrayList<AToZDirection>();
SortedSet<PathDescriptionsOrdered> result = new TreeSet<PathDescriptionsOrdered>();
SuperNode aendSp = getSuperNode(aend);
SuperNode zendSp = getSuperNode(zend);
- if (!paths.isEmpty()) {
- for (NodeLinkNode tmp : paths) {
+ if (!nodeLinkNodes.isEmpty()) {
+ for (NodeLinkNode tmp : nodeLinkNodes) {
if (!tmp.getDirect()) {
LOG.info("Indirect NodeLinkNode : {}", tmp.toString());
int size = tmp.getAtozLink().size();