blob: 8731d7c9de3b9b5f0dcb335e537a0b38cd27acbe [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;
alshabibf3a573e2016-06-01 17:39:10 -070023import org.opencord.cordconfig.access.AccessDeviceData;
alshabibe0559672016-02-21 14:49:51 -080024
Jonathan Hartfd6c1b32016-03-08 14:09:09 -080025import java.util.Collection;
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
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);
alshabib8e4fd2f2016-01-12 15:55:53 -080048
alshabibe0559672016-02-21 14:49:51 -080049 /**
Jonathan Hartfd6c1b32016-03-08 14:09:09 -080050 * Returns information about the provisioned subscribers.
51 *
52 * @return subscribers
53 */
54 Collection<Map.Entry<ConnectPoint, VlanId>> getSubscribers();
55
56 /**
alshabibe0559672016-02-21 14:49:51 -080057 * Returns the map of configured OLTs.
58 *
59 * @return a map
60 */
61 Map<DeviceId, AccessDeviceData> fetchOlts();
62
Jonathan Harte533a422015-10-20 17:31:24 -070063}