Upgrade to Service Path 1.7
[transportpce.git] / renderer / src / main / java / org / opendaylight / transportpce / renderer / provisiondevice / DeviceRendererService.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.renderer.provisiondevice;
10
11 import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaceException;
12 import org.opendaylight.transportpce.renderer.provisiondevice.servicepath.ServicePathDirection;
13 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev200128.CreateOtsOmsInput;
14 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev200128.CreateOtsOmsOutput;
15 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev200128.RendererRollbackInput;
16 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev200128.RendererRollbackOutput;
17 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev200128.ServicePathInput;
18 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev200128.ServicePathOutput;
19
20
21 public interface DeviceRendererService {
22
23     /**
24      * This method set's wavelength path based on following steps.
25      *
26      * <p>
27      * For each node:
28      * 1. Create Och interface on source termination point.
29      * 2. Create Och interface on destination termination point.
30      * 3. Create cross connect between source and destination tps created in step 1
31      *    and 2.
32      *
33      * Naming convention used for OCH interfaces name : tp-wavenumber Naming
34      * convention used for cross connect name : src-dest-wavenumber
35      * </p>
36      *
37      * @param input
38      *            Input parameter from the service-path yang model
39      * @param direction
40      *            Service Path direction
41      *
42      * @return Result list of all nodes if request successful otherwise specific
43      *         reason of failure.
44      */
45     ServicePathOutput setupServicePath(ServicePathInput input, ServicePathDirection direction);
46
47     /**
48      * This method removes wavelength path based on following steps.
49      *
50      * <p>
51      * For each node:
52      * 1. Delete Cross connect between source and destination tps.
53      * 2. Delete Och interface on source termination point.
54      * 3. Delete Och interface on destination termination point.
55      *
56      * Naming convention used for OCH interfaces name : tp-wavenumber Naming
57      * convention used for cross connect name : src-dest-wavenumber
58      * </p>
59      *
60      * @param input
61      *            Input parameter from the service-path yang model
62      *
63      * @return Result result of the request.
64      */
65     ServicePathOutput deleteServicePath(ServicePathInput input);
66
67     /**
68      * Rollback created interfaces and cross connects specified by input.
69      *
70      * @param input Lists of created interfaces and connections per node
71      * @return Success flag and nodes which failed to rollback
72      */
73     RendererRollbackOutput rendererRollback(RendererRollbackInput input);
74
75     /**
76      * This method creates the basis of ots and oms interfaces on a specific ROADM degree.
77      *
78      * @param input
79      *             Input parameter from the create-ots-oms yang model
80      * @return Success flag and names of interfaces created
81      * @throws OpenRoadmInterfaceException OpenRoadmInterfaceException
82      */
83     CreateOtsOmsOutput createOtsOms(CreateOtsOmsInput input) throws OpenRoadmInterfaceException;
84 }