blob: 9b1e57436a24938d5a8d5e3dfade9625d3b4ebe3 [file] [log] [blame]
Jonathan Harte533a422015-10-20 17:31:24 -07001/*
Brian O'Connord6a135a2017-08-03 22:46:05 -07002 * Copyright 2016-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
Jonathan Hartfd6c1b32016-03-08 14:09:09 -080024import java.util.Collection;
Amit Ghosh1ed9aef2018-07-17 17:08:16 +010025import java.util.List;
alshabibe0559672016-02-21 14:49:51 -080026import java.util.Map;
Jonathan Harte533a422015-10-20 17:31:24 -070027
28/**
29 * Service for interacting with an access device (OLT).
30 */
alshabib8e4fd2f2016-01-12 15:55:53 -080031public interface AccessDeviceService
32 extends ListenerService<AccessDeviceEvent, AccessDeviceListener> {
Jonathan Harte533a422015-10-20 17:31:24 -070033
34 /**
35 * Provisions connectivity for a subscriber on an access device.
36 *
37 * @param port subscriber's connection point
Amit Ghosh31939522018-08-16 13:28:21 +010038 * @return true if successful false otherwise
Jonathan Harte533a422015-10-20 17:31:24 -070039 */
Amit Ghosh31939522018-08-16 13:28:21 +010040 boolean provisionSubscriber(ConnectPoint port);
Jonathan Harte533a422015-10-20 17:31:24 -070041
42 /**
43 * Removes provisioned connectivity for a subscriber from an access device.
44 *
45 * @param port subscriber's connection point
Amit Ghosh31939522018-08-16 13:28:21 +010046 * @return true if successful false otherwise
Jonathan Harte533a422015-10-20 17:31:24 -070047 */
Amit Ghosh31939522018-08-16 13:28:21 +010048 boolean removeSubscriber(ConnectPoint port);
49
50 /**
51 * Provisions flows for the specific subscriber.
52 *
53 * @param subscriberId Identification of the subscriber
54 * @return true if successful false otherwise
55 */
56 boolean provisionSubscriber(AccessSubscriberId subscriberId);
57
58 /**
59 * Removes flows for the specific subscriber.
60 *
61 * @param subscriberId Identification of the subscriber
62 * @return true if successful false otherwise
63 */
64 boolean removeSubscriber(AccessSubscriberId subscriberId);
alshabib8e4fd2f2016-01-12 15:55:53 -080065
alshabibe0559672016-02-21 14:49:51 -080066 /**
Jonathan Hartfd6c1b32016-03-08 14:09:09 -080067 * Returns information about the provisioned subscribers.
68 *
69 * @return subscribers
70 */
Amit Ghosh31939522018-08-16 13:28:21 +010071 Collection<Map.Entry<ConnectPoint, Map.Entry<VlanId, VlanId>>> getSubscribers();
Jonathan Hartfd6c1b32016-03-08 14:09:09 -080072
73 /**
Amit Ghosh1ed9aef2018-07-17 17:08:16 +010074 * Returns the list of active OLTs.
alshabibe0559672016-02-21 14:49:51 -080075 *
Amit Ghosh1ed9aef2018-07-17 17:08:16 +010076 * @return a List
alshabibe0559672016-02-21 14:49:51 -080077 */
Amit Ghosh1ed9aef2018-07-17 17:08:16 +010078 List<DeviceId> fetchOlts();
alshabibe0559672016-02-21 14:49:51 -080079
Jonathan Harte533a422015-10-20 17:31:24 -070080}