package ietf-network 2015-06-08 yang models
[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>> cancelResourceReserve(CancelResourceReserveInput input) {
38         // TODO Auto-generated method stub
39         return null;
40     }
41
42     @Override
43     public ListenableFuture<RpcResult<ServiceDeleteOutput>> serviceDelete(ServiceDeleteInput input) {
44         // TODO Auto-generated method stub
45         return null;
46     }
47
48     @Override
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));
54     }
55
56     @Override
57     public ListenableFuture<RpcResult<PathComputationRequestOutput>> pathComputationRequest(PathComputationRequestInput input) {
58         // TODO Auto-generated method stub
59         return null;
60     }
61
62 }
63