/* * Copyright © 2024 Orange, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.transportpce.olm.rpc.impl; import static java.util.Objects.requireNonNull; import com.google.common.util.concurrent.ListenableFuture; import org.opendaylight.transportpce.olm.service.OlmPowerService; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.ServicePowerTurndown; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.ServicePowerTurndownInput; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.olm.rev210618.ServicePowerTurndownOutput; import org.opendaylight.yangtools.yang.common.RpcResult; import org.opendaylight.yangtools.yang.common.RpcResultBuilder; /** * This class is the implementation of the 'service-power-trundown' RESTCONF service, which * is one of the external APIs into the olm application. * *

* 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 * *

* The signature for this method was generated by yang tools from the * olm API model. */ public class ServicePowerTurndownImpl implements ServicePowerTurndown { private final OlmPowerService olmPowerService; public ServicePowerTurndownImpl(final OlmPowerService olmPowerService) { this.olmPowerService = requireNonNull(olmPowerService); } @Override public ListenableFuture> invoke(ServicePowerTurndownInput input) { return RpcResultBuilder.success(this.olmPowerService.servicePowerTurndown(input)).buildFuture(); } }