blob: bca4a6c4095b27d0019f88ce9ec03a9330f4a4f9 [file] [log] [blame]
Andrea Campanella945ded22016-01-07 13:17:43 -08001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Andrea Campanella945ded22016-01-07 13:17:43 -08003 *
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.protocol.rest;
18
Michele Santuaric372c222017-01-12 09:41:25 +010019import org.onosproject.net.DeviceId;
Hesam Rahimi4a409b42016-08-12 18:37:33 -040020import org.onosproject.protocol.http.HttpSBController;
Andrea Campanella945ded22016-01-07 13:17:43 -080021
Michele Santuaric372c222017-01-12 09:41:25 +010022import java.util.Set;
23
Andrea Campanella945ded22016-01-07 13:17:43 -080024/**
25 * Abstraction of an REST controller. Serves as a one stop shop for obtaining
Michele Santuaric372c222017-01-12 09:41:25 +010026 * Rest southbound devices.
Andrea Campanella945ded22016-01-07 13:17:43 -080027 */
Hesam Rahimi4a409b42016-08-12 18:37:33 -040028public interface RestSBController extends HttpSBController {
Michele Santuaric372c222017-01-12 09:41:25 +010029
30 /**
31 * Add a new association between a proxied device exposed to ONOS and
32 * a REST proxy server.
33 * @param deviceId REST device identifier
34 * @param proxy REST proxy device
35 */
36 void addProxiedDevice(DeviceId deviceId, RestSBDevice proxy);
37
38 /**
39 * Remove the association between a proxied device exposed to ONOS
40 * and a REST proxy server.
41 * @param deviceId REST device identifier
42 */
43 void removeProxiedDevice(DeviceId deviceId);
44
45 /**
46 * Get all the proxied device exposed to ONOS ids under the same
47 * REST proxy server.
48 * @param proxyId REST proxy device identifier
49 * @return set of device ids under same proxy
50 */
51 Set<DeviceId> getProxiedDevices(DeviceId proxyId);
52
53 /**
54 * Get a REST proxied server given a device id.
55 * @param deviceId the id of proxied device exposed to ONOS
56 * @return the corresponding REST proxied device
57 */
58 RestSBDevice getProxySBDevice(DeviceId deviceId);
Andrea Campanella945ded22016-01-07 13:17:43 -080059}