- Output indicates all the interfaces created,
OTSI, OTSI-group, OTUC4, ODUC4, ODUFlex and
Ethernet-client
JIRA: TRNSPRTPCE-606
Change-Id: Ic336a6223b4adc23e0f61b4bc33114af950ddcd9
Signed-off-by: Balagangadhar Bathula <bb4341@att.com>
// create OCH interface
interfaceOchOtsiOtsigroup = createOpenRoadmOchInterface(nodeId, logicalConnPoint, spectrumInformation);
} else if (portMap.getSupportedInterfaceCapability().contains(IfOtsiOtsigroup.class)) {
// create OCH interface
interfaceOchOtsiOtsigroup = createOpenRoadmOchInterface(nodeId, logicalConnPoint, spectrumInformation);
} else if (portMap.getSupportedInterfaceCapability().contains(IfOtsiOtsigroup.class)) {
- // Create OTSi and OTSi-group
+ // Create OTSi and OTSi-group and concat the names of the interface
String interfaceOtsiName = createOpenRoadmOtsiInterface(nodeId, logicalConnPoint, spectrumInformation);
String interfaceOtsiName = createOpenRoadmOtsiInterface(nodeId, logicalConnPoint, spectrumInformation);
- interfaceOchOtsiOtsigroup = createOpenRoadmOtsiGroupInterface(nodeId, logicalConnPoint, interfaceOtsiName,
+ // Concat the two names for this interface
+ interfaceOchOtsiOtsigroup = interfaceOtsiName
+ + "#" + createOpenRoadmOtsiGroupInterface(nodeId, logicalConnPoint, interfaceOtsiName,
}
// Depending on OTU4 or OTUCn, supporting interface should
// reflect that
}
// Depending on OTU4 or OTUCn, supporting interface should
// reflect that
- String interfaceOdu4Oducn = null;
+ String interfaceOdu4OducnOduflex = null;
if (portMap.getSupportedInterfaceCapability().contains(IfOCHOTU4ODU4.class)) {
// create OTU4 interface
if (portMap.getSupportedInterfaceCapability().contains(IfOCHOTU4ODU4.class)) {
// create OTU4 interface
- interfaceOdu4Oducn = createOpenRoadmOdu4Interface(nodeId, logicalConnPoint, apiInfoA, apiInfoZ);
+ interfaceOdu4OducnOduflex = createOpenRoadmOdu4Interface(nodeId, logicalConnPoint, apiInfoA, apiInfoZ);
} else if (portMap.getSupportedInterfaceCapability().contains(IfOtsiOtsigroup.class)) {
// Create ODUCn and ODUFlex interface.
String interfaceOducn = createOpenRoadmOducnInterface(nodeId, logicalConnPoint);
} else if (portMap.getSupportedInterfaceCapability().contains(IfOtsiOtsigroup.class)) {
// Create ODUCn and ODUFlex interface.
String interfaceOducn = createOpenRoadmOducnInterface(nodeId, logicalConnPoint);
- interfaceOdu4Oducn = createOpenRoadmOduflexInterface(nodeId, logicalConnPoint, interfaceOducn);
+ // Here we concat the two interfaces
+ interfaceOdu4OducnOduflex = interfaceOducn + "#"
+ + createOpenRoadmOduflexInterface(nodeId, logicalConnPoint, interfaceOducn);
- return interfaceOdu4Oducn;
+ return interfaceOdu4OducnOduflex;
}
public String createOpenRoadmOtnOducnInterface(String nodeId, String logicalConnPoint,
}
public String createOpenRoadmOtnOducnInterface(String nodeId, String logicalConnPoint,
import com.google.common.collect.Sets;
import com.google.common.util.concurrent.FluentFuture;
import java.util.ArrayList;
import com.google.common.collect.Sets;
import com.google.common.util.concurrent.FluentFuture;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
crossConnectFlag++;
String supportingOchInterface = this.openRoadmInterfaceFactory.createOpenRoadmOchInterface(
nodeId, destTp, spectrumInformation);
crossConnectFlag++;
String supportingOchInterface = this.openRoadmInterfaceFactory.createOpenRoadmOchInterface(
nodeId, destTp, spectrumInformation);
- createdOchInterfaces.add(supportingOchInterface);
+ // Split the string based on # pass the last element as the supported Interface
+ // This is needed for 7.1 device models with B100G, we have OTSI, OTSI-group combined as OCH
+ String[] listOfSuppOchInf = supportingOchInterface.split("#");
+ createdOchInterfaces = Arrays.asList(listOfSuppOchInf);
+ // Taking the last element
+ supportingOchInterface = createdOchInterfaces.get(createdOchInterfaces.size() - 1);
String supportingOtuInterface = this.openRoadmInterfaceFactory.createOpenRoadmOtu4Interface(
nodeId, destTp, supportingOchInterface, apiInfoA, apiInfoZ);
createdOtuInterfaces.add(supportingOtuInterface);
if (srcTp == null) {
otnLinkTps.add(new LinkTpBuilder().setNodeId(nodeId).setTpId(destTp).build());
} else {
String supportingOtuInterface = this.openRoadmInterfaceFactory.createOpenRoadmOtu4Interface(
nodeId, destTp, supportingOchInterface, apiInfoA, apiInfoZ);
createdOtuInterfaces.add(supportingOtuInterface);
if (srcTp == null) {
otnLinkTps.add(new LinkTpBuilder().setNodeId(nodeId).setTpId(destTp).build());
} else {
- createdOduInterfaces.add(this.openRoadmInterfaceFactory.createOpenRoadmOdu4HOInterface(
- nodeId, destTp, false, apiInfoA, apiInfoZ, PT_07));
+ // This is needed for 7.1 device models for 400GE, since we have ODUC4 and ODUflex
+ // are combined
+ createdOduInterfaces = Arrays.asList(this.openRoadmInterfaceFactory
+ .createOpenRoadmOdu4HOInterface(
+ nodeId, destTp, false, apiInfoA, apiInfoZ, PT_07).split("#"));
}
}
if ((srcTp != null) && srcTp.contains(StringConstants.CLIENT_TOKEN)) {
}
}
if ((srcTp != null) && srcTp.contains(StringConstants.CLIENT_TOKEN)) {
self.assertIn(
{'node-id': 'XPDR-A2',
'otu-interface-id': ['XPDR2-NETWORK1-OTUC2'],
self.assertIn(
{'node-id': 'XPDR-A2',
'otu-interface-id': ['XPDR2-NETWORK1-OTUC2'],
- 'och-interface-id': ['XPDR2-NETWORK1-OTSIGROUP-200G']}, response['output']['node-interface'])
+ 'och-interface-id': ['XPDR2-NETWORK1-OTSIGROUP-200G',
+ 'XPDR2-NETWORK1-755:768']},
+ response['output']['node-interface'])
def test_03_get_portmapping_network1(self):
response = test_utils_rfc8040.portmapping_request("XPDR-A2", "XPDR2-NETWORK1")
def test_03_get_portmapping_network1(self):
response = test_utils_rfc8040.portmapping_request("XPDR-A2", "XPDR2-NETWORK1")
self.assertIn(
{'node-id': 'XPDR-A2',
'otu-interface-id': ['XPDR2-NETWORK1-OTUC3'],
self.assertIn(
{'node-id': 'XPDR-A2',
'otu-interface-id': ['XPDR2-NETWORK1-OTUC3'],
- 'och-interface-id': ['XPDR2-NETWORK1-OTSIGROUP-300G']}, response['output']['node-interface'])
+ 'och-interface-id': ['XPDR2-NETWORK1-755:768',
+ 'XPDR2-NETWORK1-OTSIGROUP-300G']},
+ response['output']['node-interface'])
def test_27_get_portmapping_network1(self):
response = test_utils_rfc8040.portmapping_request("XPDR-A2", "XPDR2-NETWORK1")
def test_27_get_portmapping_network1(self):
response = test_utils_rfc8040.portmapping_request("XPDR-A2", "XPDR2-NETWORK1")
self.assertIn(
{'node-id': 'XPDR-A2',
'otu-interface-id': ['XPDR2-NETWORK1-OTUC4'],
self.assertIn(
{'node-id': 'XPDR-A2',
'otu-interface-id': ['XPDR2-NETWORK1-OTUC4'],
- 'och-interface-id': ['XPDR2-NETWORK1-OTSIGROUP-400G']}, response['output']['node-interface'])
+ 'och-interface-id': ['XPDR2-NETWORK1-755:768',
+ 'XPDR2-NETWORK1-OTSIGROUP-400G']},
+ response['output']['node-interface'])
def test_41_get_portmapping_network1(self):
response = test_utils_rfc8040.portmapping_request("XPDR-A2", "XPDR2-NETWORK1")
def test_41_get_portmapping_network1(self):
response = test_utils_rfc8040.portmapping_request("XPDR-A2", "XPDR2-NETWORK1")