X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=common%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fcommon%2Fmapping%2FPortMappingVersion221.java;h=595af60fa2e4f56e17bb62bf43264e37e8a1134c;hb=700eb0475db06f97244c382d598ab04b8d774f53;hp=3a7839ddd6557123fca3ac1d232cc2f2678a40a7;hpb=b1944b5b626c8a85cb186c03edfd133373ee2019;p=transportpce.git diff --git a/common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMappingVersion221.java b/common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMappingVersion221.java index 3a7839ddd..595af60fa 100644 --- a/common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMappingVersion221.java +++ b/common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMappingVersion221.java @@ -147,14 +147,14 @@ public class PortMappingVersion221 { // Get TTP port mapping if (!createTtpPortMapping(nodeId, deviceInfo, portMapList)) { // return false if mapping creation for TTP's failed - LOG.warn(PortMappingUtils.UNABLE_MAPPING_LOGMSG, nodeId, "create", "TTP's"); + LOG.warn(PortMappingUtils.UNABLE_MAPPING_LOGMSG, nodeId, PortMappingUtils.CREATE, "TTP's"); return false; } // Get PP port mapping if (!createPpPortMapping(nodeId, deviceInfo, portMapList)) { // return false if mapping creation for PP's failed - LOG.warn(PortMappingUtils.UNABLE_MAPPING_LOGMSG, nodeId, "create", "PP's"); + LOG.warn(PortMappingUtils.UNABLE_MAPPING_LOGMSG, nodeId, PortMappingUtils.CREATE, "PP's"); return false; } // Get MC capabilities @@ -166,13 +166,13 @@ public class PortMappingVersion221 { break; case Xpdr: if (!createXpdrPortMapping(nodeId, portMapList)) { - LOG.warn(PortMappingUtils.UNABLE_MAPPING_LOGMSG, nodeId, "create", "Xponder"); + LOG.warn(PortMappingUtils.UNABLE_MAPPING_LOGMSG, nodeId, PortMappingUtils.CREATE, "Xponder"); return false; } break; default: LOG.error(PortMappingUtils.UNABLE_MAPPING_LOGMSG, - nodeId, "create", deviceInfo.getNodeType() + " - unknown nodetype"); + nodeId, PortMappingUtils.CREATE, deviceInfo.getNodeType() + " - unknown nodetype"); break; } @@ -181,11 +181,11 @@ public class PortMappingVersion221 { public boolean updateMapping(String nodeId, Mapping oldMapping) { if (nodeId == null) { - LOG.error(PortMappingUtils.UNABLE_MAPPING_LOGMSG, "node id null" , "update", "a null value"); + LOG.error(PortMappingUtils.UNABLE_MAPPING_LOGMSG, "node id null" , PortMappingUtils.UPDATE, "a null value"); return false; } if (oldMapping == null) { - LOG.error(PortMappingUtils.UNABLE_MAPPING_LOGMSG, nodeId, "update", "a null value"); + LOG.error(PortMappingUtils.UNABLE_MAPPING_LOGMSG, nodeId, PortMappingUtils.UPDATE, "a null value"); return false; } InstanceIdentifier portId = InstanceIdentifier.create(OrgOpenroadmDevice.class) @@ -207,7 +207,7 @@ public class PortMappingVersion221 { return true; } catch (InterruptedException | ExecutionException e) { LOG.error(PortMappingUtils.UNABLE_MAPPING_LOGMSG, - nodeId, "update", oldMapping.getLogicalConnectionPoint(), e); + nodeId, PortMappingUtils.UPDATE, oldMapping.getLogicalConnectionPoint(), e); return false; } } @@ -224,7 +224,7 @@ public class PortMappingVersion221 { } OrgOpenroadmDevice device = deviceObject.get(); if (device.getCircuitPacks() == null) { - LOG.warn(PortMappingUtils.MISSING_CP_LOGMSG, nodeId, "found"); + LOG.warn(PortMappingUtils.MISSING_CP_LOGMSG, nodeId, PortMappingUtils.FOUND); return false; } @@ -242,7 +242,7 @@ public class PortMappingVersion221 { for (CircuitPacks cp : circuitPackList) { String circuitPackName = cp.getCircuitPackName(); if (cp.getPorts() == null) { - LOG.warn(PortMappingUtils.NO_PORT_ON_CP_LOGMSG, nodeId, "found", circuitPackName); + LOG.warn(PortMappingUtils.NO_PORT_ON_CP_LOGMSG, nodeId, PortMappingUtils.FOUND, circuitPackName); continue; } List portList = new ArrayList<>(cp.nonnullPorts().values()); @@ -256,7 +256,7 @@ public class PortMappingVersion221 { } } } else { - LOG.info(PortMappingUtils.XPDR_LIST_IN_CONF_LOGMSG, nodeId, "found"); + LOG.info(PortMappingUtils.XPDR_LIST_IN_CONF_LOGMSG, nodeId, PortMappingUtils.FOUND); for (Xponder xponder : deviceObject.get().nonnullXponder().values()) { // Variables to keep track of number of line ports and client ports int line = 1; @@ -497,7 +497,7 @@ public class PortMappingVersion221 { return new ArrayList<>(); } if (circuitPackObject.get().getPorts() == null) { - LOG.warn(PortMappingUtils.NO_PORT_ON_CP_LOGMSG, nodeId, "found", circuitPackName); + LOG.warn(PortMappingUtils.NO_PORT_ON_CP_LOGMSG, nodeId, PortMappingUtils.FOUND, circuitPackName); return new ArrayList<>(); } return new ArrayList<>(circuitPackObject.get().nonnullPorts().values());