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