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.fixedflex.SpectrumInformation;
15 import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaceException;
16 import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev210618.otn.renderer.nodes.Nodes;
18 public interface CrossConnect {
21 * This method return the RoadmConnection subtree for a given connection
26 * @param connectionNumber
27 * Name of the cross connect.
29 * @return optional of Roadm connection subtree from the device.
31 Optional<?> getCrossConnect(String deviceId, String connectionNumber);
34 * This method does a post(edit-config) on roadm connection subtree for a
35 * given connection number.
40 * Name of source termination point.
42 * Name of destination termination point.
43 * @param spectrumInformation SpectrumInformation
44 * @return optional of connection number
46 Optional<String> postCrossConnect(String deviceId, String srcTp, String destTp,
47 SpectrumInformation spectrumInformation);
50 * This method does a delete(edit-config) on roadm connection subtree for a
51 * given connection number.
55 * @param connectionNumber
56 * Name of the cross connect.
58 * True for odu-connection, False for roadm-connection.
60 * @return true/false based on status of operation.
62 List<String> deleteCrossConnect(String deviceId, String connectionNumber, Boolean isOtn);
65 * This public method returns the list of ports (port-trail) for a roadm's
66 * cross connect. It calls rpc get-port-trail on device. To be used store
67 * detailed path description.
72 * Source logical connection point.
74 * Destination logical connection point.
75 * @param lowerSpectralSlotNumber Value of lower spectral slot number.
76 * @param higherSpectralSlotNumber Value of higher spectral slot number.
77 * @return list of Ports object type.
79 * @throws OpenRoadmInterfaceException
80 * an exception at OpenRoadm interface.
82 List<?> getConnectionPortTrail(String nodeId, String srcTp, String destTp, int lowerSpectralSlotNumber,
83 int higherSpectralSlotNumber)
84 throws OpenRoadmInterfaceException;
87 * This method does an edit-config on roadm connection subtree for a given
88 * connection number in order to set power level for use by the optical
94 * Optical control modelcan be off, power or gainLoss.
97 * @param connectionNumber
98 * Name of the cross connect.
99 * @return true/false based on status of operation.
101 boolean setPowerLevel(String deviceId, String mode, BigDecimal powerValue,
102 String connectionNumber);
104 Optional<String> postOtnCrossConnect(List<String> createdOduInterfaces, Nodes node) throws
105 OpenRoadmInterfaceException;