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 * @return optional of connection number
46 Optional<String> postCrossConnect(String deviceId, Long waveNumber, String srcTp, String destTp);
49 * This method does a delete(edit-config) on roadm connection subtree for a
50 * given connection number.
54 * @param connectionNumber
55 * Name of the cross connect.
57 * True for odu-connection, False for roadm-connection.
59 * @return true/false based on status of operation.
61 List<String> deleteCrossConnect(String deviceId, String connectionNumber, Boolean isOtn);
64 * This public method returns the list of ports (port-trail) for a roadm's
65 * cross connect. It calls rpc get-port-trail on device. To be used store
66 * detailed path description.
73 * Source logical connection point.
75 * Destination logical connection point.
77 * @return list of Ports object type.
79 * @throws OpenRoadmInterfaceException
80 * an exception at OpenRoadm interface.
82 List<?> getConnectionPortTrail(String nodeId, Long waveNumber, String srcTp, String destTp)
83 throws OpenRoadmInterfaceException;
86 * This method does an edit-config on roadm connection subtree for a given
87 * connection number in order to set power level for use by the optical
93 * Optical control modelcan be off, power or gainLoss.
96 * @param connectionNumber
97 * Name of the cross connect.
98 * @return true/false based on status of operation.
100 boolean setPowerLevel(String deviceId, String mode, BigDecimal powerValue,
101 String connectionNumber);
103 Optional<String> postOtnCrossConnect(List<String> createdOduInterfaces, Nodes node) throws
104 OpenRoadmInterfaceException;