Jonathan Hart | e533a42 | 2015-10-20 17:31:24 -0700 | [diff] [blame] | 1 | /* |
Matteo Scandolo | aa2adde | 2021-09-13 12:45:32 -0700 | [diff] [blame] | 2 | * Copyright 2021-present Open Networking Foundation |
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 | |
alshabib | 36a4d73 | 2016-06-01 16:03:59 -0700 | [diff] [blame] | 17 | package org.opencord.olt; |
Jonathan Hart | e533a42 | 2015-10-20 17:31:24 -0700 | [diff] [blame] | 18 | |
| 19 | import org.onlab.packet.VlanId; |
alshabib | 8e4fd2f | 2016-01-12 15:55:53 -0800 | [diff] [blame] | 20 | import org.onosproject.event.ListenerService; |
Jonathan Hart | e533a42 | 2015-10-20 17:31:24 -0700 | [diff] [blame] | 21 | import org.onosproject.net.ConnectPoint; |
alshabib | e055967 | 2016-02-21 14:49:51 -0800 | [diff] [blame] | 22 | import org.onosproject.net.DeviceId; |
| 23 | |
Matteo Scandolo | aa2adde | 2021-09-13 12:45:32 -0700 | [diff] [blame] | 24 | import java.util.List; |
Jonathan Hart | e533a42 | 2015-10-20 17:31:24 -0700 | [diff] [blame] | 25 | |
Matteo Scandolo | aa2adde | 2021-09-13 12:45:32 -0700 | [diff] [blame] | 26 | public interface AccessDeviceService extends ListenerService<AccessDeviceEvent, AccessDeviceListener> { |
Jonathan Hart | e533a42 | 2015-10-20 17:31:24 -0700 | [diff] [blame] | 27 | /** |
| 28 | * Provisions connectivity for a subscriber on an access device. |
Matteo Scandolo | aa2adde | 2021-09-13 12:45:32 -0700 | [diff] [blame] | 29 | * It installs flows for all uni tag information |
Jonathan Hart | e533a42 | 2015-10-20 17:31:24 -0700 | [diff] [blame] | 30 | * |
Matteo Scandolo | aa2adde | 2021-09-13 12:45:32 -0700 | [diff] [blame] | 31 | * @param cp subscriber's connection point |
| 32 | * @return true if the request is accepted (does not guarantee the subscriber is provisioned) |
Jonathan Hart | e533a42 | 2015-10-20 17:31:24 -0700 | [diff] [blame] | 33 | */ |
Matteo Scandolo | aa2adde | 2021-09-13 12:45:32 -0700 | [diff] [blame] | 34 | boolean provisionSubscriber(ConnectPoint cp); |
Jonathan Hart | e533a42 | 2015-10-20 17:31:24 -0700 | [diff] [blame] | 35 | |
| 36 | /** |
Matteo Scandolo | aa2adde | 2021-09-13 12:45:32 -0700 | [diff] [blame] | 37 | * Removes subscriber flows from a given ConnectPoint. |
| 38 | * @param cp subscriber's connect point |
| 39 | * @return true if the request is accepted (does not guarantee the subscriber is removed) |
Jonathan Hart | e533a42 | 2015-10-20 17:31:24 -0700 | [diff] [blame] | 40 | */ |
Matteo Scandolo | aa2adde | 2021-09-13 12:45:32 -0700 | [diff] [blame] | 41 | boolean removeSubscriber(ConnectPoint cp); |
Amit Ghosh | 3193952 | 2018-08-16 13:28:21 +0100 | [diff] [blame] | 42 | |
| 43 | /** |
Matteo Scandolo | aa2adde | 2021-09-13 12:45:32 -0700 | [diff] [blame] | 44 | * Provisions connectivity for a particular service for a subscriber. |
| 45 | * @param cp subscriber's connect point |
| 46 | * @param cTag service's cTag |
| 47 | * @param sTag service's sTag |
| 48 | * @param tpId service's Technology Profile ID |
| 49 | * @return true if the request is accepted (does not guarantee the subscriber is provisioned) |
Amit Ghosh | 3193952 | 2018-08-16 13:28:21 +0100 | [diff] [blame] | 50 | */ |
Matteo Scandolo | aa2adde | 2021-09-13 12:45:32 -0700 | [diff] [blame] | 51 | boolean provisionSubscriber(ConnectPoint cp, VlanId cTag, VlanId sTag, Integer tpId); |
Amit Ghosh | 3193952 | 2018-08-16 13:28:21 +0100 | [diff] [blame] | 52 | |
| 53 | /** |
Matteo Scandolo | aa2adde | 2021-09-13 12:45:32 -0700 | [diff] [blame] | 54 | * Removes connectivity for a particular service for a subscriber. |
| 55 | * @param cp subscriber's connect point |
| 56 | * @param cTag service's cTag |
| 57 | * @param sTag service's sTag |
| 58 | * @param tpId service's Technology Profile ID |
| 59 | * @return true if the request is accepted (does not guarantee the subscriber is removed) |
Amit Ghosh | 3193952 | 2018-08-16 13:28:21 +0100 | [diff] [blame] | 60 | */ |
Matteo Scandolo | aa2adde | 2021-09-13 12:45:32 -0700 | [diff] [blame] | 61 | boolean removeSubscriber(ConnectPoint cp, VlanId cTag, VlanId sTag, Integer tpId); |
Jonathan Hart | fd6c1b3 | 2016-03-08 14:09:09 -0800 | [diff] [blame] | 62 | |
| 63 | /** |
Matteo Scandolo | aa2adde | 2021-09-13 12:45:32 -0700 | [diff] [blame] | 64 | * Returns a list of connected OLT devices ID. |
| 65 | * @return a list of devices |
alshabib | e055967 | 2016-02-21 14:49:51 -0800 | [diff] [blame] | 66 | */ |
Matteo Scandolo | aa2adde | 2021-09-13 12:45:32 -0700 | [diff] [blame] | 67 | List<DeviceId> getConnectedOlts(); |
alshabib | e055967 | 2016-02-21 14:49:51 -0800 | [diff] [blame] | 68 | |
Saurav Das | 82b8e6d | 2018-10-04 15:25:12 -0700 | [diff] [blame] | 69 | /** |
Matteo Scandolo | aa2adde | 2021-09-13 12:45:32 -0700 | [diff] [blame] | 70 | * Finds the ConnectPoint to which a subscriber is connected. |
Saurav Das | 82b8e6d | 2018-10-04 15:25:12 -0700 | [diff] [blame] | 71 | * |
Matteo Scandolo | aa2adde | 2021-09-13 12:45:32 -0700 | [diff] [blame] | 72 | * @param id The id of the subscriber, this is the same ID as in Sadis |
| 73 | * @return Subscribers ConnectPoint if found else null |
Saurav Das | 82b8e6d | 2018-10-04 15:25:12 -0700 | [diff] [blame] | 74 | */ |
Matteo Scandolo | aa2adde | 2021-09-13 12:45:32 -0700 | [diff] [blame] | 75 | ConnectPoint findSubscriberConnectPoint(String id); |
Saurav Das | 2d3777a | 2020-08-07 18:48:51 -0700 | [diff] [blame] | 76 | |
Jonathan Hart | e533a42 | 2015-10-20 17:31:24 -0700 | [diff] [blame] | 77 | } |