package org.opendaylight.transportpce.common.crossconnect;
+import java.math.BigDecimal;
import java.util.List;
import java.util.Optional;
-
+import org.opendaylight.transportpce.common.fixedflex.SpectrumInformation;
import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaceException;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.get.connection.port.trail.output.Ports;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.org.openroadm.device.container.org.openroadm.device.RoadmConnections;
+import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev210930.otn.renderer.nodes.Nodes;
public interface CrossConnect {
* @param connectionNumber
* Name of the cross connect.
*
- * @return Roadm connection subtree from the device.
+ * @return optional of Roadm connection subtree from the device.
*/
- Optional<RoadmConnections> getCrossConnect(String deviceId, String connectionNumber);
+ Optional<?> getCrossConnect(String deviceId, String connectionNumber);
/**
* This method does a post(edit-config) on roadm connection subtree for a
*
* @param deviceId
* Device id.
- * @param waveNumber
- * Wavelength number.
* @param srcTp
* Name of source termination point.
* @param destTp
* Name of destination termination point.
+ * @param spectrumInformation SpectrumInformation
* @return optional of connection number
*/
- Optional<String> postCrossConnect(String deviceId, Long waveNumber, String srcTp, String destTp);
+ Optional<String> postCrossConnect(String deviceId, String srcTp, String destTp,
+ SpectrumInformation spectrumInformation);
/**
* This method does a delete(edit-config) on roadm connection subtree for a
* Device id.
* @param connectionNumber
* Name of the cross connect.
+ * @param isOtn
+ * True for odu-connection, False for roadm-connection.
*
- * @return true/false based on status of operation.
+ * @return the list of interface-names that were supporting the connection.
*/
-
- boolean deleteCrossConnect(String deviceId, String connectionNumber);
+ List<String> deleteCrossConnect(String deviceId, String connectionNumber, Boolean isOtn);
/**
* This public method returns the list of ports (port-trail) for a roadm's
*
* @param nodeId
* node-id of NE.
- * @param waveNumber
- * Wavelength number.
* @param srcTp
* Source logical connection point.
* @param destTp
* Destination logical connection point.
- *
+ * @param lowerSpectralSlotNumber Value of lower spectral slot number.
+ * @param higherSpectralSlotNumber Value of higher spectral slot number.
* @return list of Ports object type.
+ *
+ * @throws OpenRoadmInterfaceException
+ * an exception at OpenRoadm interface.
*/
- List<Ports> getConnectionPortTrail(String nodeId, Long waveNumber, String srcTp, String destTp)
+ List<?> getConnectionPortTrail(String nodeId, String srcTp, String destTp, int lowerSpectralSlotNumber,
+ int higherSpectralSlotNumber)
throws OpenRoadmInterfaceException;
+
+ /**
+ * This method does an edit-config on roadm connection subtree for a given
+ * connection number in order to set power level for use by the optical
+ * power control.
+ *
+ * @param deviceId
+ * Device id.
+ * @param mode
+ * Optical control modelcan be off, power or gainLoss.
+ * @param powerValue
+ * Power value in DBm.
+ * @param connectionNumber
+ * Name of the cross connect.
+ * @return true/false based on status of operation.
+ */
+ boolean setPowerLevel(String deviceId, String mode, BigDecimal powerValue,
+ String connectionNumber);
+
+ Optional<String> postOtnCrossConnect(List<String> createdOduInterfaces, Nodes node) throws
+ OpenRoadmInterfaceException;
+
}