insert if not found, the SRG number into the logical connection point
name during the portmapping creation.
Change-Id: I979dac8100a17c122cf73f2e77403a4df19a03db
Signed-off-by: Gilles Thouenon <gilles.thouenon@orange.com>
Co-authored-by: Christophe Betoule <christophe.betoule@orange.com>
String logicalConnectionPoint = null;
if (port.getPortDirection().getIntValue() == 1) {
// Port direction is transmit
String logicalConnectionPoint = null;
if (port.getPortDirection().getIntValue() == 1) {
// Port direction is transmit
- logicalConnectionPoint = "SRG" + srgCounter + "-" + port
- .getLogicalConnectionPoint() + "-TX";
+ if (!port.getLogicalConnectionPoint().contains("SRG")) {
+ logicalConnectionPoint = "SRG" + srgCounter + "-" + port
+ .getLogicalConnectionPoint() + "-TX";
+ } else {
+ logicalConnectionPoint = port.getLogicalConnectionPoint() + "-TX";
+ }
}
if (port.getPortDirection().getIntValue() == 2) {
// Port direction is receive
}
if (port.getPortDirection().getIntValue() == 2) {
// Port direction is receive
- logicalConnectionPoint = "SRG" + srgCounter + "-" + port
- .getLogicalConnectionPoint() + "-RX";
+ if (!port.getLogicalConnectionPoint().contains("SRG")) {
+ logicalConnectionPoint = "SRG" + srgCounter + "-" + port
+ .getLogicalConnectionPoint() + "-RX";
+ } else {
+ logicalConnectionPoint = port.getLogicalConnectionPoint() + "-RX";
+ }
}
if (port.getPortDirection().getIntValue() == 3) {
// port is bi-directional
}
if (port.getPortDirection().getIntValue() == 3) {
// port is bi-directional
- logicalConnectionPoint = "SRG" + srgCounter + "-" + port
- .getLogicalConnectionPoint() + "-TXRX";
+ if (!port.getLogicalConnectionPoint().contains("SRG")) {
+ logicalConnectionPoint = "SRG" + srgCounter + "-" + port
+ .getLogicalConnectionPoint() + "-TXRX";
+ } else {
+ logicalConnectionPoint = port.getLogicalConnectionPoint() + "-TXRX";
+ }
}
LOG.info("Logical Connection Point for {} {} is {}", circuitPackName, port
}
LOG.info("Logical Connection Point for {} {} is {}", circuitPackName, port