Bump upstream dependencies to Ca
[transportpce.git] / renderer / src / main / java / org / opendaylight / transportpce / renderer / rpcs / RendererRollbackImpl.java
1 /*
2  * Copyright © 2024 Orange, Inc. 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 static java.util.Objects.requireNonNull;
11
12 import com.google.common.util.concurrent.ListenableFuture;
13 import org.opendaylight.transportpce.renderer.provisiondevice.DeviceRendererService;
14 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.device.renderer.rev211004.RendererRollback;
15 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.device.renderer.rev211004.RendererRollbackInput;
16 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.device.renderer.rev211004.RendererRollbackOutput;
17 import org.opendaylight.yangtools.yang.common.RpcResult;
18 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
19
20
21 /**
22  * Rollback created interfaces and cross connects specified by input.
23  *
24  */
25 public class RendererRollbackImpl implements RendererRollback {
26     private DeviceRendererService deviceRendererService;
27
28     public RendererRollbackImpl(final DeviceRendererService deviceRendererService) {
29         this.deviceRendererService = requireNonNull(deviceRendererService);
30     }
31
32     @Override
33     public ListenableFuture<RpcResult<RendererRollbackOutput>> invoke(RendererRollbackInput input) {
34         return RpcResultBuilder.success(this.deviceRendererService.rendererRollback(input)).buildFuture();
35     }
36
37 }