+ private void createHighOrderInterfaces(OtnServicePathInput input, List<NodeInterface> nodeInterfaces,
+ CopyOnWriteArrayList<LinkTp> linkTpList) throws OpenRoadmInterfaceException {
+ for (Nodes node : input.nonnullNodes()) {
+ AEndApiInfo apiInfoA = null;
+ ZEndApiInfo apiInfoZ = null;
+ if (input.getAEndApiInfo() != null && input.getAEndApiInfo().getNodeId().contains(node.getNodeId())) {
+ apiInfoA = input.getAEndApiInfo();
+ }
+ if (input.getZEndApiInfo() != null && input.getZEndApiInfo().getNodeId().contains(node.getNodeId())) {
+ apiInfoZ = input.getZEndApiInfo();
+ }
+ // check if the node is mounted or not?
+ List<String> createdEthInterfaces = new ArrayList<>();
+ List<String> createdOduInterfaces = new ArrayList<>();
+ switch (input.getServiceRate().intValue()) {
+ case 100:
+ LOG.info("Input service is 100G");
+ if (node.getClientTp() != null && node.getNetwork2Tp() == null) {
+ createdEthInterfaces.add(openRoadmInterfaceFactory.createOpenRoadmEth100GInterface(
+ node.getNodeId(), node.getClientTp()));
+ createdOduInterfaces.add(openRoadmInterfaceFactory.createOpenRoadmOdu4HOInterface(
+ node.getNodeId(), node.getClientTp(), false, apiInfoA, apiInfoZ, "21"));
+ // supporting interface? payload ?
+ createdOduInterfaces.add(openRoadmInterfaceFactory.createOpenRoadmOdu4HOInterface(
+ node.getNodeId(), node.getNetworkTp(), true, null, null, null));
+ linkTpList.add(new LinkTpBuilder().setNodeId(node.getNodeId()).setTpId(node.getClientTp())
+ .build());
+ }
+ if (node.getClientTp() == null && node.getNetwork2Tp() == null) {
+ createdOduInterfaces.add(openRoadmInterfaceFactory.createOpenRoadmOdu4HOInterface(
+ node.getNodeId(), node.getNetworkTp(), false, apiInfoA, apiInfoZ, "21"));
+ linkTpList.add(new LinkTpBuilder().setNodeId(node.getNodeId()).setTpId(node.getNetworkTp())
+ .build());
+ }
+ if (node.getClientTp() == null && node.getNetwork2Tp() != null) {
+ // supporting interface? payload ?
+ createdOduInterfaces.add(openRoadmInterfaceFactory.createOpenRoadmOdu4HOInterface(
+ node.getNodeId(), node.getNetworkTp(), true, null, null, null));
+ createdOduInterfaces.add(openRoadmInterfaceFactory.createOpenRoadmOdu4HOInterface(
+ node.getNodeId(), node.getNetwork2Tp(), true, null, null, null));
+ }
+ break;
+ default:
+ LOG.error("service rate {} not managed yet", input.getServiceRate());
+ return;
+ }
+
+ // implement cross connect
+ List<String> createdConnections = new ArrayList<>();
+ if (createdOduInterfaces.size() == 2) {
+ Optional<String> connectionNameOpt = postCrossConnect(createdOduInterfaces, node);
+ createdConnections.add(connectionNameOpt.get());
+ LOG.info("Created cross connects");
+ }
+ nodeInterfaces.add(new NodeInterfaceBuilder()
+ .withKey(new NodeInterfaceKey(node.getNodeId()))
+ .setNodeId(node.getNodeId())
+ .setConnectionId(createdConnections)
+ .setEthInterfaceId(createdEthInterfaces)
+ .setOduInterfaceId(createdOduInterfaces)
+ .build());
+ }
+ }
+
+ private void createOducnTtpInterface(OtnServicePathInput input, List<NodeInterface> nodeInterfaces,
+ CopyOnWriteArrayList<LinkTp> linkTpList) throws OpenRoadmInterfaceException {