/* * Copyright © 2017 AT&T 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.renderer.rpcs; import com.google.common.util.concurrent.ListenableFuture; import org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfaceException; import org.opendaylight.transportpce.renderer.provisiondevice.DeviceRendererService; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.CreateOtsOmsInput; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.CreateOtsOmsOutput; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.RendererRollbackInput; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.RendererRollbackOutput; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.ServicePathInput; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.ServicePathOutput; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.ServicePathOutputBuilder; import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.renderer.device.rev170228.TransportpceDeviceRendererService; import org.opendaylight.yangtools.yang.common.RpcResult; import org.opendaylight.yangtools.yang.common.RpcResultBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class DeviceRendererRPCImpl implements TransportpceDeviceRendererService { private static final Logger LOG = LoggerFactory.getLogger(DeviceRendererRPCImpl.class); private DeviceRendererService deviceRenderer; public DeviceRendererRPCImpl(DeviceRendererService deviceRenderer) { this.deviceRenderer = deviceRenderer; } /** * This method is the implementation of the 'service-path' RESTCONF service, * which is one of the external APIs into the renderer application. The * service provides two functions: * *
* 1. Create This operation results in provisioning the device for a given * wavelength and a list of nodes with each node listing its termination * points. * *
* 2. Delete This operation results in de-provisioning the device for a * given wavelength and a list of nodes with each node listing its * termination points. * *
* The signature for this method was generated by yang tools from the
* renderer API model.
*
* @param input
* Input parameter from the service-path yang model
*
* @return Result of the request
*/
@Override
public ListenableFuture