Andrea Campanella | 945ded2 | 2016-01-07 13:17:43 -0800 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Laboratory |
Andrea Campanella | 945ded2 | 2016-01-07 13:17:43 -0800 | [diff] [blame] | 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.protocol.rest; |
| 18 | |
Michele Santuari | c372c22 | 2017-01-12 09:41:25 +0100 | [diff] [blame^] | 19 | import org.onosproject.net.DeviceId; |
Hesam Rahimi | 4a409b4 | 2016-08-12 18:37:33 -0400 | [diff] [blame] | 20 | import org.onosproject.protocol.http.HttpSBController; |
Andrea Campanella | 945ded2 | 2016-01-07 13:17:43 -0800 | [diff] [blame] | 21 | |
Michele Santuari | c372c22 | 2017-01-12 09:41:25 +0100 | [diff] [blame^] | 22 | import java.util.Set; |
| 23 | |
Andrea Campanella | 945ded2 | 2016-01-07 13:17:43 -0800 | [diff] [blame] | 24 | /** |
| 25 | * Abstraction of an REST controller. Serves as a one stop shop for obtaining |
Michele Santuari | c372c22 | 2017-01-12 09:41:25 +0100 | [diff] [blame^] | 26 | * Rest southbound devices. |
Andrea Campanella | 945ded2 | 2016-01-07 13:17:43 -0800 | [diff] [blame] | 27 | */ |
Hesam Rahimi | 4a409b4 | 2016-08-12 18:37:33 -0400 | [diff] [blame] | 28 | public interface RestSBController extends HttpSBController { |
Michele Santuari | c372c22 | 2017-01-12 09:41:25 +0100 | [diff] [blame^] | 29 | |
| 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 Campanella | 945ded2 | 2016-01-07 13:17:43 -0800 | [diff] [blame] | 59 | } |