oleksandr.yashchuk@plvision.eu | 3dbcaaf | 2019-03-13 14:44:46 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2019-present Open Networking Foundation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package org.onosproject.gnoi.api; |
| 18 | |
| 19 | import gnoi.system.SystemOuterClass.TimeResponse; |
| 20 | import gnoi.system.SystemOuterClass.RebootRequest; |
| 21 | import gnoi.system.SystemOuterClass.RebootResponse; |
| 22 | import com.google.common.annotations.Beta; |
| 23 | import org.onosproject.grpc.api.GrpcClient; |
| 24 | import java.util.concurrent.CompletableFuture; |
| 25 | |
| 26 | /** |
| 27 | * Client to control a gNOI server. |
| 28 | */ |
| 29 | @Beta |
| 30 | public interface GnoiClient extends GrpcClient { |
| 31 | |
| 32 | /** |
| 33 | * Returns the current time on the target. |
| 34 | * |
| 35 | * @return the TimeResponse result |
| 36 | */ |
| 37 | CompletableFuture<TimeResponse> time(); |
| 38 | |
| 39 | /** |
| 40 | * Causes the target to reboot immediately. |
| 41 | * |
| 42 | * @param request RebootRequest |
| 43 | * @return the RebootResponse result |
| 44 | */ |
| 45 | CompletableFuture<RebootResponse> reboot(RebootRequest request); |
| 46 | } |