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