+ private void createHighOrderInterfaces(OtnServicePathInput input, List<NodeInterface> nodeInterfaces,
+ CopyOnWriteArrayList<LinkTp> linkTpList) throws OpenRoadmInterfaceException {
+ for (Nodes node : input.getNodes()) {
+ // 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) {
+ String supEthInter = openRoadmInterfaceFactory.createOpenRoadmEth100GInterface(
+ node.getNodeId(), node.getClientTp());
+ createdEthInterfaces.add(supEthInter);
+ createdOduInterfaces.add(openRoadmInterfaceFactory.createOpenRoadmOdu4HOInterface(
+ node.getNodeId(), node.getClientTp(), false, supEthInter));
+ }
+ createdOduInterfaces.add(
+ // supporting interface? payload ?
+ openRoadmInterfaceFactory.createOpenRoadmOdu4HOInterface(node.getNodeId(), node.getNetworkTp(),
+ true, null));
+ linkTpList.add(
+ new LinkTpBuilder().setNodeId(node.getNodeId()).setTpId(node.getNetworkTp()).build());
+ if (node.getNetwork2Tp() != null) {
+ createdOduInterfaces.add(
+ // supporting interface? payload ?
+ openRoadmInterfaceFactory.createOpenRoadmOdu4HOInterface(node.getNodeId(),
+ node.getNetwork2Tp(), true, null));
+ linkTpList.add(
+ new LinkTpBuilder().setNodeId(node.getNodeId()).setTpId(node.getNetworkTp()).build());
+ }
+ break;
+ default:
+ LOG.error("service rate {} not managed yet", input.getServiceRate());
+ return;
+ }
+
+ // implement cross connect
+ List<String> createdConnections = new ArrayList<>();
+ if (!createdOduInterfaces.isEmpty()) {
+ 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());
+ }
+ }
+