blob: 17f58683aef6302c8fcf8531837bd25e616a2cfc [file] [log] [blame]
oleksandr.yashchuk@plvision.eu3dbcaaf2019-03-13 14:44:46 +02001/*
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
17package org.onosproject.net.behaviour;
18
19import org.onosproject.net.driver.HandlerBehaviour;
20
21import java.util.concurrent.CompletableFuture;
22
23/**
24 * Handler behaviour capable of device reboot execution and getting system time since UNIX epoch.
25 */
26public interface BasicSystemOperations extends HandlerBehaviour {
27
28 /**
29 * Causes the target to reboot immediately.
30 *
31 * @return true if the operation was successful, false otherwise
32 */
33 CompletableFuture<Boolean> reboot();
34
35 /**
36 * Returns the current time on the target.
37 *
38 * @return Current time in nanoseconds since UNIX epoch.
39 */
40 CompletableFuture<Long> time();
41}