import org.opendaylight.transportpce.common.mapping.PortMapping;
import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaceException;
import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaces;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev201012.network.nodes.Mapping;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210315.mapping.Mapping;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev181019.FrequencyGHz;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev181019.FrequencyTHz;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.types.rev181019.ModulationFormat;
}
List<String> interfacesCreated = new ArrayList<>();
-
+ String mcInterfaceCreated = "";
if (logicalConnPoint.contains("DEG")) {
- String mcInterfaceCreated = createMCInterface(nodeId, logicalConnPoint, spectrumInformation);
+ mcInterfaceCreated = createMCInterface(nodeId, logicalConnPoint, spectrumInformation);
interfacesCreated.add(mcInterfaceCreated);
}
- String mcInterfaceCreated = createNMCInterface(nodeId, logicalConnPoint, spectrumInformation);
- interfacesCreated.add(mcInterfaceCreated);
+ String nmcInterfaceCreated = createNMCInterface(nodeId, logicalConnPoint, spectrumInformation,
+ mcInterfaceCreated);
+ interfacesCreated.add(nmcInterfaceCreated);
return interfacesCreated;
}
}
public String createNMCInterface(String nodeId, String logicalConnPoint,
- SpectrumInformation spectrumInformation)
+ SpectrumInformation spectrumInformation, String mcName)
throws OpenRoadmInterfaceException {
LOG.info("This is the central frequency {}", spectrumInformation.getCenterFrequency());
LOG.info("This is the nmc width {}", spectrumInformation.getWidth());
InterfaceBuilder nmcInterfaceBldr = createGenericInterfaceBuilder(portMap,
NetworkMediaChannelConnectionTerminationPoint.class, nmcName);
if (logicalConnPoint.contains("DEG")) {
- nmcInterfaceBldr.setSupportingInterface(nmcName);
+ nmcInterfaceBldr.setSupportingInterface(mcName);
}
NmcCtpBuilder nmcCtpIfBuilder = new NmcCtpBuilder()