- ForkJoinTask forkJoinTask = forkJoinPool.submit(() ->
- nodes.parallelStream().forEach(node -> {
- String nodeId = node.getNodeId();
- LOG.info("Starting provisioning for node : {}", nodeId);
- List<String> createdEthInterfaces = new ArrayList<>();
- List<String> createdOtuInterfaces = new ArrayList<>();
- List<String> createdOduInterfaces = new ArrayList<>();
- List<String> createdOchInterfaces = new ArrayList<>();
- List<String> createdConnections = new ArrayList<>();
- int crossConnectFlag = 0;
-
- try {
- // if the node is currently mounted then proceed
- if (this.deviceTransactionManager.isDeviceMounted(nodeId)) {
- String srcTp = node.getSrcTp();
- String destTp = node.getDestTp();
-
- Long waveNumber = input.getWaveNumber();
- if ((destTp != null) && destTp.contains(OpenRoadmInterfacesImpl.NETWORK_TOKEN)) {
- crossConnectFlag++;
- // create OpenRoadm Xponder Line Interfaces
- String supportingOchInterface = this.openRoadmInterfaceFactory.createOpenRoadmOchInterface(
- nodeId, destTp, waveNumber, R100G.class, ModulationFormat.DpQpsk);
- createdOchInterfaces.add(supportingOchInterface);
-
- String supportingOtuInterface = this.openRoadmInterfaceFactory.createOpenRoadmOtu4Interface(
- nodeId, destTp, supportingOchInterface);
- createdOtuInterfaces.add(supportingOtuInterface);
-
- createdOduInterfaces.add(this.openRoadmInterfaceFactory.createOpenRoadmOdu4Interface(
- nodeId, destTp,supportingOtuInterface));
- }
- if ((srcTp != null) && srcTp.contains(OpenRoadmInterfacesImpl.CLIENT_TOKEN)) {
- crossConnectFlag++;
- // create OpenRoadm Xponder Client Interfaces
- createdEthInterfaces.add(this.openRoadmInterfaceFactory.createOpenRoadmEthInterface(nodeId,
- srcTp));
-
-
- }
- if ((srcTp != null) && srcTp.contains(OpenRoadmInterfacesImpl.NETWORK_TOKEN)) {
- crossConnectFlag++;
- // create OpenRoadm Xponder Line Interfaces
- String supportingOchInterface = this.openRoadmInterfaceFactory.createOpenRoadmOchInterface(
- nodeId, srcTp, waveNumber, R100G.class, ModulationFormat.DpQpsk);
- createdOchInterfaces.add(supportingOchInterface);
-
- String supportingOtuInterface = this.openRoadmInterfaceFactory.createOpenRoadmOtu4Interface(
- nodeId, srcTp, supportingOchInterface);
- createdOtuInterfaces.add(supportingOtuInterface);
-
- createdOduInterfaces.add(this.openRoadmInterfaceFactory.createOpenRoadmOdu4Interface(
- nodeId, srcTp, supportingOtuInterface));
- }
- if ((destTp != null) && destTp.contains(OpenRoadmInterfacesImpl.CLIENT_TOKEN)) {
- crossConnectFlag++;
- // create OpenRoadm Xponder Client Interfaces
- createdEthInterfaces.add(this.openRoadmInterfaceFactory.createOpenRoadmEthInterface(nodeId,
- destTp));
-