blob: eed008f0eb3a41d362866cdd4ddd12f9294f692a [file] [log] [blame]
Yuta HIGUCHI8810aa42017-08-02 15:05:37 -07001/*
2 * Copyright 2017-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.d.config.sync;
17
18import java.util.concurrent.CompletableFuture;
19
20import org.onosproject.d.config.sync.operation.SetRequest;
21import org.onosproject.d.config.sync.operation.SetResponse;
22import org.onosproject.net.DeviceId;
23import org.onosproject.net.provider.Provider;
24
25import com.google.common.annotations.Beta;
26
27// TODO might want to remove Device~ prefix, class name too long.
28/**
29 * Abstraction of a device config synchronization provider.
30 * <p>
31 * Provides a mean for propagating dynamic config triggered change down to
32 * the device.
33 */
34@Beta
35public interface DeviceConfigSynchronizationProvider extends Provider {
36
37 // TODO API to propagate dynamic config subsystem side change down to the
38 // device
39
40 /**
41 * Requests a device to set configuration as specified.
42 *
43 * @param deviceId target Device identifier
44 * @param request configuration requests
45 * @return result
46 */
47 CompletableFuture<SetResponse> setConfiguration(DeviceId deviceId, SetRequest request);
48
49 // TODO API for Get from Device
50 // CompletableFuture<GetResponse> getConfiguration(DeviceId deviceId, GetRequest request);
51
52}