blob: dfb0ac2e7e4471c624b5fa3a05c38bcd668fe4d8 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2014-present Open Networking Laboratory
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -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 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.net.host;
tom0eb04ca2014-08-25 14:34:51 -070017
samanwita palc40e5ed2015-09-24 11:01:51 -070018import org.onlab.packet.IpAddress;
Brian O'Connorabafb502014-12-02 22:26:20 -080019import org.onosproject.net.HostId;
20import org.onosproject.net.provider.ProviderService;
tom0eb04ca2014-08-25 14:34:51 -070021
22/**
23 * Means of conveying host information to the core.
24 */
tomd7356722014-08-26 01:07:39 -070025public interface HostProviderService extends ProviderService<HostProvider> {
tom0eb04ca2014-08-25 14:34:51 -070026
tome33cc1a2014-08-25 21:59:41 -070027 /**
28 * Notifies the core when a host has been detected on a network along with
Kedar Gupta47bd4802015-07-15 09:43:26 -070029 * information that identifies the host location.
tome33cc1a2014-08-25 21:59:41 -070030 *
tom7869ad92014-09-09 14:32:08 -070031 * @param hostId id of the host that been detected
tome33cc1a2014-08-25 21:59:41 -070032 * @param hostDescription description of host and its location
Brian O'Connorf107bd72015-09-21 15:31:03 -070033 * @param replaceIps replace IP set if true, merge IP set otherwise
34 */
35 void hostDetected(HostId hostId, HostDescription hostDescription, boolean replaceIps);
tom0eb04ca2014-08-25 14:34:51 -070036
tome33cc1a2014-08-25 21:59:41 -070037 /**
38 * Notifies the core when a host is no longer detected on a network.
39 *
tom7869ad92014-09-09 14:32:08 -070040 * @param hostId id of the host that vanished
tome33cc1a2014-08-25 21:59:41 -070041 */
tom7869ad92014-09-09 14:32:08 -070042 void hostVanished(HostId hostId);
tome33cc1a2014-08-25 21:59:41 -070043
samanwita palc40e5ed2015-09-24 11:01:51 -070044 /**
Brian O'Connor52515622015-10-09 17:03:44 -070045 * Notifies the core when an IP is no longer associated with a host.
samanwita palc40e5ed2015-09-24 11:01:51 -070046 *
Brian O'Connor52515622015-10-09 17:03:44 -070047 * @param hostId id of the host
48 * @param ipAddress ip address of host that vanished
samanwita palc40e5ed2015-09-24 11:01:51 -070049 */
50 void removeIpFromHost(HostId hostId, IpAddress ipAddress);
51
tom0eb04ca2014-08-25 14:34:51 -070052}