Jonathan Hart | e533a42 | 2015-10-20 17:31:24 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | d4fbd35 | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Laboratory |
Jonathan Hart | e533a42 | 2015-10-20 17:31:24 -0700 | [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.olt; |
| 18 | |
| 19 | import org.onlab.packet.VlanId; |
alshabib | 8605b6d | 2016-04-28 15:52:22 -0700 | [diff] [blame] | 20 | import org.onosproject.cordconfig.access.AccessDeviceData; |
alshabib | 8e4fd2f | 2016-01-12 15:55:53 -0800 | [diff] [blame] | 21 | import org.onosproject.event.ListenerService; |
Jonathan Hart | e533a42 | 2015-10-20 17:31:24 -0700 | [diff] [blame] | 22 | import org.onosproject.net.ConnectPoint; |
alshabib | e055967 | 2016-02-21 14:49:51 -0800 | [diff] [blame] | 23 | import org.onosproject.net.DeviceId; |
| 24 | |
Jonathan Hart | fd6c1b3 | 2016-03-08 14:09:09 -0800 | [diff] [blame] | 25 | import java.util.Collection; |
alshabib | e055967 | 2016-02-21 14:49:51 -0800 | [diff] [blame] | 26 | import java.util.Map; |
Jonathan Hart | e533a42 | 2015-10-20 17:31:24 -0700 | [diff] [blame] | 27 | |
| 28 | /** |
| 29 | * Service for interacting with an access device (OLT). |
| 30 | */ |
alshabib | 8e4fd2f | 2016-01-12 15:55:53 -0800 | [diff] [blame] | 31 | public interface AccessDeviceService |
| 32 | extends ListenerService<AccessDeviceEvent, AccessDeviceListener> { |
Jonathan Hart | e533a42 | 2015-10-20 17:31:24 -0700 | [diff] [blame] | 33 | |
| 34 | /** |
| 35 | * Provisions connectivity for a subscriber on an access device. |
| 36 | * |
| 37 | * @param port subscriber's connection point |
| 38 | * @param vlan VLAN ID to provision for subscriber |
| 39 | */ |
| 40 | void provisionSubscriber(ConnectPoint port, VlanId vlan); |
| 41 | |
| 42 | /** |
| 43 | * Removes provisioned connectivity for a subscriber from an access device. |
| 44 | * |
| 45 | * @param port subscriber's connection point |
| 46 | */ |
| 47 | void removeSubscriber(ConnectPoint port); |
alshabib | 8e4fd2f | 2016-01-12 15:55:53 -0800 | [diff] [blame] | 48 | |
alshabib | e055967 | 2016-02-21 14:49:51 -0800 | [diff] [blame] | 49 | /** |
Jonathan Hart | fd6c1b3 | 2016-03-08 14:09:09 -0800 | [diff] [blame] | 50 | * Returns information about the provisioned subscribers. |
| 51 | * |
| 52 | * @return subscribers |
| 53 | */ |
| 54 | Collection<Map.Entry<ConnectPoint, VlanId>> getSubscribers(); |
| 55 | |
| 56 | /** |
alshabib | e055967 | 2016-02-21 14:49:51 -0800 | [diff] [blame] | 57 | * Returns the map of configured OLTs. |
| 58 | * |
| 59 | * @return a map |
| 60 | */ |
| 61 | Map<DeviceId, AccessDeviceData> fetchOlts(); |
| 62 | |
Jonathan Hart | e533a42 | 2015-10-20 17:31:24 -0700 | [diff] [blame] | 63 | } |