c15a936382de0f839ea3faa6362ad08015f8a928
[transportpce.git] / renderer / src / main / java / org / opendaylight / transportpce / renderer / rpcs / TransportPCEServicePathRPCImpl.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 package org.opendaylight.transportpce.renderer.rpcs;
9
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;
25
26 public class TransportPCEServicePathRPCImpl implements TransportpceServicepathService {
27
28     private static final Logger LOG = LoggerFactory.getLogger(TransportPCEServicePathRPCImpl.class);
29
30     private final RendererServiceOperations rendererServiceOperations;
31
32     public TransportPCEServicePathRPCImpl(RendererServiceOperations rendererServiceOperations) {
33         this.rendererServiceOperations = rendererServiceOperations;
34     }
35
36     @Override
37     public ListenableFuture<RpcResult<CancelResourceReserveOutput>>
38             cancelResourceReserve(CancelResourceReserveInput input) {
39         // TODO Auto-generated method stub
40         return null;
41     }
42
43     @Override
44     public ListenableFuture<RpcResult<ServiceDeleteOutput>> serviceDelete(ServiceDeleteInput input) {
45         // TODO Auto-generated method stub
46         return null;
47     }
48
49     @Override
50     public ListenableFuture<RpcResult<ServiceImplementationRequestOutput>> serviceImplementationRequest(
51             ServiceImplementationRequestInput input) {
52         String serviceName = input.getServiceName();
53         LOG.info("Calling RPC service impl request {} {}", serviceName);
54         return ModelMappingUtils.createRpcResponse(this.rendererServiceOperations.serviceImplementation(input));
55     }
56
57     @Override
58     public ListenableFuture<RpcResult<PathComputationRequestOutput>>
59             pathComputationRequest(PathComputationRequestInput input) {
60         // TODO Auto-generated method stub
61         return null;
62     }
63
64 }
65