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.util.List;
12 import java.util.Optional;
14 import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaceException;
15 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.get.connection.port.trail.output.Ports;
16 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.org.openroadm.device.container.org.openroadm.device.RoadmConnections;
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 Roadm connection subtree from the device.
31 Optional<RoadmConnections> getCrossConnect(String deviceId, String connectionNumber);
34 * This method does a post(edit-config) on roadm connection subtree for a
35 * given connection number.
42 * Name of source termination point.
44 * Name of destination termination point.
45 * @return optional of connection number
47 Optional<String> postCrossConnect(String deviceId, Long waveNumber, String srcTp, String destTp);
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 * @return true/false based on status of operation.
61 boolean deleteCrossConnect(String deviceId, String connectionNumber);
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 * OpenRoadm Interface Exception.
82 List<Ports> getConnectionPortTrail(String nodeId, Long waveNumber, String srcTp, String destTp)
83 throws OpenRoadmInterfaceException;