2 * Copyright © 2017 AT&T and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.transportpce.common.crossconnect;
11 import java.math.BigDecimal;
12 import java.util.List;
13 import java.util.Optional;
14 import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaceException;
15 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev201211.otn.renderer.input.Nodes;
17 public interface CrossConnect {
20 * This method return the RoadmConnection subtree for a given connection
25 * @param connectionNumber
26 * Name of the cross connect.
28 * @return optional of Roadm connection subtree from the device.
30 Optional<?> getCrossConnect(String deviceId, String connectionNumber);
33 * This method does a post(edit-config) on roadm connection subtree for a
34 * given connection number.
41 * Name of source termination point.
43 * Name of destination termination point.
44 * @param lowerSpectralSlotNumber Value of lower spectral slot number.
45 * @param higherSpectralSlotNumber Value of higher spectral slot number.
46 * @return optional of connection number
48 Optional<String> postCrossConnect(String deviceId, Long waveNumber, String srcTp, String destTp,
49 int lowerSpectralSlotNumber, int higherSpectralSlotNumber);
52 * This method does a delete(edit-config) on roadm connection subtree for a
53 * given connection number.
57 * @param connectionNumber
58 * Name of the cross connect.
60 * True for odu-connection, False for roadm-connection.
62 * @return true/false based on status of operation.
64 List<String> deleteCrossConnect(String deviceId, String connectionNumber, Boolean isOtn);
67 * This public method returns the list of ports (port-trail) for a roadm's
68 * cross connect. It calls rpc get-port-trail on device. To be used store
69 * detailed path description.
76 * Source logical connection point.
78 * Destination logical connection point.
79 * @param lowerSpectralSlotNumber Value of lower spectral slot number.
80 * @param higherSpectralSlotNumber Value of higher spectral slot number.
81 * @return list of Ports object type.
83 * @throws OpenRoadmInterfaceException
84 * an exception at OpenRoadm interface.
86 List<?> getConnectionPortTrail(String nodeId, Long waveNumber, String srcTp, String destTp,
87 int lowerSpectralSlotNumber, int higherSpectralSlotNumber)
88 throws OpenRoadmInterfaceException;
91 * This method does an edit-config on roadm connection subtree for a given
92 * connection number in order to set power level for use by the optical
98 * Optical control modelcan be off, power or gainLoss.
100 * Power value in DBm.
101 * @param connectionNumber
102 * Name of the cross connect.
103 * @return true/false based on status of operation.
105 boolean setPowerLevel(String deviceId, String mode, BigDecimal powerValue,
106 String connectionNumber);
108 Optional<String> postOtnCrossConnect(List<String> createdOduInterfaces, Nodes node) throws
109 OpenRoadmInterfaceException;