blob: 456e264cb71abbf074b6d91e049610a0b568f488 [file] [log] [blame]
Jonathan Hart3e594642015-10-20 17:31:24 -07001/*
2 * Copyright 2015 Open Networking Laboratory
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
17package org.onosproject.olt;
18
19import org.onlab.packet.VlanId;
alshabib6b139b42016-01-12 15:55:53 -080020import org.onosproject.event.ListenerService;
Jonathan Hart3e594642015-10-20 17:31:24 -070021import org.onosproject.net.ConnectPoint;
alshabibf544c012016-02-21 14:49:51 -080022import org.onosproject.net.DeviceId;
23
Jonathan Hart913e9e12016-03-08 14:09:09 -080024import java.util.Collection;
alshabibf544c012016-02-21 14:49:51 -080025import java.util.Map;
Jonathan Hart3e594642015-10-20 17:31:24 -070026
27/**
28 * Service for interacting with an access device (OLT).
29 */
alshabib6b139b42016-01-12 15:55:53 -080030public interface AccessDeviceService
31 extends ListenerService<AccessDeviceEvent, AccessDeviceListener> {
Jonathan Hart3e594642015-10-20 17:31:24 -070032
33 /**
34 * Provisions connectivity for a subscriber on an access device.
35 *
36 * @param port subscriber's connection point
37 * @param vlan VLAN ID to provision for subscriber
38 */
39 void provisionSubscriber(ConnectPoint port, VlanId vlan);
40
41 /**
42 * Removes provisioned connectivity for a subscriber from an access device.
43 *
44 * @param port subscriber's connection point
45 */
46 void removeSubscriber(ConnectPoint port);
alshabib6b139b42016-01-12 15:55:53 -080047
alshabibf544c012016-02-21 14:49:51 -080048 /**
Jonathan Hart913e9e12016-03-08 14:09:09 -080049 * Returns information about the provisioned subscribers.
50 *
51 * @return subscribers
52 */
53 Collection<Map.Entry<ConnectPoint, VlanId>> getSubscribers();
54
55 /**
alshabibf544c012016-02-21 14:49:51 -080056 * Returns the map of configured OLTs.
57 *
58 * @return a map
59 */
60 Map<DeviceId, AccessDeviceData> fetchOlts();
61
Jonathan Hart3e594642015-10-20 17:31:24 -070062}