-public class OlmPowerServiceRpcImpl implements TransportpceOlmService {
- private final OlmPowerService olmPowerService;
-
- public OlmPowerServiceRpcImpl(OlmPowerService olmPowerService) {
- this.olmPowerService = olmPowerService;
- }
-
- /**
- * This method is the implementation of the 'get-pm' RESTCONF service, which
- * is one of the external APIs into the olm application.
- *
- * <p>
- * 1. get-pm This operation traverse through current PM list and gets PM for
- * given NodeId and Resource name
- *
- * <p>
- * The signature for this method was generated by yang tools from the
- * olm API model.
- *
- * @param input
- * Input parameter from the olm yang model
- *
- * @return Result of the request
- */
- @Override
- public ListenableFuture<RpcResult<GetPmOutput>> getPm(GetPmInput input) {
- return RpcResultBuilder.success(this.olmPowerService.getPm(input)).buildFuture();
- }
-
- /**
- * This method is the implementation of the 'service-power-setup' RESTCONF service, which
- * is one of the external APIs into the olm application.
- *
- * <p>
- * 1. service-power-setup: This operation performs following steps:
- * Step1: Calculate Spanloss on all links which are part of service.
- * TODO Step2: Calculate power levels for each Tp-Id
- * TODO Step3: Post power values on roadm connections
- *
- * <p>
- * The signature for this method was generated by yang tools from the
- * olm API model.
- *
- * @param input
- * Input parameter from the olm yang model
- * Input will contain nodeId and termination point
- *
- * @return Result of the request
- */
- @Override
- public ListenableFuture<RpcResult<ServicePowerSetupOutput>> servicePowerSetup(
- ServicePowerSetupInput input) {
- return RpcResultBuilder.success(this.olmPowerService.servicePowerSetup(input)).buildFuture();
- }
-
- /**
- * This method is the implementation of the 'service-power-trundown' RESTCONF service, which
- * is one of the external APIs into the olm application.
- *
- * <p>
- * 1. service-power-turndown: This operation performs following steps:
- * Step1: For each TP within Node sets interface outofservice .
- * Step2: For each roam-connection sets power to -60dbm
- * Step3: Turns power mode off
- *
- * <p>
- * The signature for this method was generated by yang tools from the
- * olm API model.
- *
- * @param input
- * Input parameter from the olm yang model
- * Input will contain nodeId and termination point
- *
- * @return Result of the request
- */
- @Override
- public ListenableFuture<RpcResult<ServicePowerTurndownOutput>>
- servicePowerTurndown(ServicePowerTurndownInput input) {
- return RpcResultBuilder.success(this.olmPowerService.servicePowerTurndown(input)).buildFuture();
- }