2 * Copyright © 2017 AT&T and others. All rights reserved.
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
8 package org.opendaylight.transportpce.renderer.rpcs;
10 import com.google.common.util.concurrent.ListenableFuture;
11 import org.opendaylight.transportpce.renderer.ModelMappingUtils;
12 import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOperations;
13 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.CancelResourceReserveInput;
14 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.CancelResourceReserveOutput;
15 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.PathComputationRequestInput;
16 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.PathComputationRequestOutput;
17 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteInput;
18 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteOutput;
19 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestInput;
20 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestOutput;
21 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.TransportpceServicepathService;
22 import org.opendaylight.yangtools.yang.common.RpcResult;
23 import org.slf4j.Logger;
24 import org.slf4j.LoggerFactory;
26 public class TransportPCEServicePathRPCImpl implements TransportpceServicepathService {
28 private static final Logger LOG = LoggerFactory.getLogger(TransportPCEServicePathRPCImpl.class);
30 private final RendererServiceOperations rendererServiceOperations;
32 public TransportPCEServicePathRPCImpl(RendererServiceOperations rendererServiceOperations) {
33 this.rendererServiceOperations = rendererServiceOperations;
37 public ListenableFuture<RpcResult<CancelResourceReserveOutput>> cancelResourceReserve(CancelResourceReserveInput input) {
38 // TODO Auto-generated method stub
43 public ListenableFuture<RpcResult<ServiceDeleteOutput>> serviceDelete(ServiceDeleteInput input) {
44 // TODO Auto-generated method stub
49 public ListenableFuture<RpcResult<ServiceImplementationRequestOutput>> serviceImplementationRequest(
50 ServiceImplementationRequestInput input) {
51 String serviceName = input.getServiceName();
52 LOG.info("Calling RPC service impl request {} {}", serviceName);
53 return ModelMappingUtils.createRpcResponse(this.rendererServiceOperations.serviceImplementation(input));
57 public ListenableFuture<RpcResult<PathComputationRequestOutput>> pathComputationRequest(PathComputationRequestInput input) {
58 // TODO Auto-generated method stub