2 * Copyright © 2024 Orange, Inc. 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 static java.util.Objects.requireNonNull;
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;
22 * Rollback created interfaces and cross connects specified by input.
25 public class RendererRollbackImpl implements RendererRollback {
26 private DeviceRendererService deviceRendererService;
28 public RendererRollbackImpl(final DeviceRendererService deviceRendererService) {
29 this.deviceRendererService = requireNonNull(deviceRendererService);
33 public ListenableFuture<RpcResult<RendererRollbackOutput>> invoke(RendererRollbackInput input) {
34 return RpcResultBuilder.success(this.deviceRendererService.rendererRollback(input)).buildFuture();