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;
16 public interface CrossConnect {
19 * This method return the RoadmConnection subtree for a given connection
24 * @param connectionNumber
25 * Name of the cross connect.
27 * @return Roadm connection subtree from the device.
29 <T> Optional<T> getCrossConnect(String deviceId, String connectionNumber);
32 * This method does a post(edit-config) on roadm connection subtree for a
33 * given connection number.
40 * Name of source termination point.
42 * Name of destination termination point.
43 * @return optional of connection number
45 Optional<String> postCrossConnect(String deviceId, Long waveNumber, String srcTp, String destTp);
48 * This method does a delete(edit-config) on roadm connection subtree for a
49 * given connection number.
53 * @param connectionNumber
54 * Name of the cross connect.
56 * @return true/false based on status of operation.
59 List<String> deleteCrossConnect(String deviceId, String connectionNumber);
62 * This public method returns the list of ports (port-trail) for a roadm's
63 * cross connect. It calls rpc get-port-trail on device. To be used store
64 * detailed path description.
71 * Source logical connection point.
73 * Destination logical connection point.
75 * @return list of Ports object type.
77 <T> List<T> getConnectionPortTrail(String nodeId, Long waveNumber, String srcTp, String destTp)
78 throws OpenRoadmInterfaceException;
81 * This method does an edit-config on roadm connection subtree for a given
82 * connection number in order to set power level for use by the optical
88 * Optical control modelcan be off, power or gainLoss.
91 * @param connectionNumber
92 * Name of the cross connect.
93 * @return true/false based on status of operation.
95 boolean setPowerLevel(String deviceId, Enum mode, BigDecimal powerValue,
96 String connectionNumber);