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 java.util.concurrent.Future;
12 import org.opendaylight.transportpce.renderer.ModelMappingUtils;
13 import org.opendaylight.transportpce.renderer.provisiondevice.RendererServiceOperations;
14 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.CancelResourceReserveInput;
15 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.CancelResourceReserveOutput;
16 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.PathComputationRequestInput;
17 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.PathComputationRequestOutput;
18 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteInput;
19 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceDeleteOutput;
20 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestInput;
21 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.ServiceImplementationRequestOutput;
22 import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.TransportpceServicepathService;
23 import org.opendaylight.yangtools.yang.common.RpcResult;
24 import org.slf4j.Logger;
25 import org.slf4j.LoggerFactory;
27 public class TransportPCEServicePathRPCImpl implements TransportpceServicepathService {
29 private static final Logger LOG = LoggerFactory.getLogger(TransportPCEServicePathRPCImpl.class);
31 private final RendererServiceOperations rendererServiceOperations;
33 public TransportPCEServicePathRPCImpl(RendererServiceOperations rendererServiceOperations) {
34 this.rendererServiceOperations = rendererServiceOperations;
38 public Future<RpcResult<CancelResourceReserveOutput>> cancelResourceReserve(CancelResourceReserveInput input) {
39 // TODO Auto-generated method stub
44 public Future<RpcResult<ServiceDeleteOutput>> serviceDelete(ServiceDeleteInput input) {
45 // TODO Auto-generated method stub
50 public Future<RpcResult<ServiceImplementationRequestOutput>> serviceImplementationRequest(
51 ServiceImplementationRequestInput input) {
52 String serviceName = input.getServiceName();
53 LOG.info("Calling RPC service impl request {} {}", serviceName);
54 return ModelMappingUtils.createRpcResponse(rendererServiceOperations.serviceImplementation(input));
58 public Future<RpcResult<PathComputationRequestOutput>> pathComputationRequest(PathComputationRequestInput input) {
59 // TODO Auto-generated method stub