fix some compilation warnings
[transportpce.git] / common / src / main / java / org / opendaylight / transportpce / common / crossconnect / CrossConnect.java
1 /*
2  * Copyright © 2017 AT&T and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.transportpce.common.crossconnect;
10
11 import java.util.List;
12 import java.util.Optional;
13
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;
17
18 public interface CrossConnect {
19
20     /**
21      * This method return the RoadmConnection subtree for a given connection
22      * number.
23      *
24      * @param deviceId
25      *            Device id.
26      * @param connectionNumber
27      *            Name of the cross connect.
28      *
29      * @return Roadm connection subtree from the device.
30      */
31     Optional<RoadmConnections> getCrossConnect(String deviceId, String connectionNumber);
32
33     /**
34      * This method does a post(edit-config) on roadm connection subtree for a
35      * given connection number.
36      *
37      * @param deviceId
38      *            Device id.
39      * @param waveNumber
40      *            Wavelength number.
41      * @param srcTp
42      *            Name of source termination point.
43      * @param destTp
44      *            Name of destination termination point.
45      * @return optional of connection number
46      */
47     Optional<String> postCrossConnect(String deviceId, Long waveNumber, String srcTp, String destTp);
48
49     /**
50      * This method does a delete(edit-config) on roadm connection subtree for a
51      * given connection number.
52      *
53      * @param deviceId
54      *            Device id.
55      * @param connectionNumber
56      *            Name of the cross connect.
57      *
58      * @return true/false based on status of operation.
59      */
60
61     boolean deleteCrossConnect(String deviceId, String connectionNumber);
62
63     /**
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.
67      *
68      * @param nodeId
69      *            node-id of NE.
70      * @param waveNumber
71      *            Wavelength number.
72      * @param srcTp
73      *            Source logical connection point.
74      * @param destTp
75      *            Destination logical connection point.
76      *
77      * @return list of Ports object type.
78      *
79      * @throws OpenRoadmInterfaceException
80      *            OpenRoadm Interface Exception.
81      */
82     List<Ports> getConnectionPortTrail(String nodeId, Long waveNumber, String srcTp, String destTp)
83             throws OpenRoadmInterfaceException;
84 }