blob: 95e4f7f485f452804f4d2ee504cff6770413ca1b [file] [log] [blame]
Jonathan Hartc36c9552018-07-31 15:07:53 -04001/*
2 * Copyright 2018-present Open Networking Foundation
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.opencord.dhcpl2relay;
18
19import org.onosproject.event.ListenerService;
Matteo Scandoloab346512020-04-17 13:39:55 -070020import org.onosproject.net.ConnectPoint;
Jonathan Hartc36c9552018-07-31 15:07:53 -040021
Jonathan Hart617bc3e2020-02-14 10:42:23 -080022import java.util.Map;
23
Jonathan Hartc36c9552018-07-31 15:07:53 -040024/**
25 * DHCP L2 relay service.
26 */
27public interface DhcpL2RelayService extends
28 ListenerService<DhcpL2RelayEvent, DhcpL2RelayListener> {
Jonathan Hart617bc3e2020-02-14 10:42:23 -080029
30 /**
31 * Returns information about DHCP leases that have been allocated.
32 *
33 * @return map of subscriber ID to DHCP allocation information
34 */
35 Map<String, DhcpAllocationInfo> getAllocationInfo();
Matteo Scandoloab346512020-04-17 13:39:55 -070036
37 /**
38 * Remove all the DHCP leases that have been allocated from the local state.
39 */
40 void clearAllocations();
41
42 /**
Andrea Campanella3b7868d2020-08-27 17:05:09 +020043 * Remove multiple DHCP leases from the local state.
44 * @param cp the ConnectPoint associated with the set of leases.
Matteo Scandoloab346512020-04-17 13:39:55 -070045 * @return boolean
46 */
Matteo Scandolo64bba8c2020-08-19 11:50:33 -070047 boolean removeAllocationsByConnectPoint(ConnectPoint cp);
Jonathan Hartc36c9552018-07-31 15:07:53 -040048}