blob: 9f39715c2d473c8d5b3536fa268e93a2030653bc [file] [log] [blame]
Jonathan Harte533a422015-10-20 17:31:24 -07001/*
Matteo Scandoloaa2adde2021-09-13 12:45:32 -07002 * Copyright 2021-present Open Networking Foundation
Jonathan Harte533a422015-10-20 17:31:24 -07003 *
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
alshabib36a4d732016-06-01 16:03:59 -070017package org.opencord.olt;
Jonathan Harte533a422015-10-20 17:31:24 -070018
19import org.onlab.packet.VlanId;
alshabib8e4fd2f2016-01-12 15:55:53 -080020import org.onosproject.event.ListenerService;
Jonathan Harte533a422015-10-20 17:31:24 -070021import org.onosproject.net.ConnectPoint;
alshabibe0559672016-02-21 14:49:51 -080022import org.onosproject.net.DeviceId;
23
Matteo Scandoloaa2adde2021-09-13 12:45:32 -070024import java.util.List;
Jonathan Harte533a422015-10-20 17:31:24 -070025
Matteo Scandoloaa2adde2021-09-13 12:45:32 -070026public interface AccessDeviceService extends ListenerService<AccessDeviceEvent, AccessDeviceListener> {
Jonathan Harte533a422015-10-20 17:31:24 -070027 /**
28 * Provisions connectivity for a subscriber on an access device.
Matteo Scandoloaa2adde2021-09-13 12:45:32 -070029 * It installs flows for all uni tag information
Jonathan Harte533a422015-10-20 17:31:24 -070030 *
Matteo Scandoloaa2adde2021-09-13 12:45:32 -070031 * @param cp subscriber's connection point
32 * @return true if the request is accepted (does not guarantee the subscriber is provisioned)
Jonathan Harte533a422015-10-20 17:31:24 -070033 */
Matteo Scandoloaa2adde2021-09-13 12:45:32 -070034 boolean provisionSubscriber(ConnectPoint cp);
Jonathan Harte533a422015-10-20 17:31:24 -070035
36 /**
Matteo Scandoloaa2adde2021-09-13 12:45:32 -070037 * 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 Harte533a422015-10-20 17:31:24 -070040 */
Matteo Scandoloaa2adde2021-09-13 12:45:32 -070041 boolean removeSubscriber(ConnectPoint cp);
Amit Ghosh31939522018-08-16 13:28:21 +010042
43 /**
Matteo Scandoloaa2adde2021-09-13 12:45:32 -070044 * 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 Ghosh31939522018-08-16 13:28:21 +010050 */
Matteo Scandoloaa2adde2021-09-13 12:45:32 -070051 boolean provisionSubscriber(ConnectPoint cp, VlanId cTag, VlanId sTag, Integer tpId);
Amit Ghosh31939522018-08-16 13:28:21 +010052
53 /**
Matteo Scandoloaa2adde2021-09-13 12:45:32 -070054 * 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 Ghosh31939522018-08-16 13:28:21 +010060 */
Matteo Scandoloaa2adde2021-09-13 12:45:32 -070061 boolean removeSubscriber(ConnectPoint cp, VlanId cTag, VlanId sTag, Integer tpId);
Jonathan Hartfd6c1b32016-03-08 14:09:09 -080062
63 /**
Matteo Scandoloaa2adde2021-09-13 12:45:32 -070064 * Returns a list of connected OLT devices ID.
65 * @return a list of devices
alshabibe0559672016-02-21 14:49:51 -080066 */
Matteo Scandoloaa2adde2021-09-13 12:45:32 -070067 List<DeviceId> getConnectedOlts();
alshabibe0559672016-02-21 14:49:51 -080068
Saurav Das82b8e6d2018-10-04 15:25:12 -070069 /**
Matteo Scandoloaa2adde2021-09-13 12:45:32 -070070 * Finds the ConnectPoint to which a subscriber is connected.
Saurav Das82b8e6d2018-10-04 15:25:12 -070071 *
Matteo Scandoloaa2adde2021-09-13 12:45:32 -070072 * @param id The id of the subscriber, this is the same ID as in Sadis
73 * @return Subscribers ConnectPoint if found else null
Saurav Das82b8e6d2018-10-04 15:25:12 -070074 */
Matteo Scandoloaa2adde2021-09-13 12:45:32 -070075 ConnectPoint findSubscriberConnectPoint(String id);
Saurav Das2d3777a2020-08-07 18:48:51 -070076
Jonathan Harte533a422015-10-20 17:31:24 -070077}