Renderer and OLM update
[transportpce.git] / olm / src / main / java / org / opendaylight / transportpce / olm / service / OlmPowerService.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.olm.service;
10
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossBaseInput;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossBaseOutput;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossCurrentInput;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.CalculateSpanlossCurrentOutput;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmInput;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.GetPmOutput;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerResetInput;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerResetOutput;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupInput;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerSetupOutput;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownInput;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.olm.rev170418.ServicePowerTurndownOutput;
23
24 public interface OlmPowerService {
25
26     /**
27      * This method is the implementation of the 'get-pm' service.
28      *
29      * <p>
30      * 1. get-pm This operation traverse through current PM list and gets PM for
31      * given NodeId and Resource name
32      *
33      * @param input
34      *            Input parameter from the olm yang model
35      *
36      * @return Result of the request
37      */
38     GetPmOutput getPm(GetPmInput input);
39
40     /**
41      * This method is the implementation of the 'service-power-setup'.
42      *
43      * <p>
44      * 1. service-power-setup: This operation performs following steps:
45      *    Step1: Calculate Spanloss on all links which are part of service.
46      *    TODO Step2: Calculate power levels for each Tp-Id
47      *    TODO Step3: Post power values on roadm connections
48      *
49      * @param input
50      *            Input parameter from the olm yang model
51      *            Input will contain nodeId and termination point
52      *
53      * @return Result of the request
54      */
55     ServicePowerSetupOutput servicePowerSetup(ServicePowerSetupInput input);
56
57     /**
58      * This method is the implementation of the 'service-power-trundown'.
59      *
60      * <p>
61      * 1. service-power-turndown: This operation performs following steps:
62      *    Step1: For each TP within Node sets interface outofservice .
63      *    Step2: For each roam-connection sets power to -60dbm
64      *    Step3: Turns power mode off
65      *
66      * @param input
67      *            Input parameter from the olm yang model
68      *            Input will contain nodeId and termination point
69      *
70      * @return Result of the request
71      */
72     ServicePowerTurndownOutput servicePowerTurndown(ServicePowerTurndownInput input);
73
74     /**
75      * This method calculates Spanloss for all Roadm to Roadm links,
76      * part of active inventory in Network Model or for newly added links
77      * based on input src-type.
78      *
79      * <p>
80      * 1. Calculate-Spanloss-Base: This operation performs following steps:
81      *    Step1: Read all Roadm-to-Roadm links from network model or get data for given linkID.
82      *    Step2: Retrieve PMs for each end point for OTS interface
83      *    Step3: Calculates Spanloss
84      *    Step4: Posts calculated spanloss in Device and in network model
85      *
86      * @param input
87      *            Input parameter from the olm yang model
88      *            Input will contain SourceType and linkId if srcType is Link
89      *
90      * @return Result of the request
91      */
92     CalculateSpanlossBaseOutput calculateSpanlossBase(CalculateSpanlossBaseInput input);
93
94     CalculateSpanlossCurrentOutput calculateSpanlossCurrent(
95             CalculateSpanlossCurrentInput input);
96
97     ServicePowerResetOutput servicePowerReset(ServicePowerResetInput input);
98 }