blob: 452b787af2a24718ef41934e7e30901748031b75 [file] [log] [blame]
Jonghwan Hyun722275f2018-05-14 15:44:56 -07001/*
2 * Copyright 2018-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 */
16package org.onosproject.inbandtelemetry.api;
17
18import com.google.common.annotations.Beta;
19import org.onosproject.net.driver.HandlerBehaviour;
20
21import java.util.concurrent.CompletableFuture;
22
23@Beta
24public interface IntProgrammable extends HandlerBehaviour {
25
26 /**
27 * Initializes the pipeline, by installing required flow rules
28 * not relevant to specific watchlist, report and event.
29 */
30 void init();
31
32 /**
33 * Adds a given IntObjective to the device.
34 *
35 * @param obj an IntObjective
36 * @return true if the objective is successfully added; false otherwise.
37 */
38 CompletableFuture<Boolean> addIntObjective(IntObjective obj);
39
40 /**
41 * Removes a given IntObjective entry from the device.
42 *
43 * @param obj an IntObjective
44 * @return true if the objective is successfully removed; false otherwise.
45 */
46 CompletableFuture<Boolean> removeIntObjective(IntObjective obj);
47
48 /**
49 * Set up report-related configuration.
50 *
51 * @param config a configuration regarding to the collector
52 * @return true if the objective is successfully added; false otherwise.
53 */
54 CompletableFuture<Boolean> setupIntConfig(IntConfig config);
55
56 //TODO: [ONOS-7616] Design IntEvent and related APIs
57}