blob: 5232b98f8ee972db37cc35d9ec4e89fac4fad1fd [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
2 * Copyright 2014 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 */
tom89b63c52014-09-16 09:19:51 -070016package org.onlab.onos.net.host;
17
Jonathan Hartac60c082014-09-23 08:55:17 -070018import org.onlab.onos.net.ConnectPoint;
tom89b63c52014-09-16 09:19:51 -070019import org.onlab.onos.net.HostId;
20
21/**
22 * Service for administering the inventory of end-station hosts.
23 */
24public interface HostAdminService {
25
26 /**
27 * Removes the end-station host with the specified identifier.
28 *
29 * @param hostId host identifier
30 */
31 void removeHost(HostId hostId);
32
Jonathan Hartac60c082014-09-23 08:55:17 -070033 /**
Jonathan Hart09585c62014-09-23 16:58:04 -070034 * Binds IP and MAC addresses to the given connection point.
Jonathan Hartac60c082014-09-23 08:55:17 -070035 * <p/>
Jonathan Hart09585c62014-09-23 16:58:04 -070036 * The addresses are added to the set of addresses already bound to the
37 * connection point. If any of the fields in addresses is null, no change
38 * is made to the corresponding addresses in the store.
39 * {@link #unbindAddressesFromPort(PortAddresses)} must be use to unbind
40 * addresses that have previously been bound.
Jonathan Hartac60c082014-09-23 08:55:17 -070041 *
Jonathan Hart09585c62014-09-23 16:58:04 -070042 * @param addresses address object containing addresses to add and the port
43 * to add them to
Jonathan Hartac60c082014-09-23 08:55:17 -070044 */
Jonathan Hart09585c62014-09-23 16:58:04 -070045 void bindAddressesToPort(PortAddresses addresses);
46
47 /**
48 * Removes the addresses contained in the given PortAddresses object from
49 * the set of addresses bound to the port.
50 *
51 * @param portAddresses set of addresses to remove and port to remove them
52 * from
53 */
54 void unbindAddressesFromPort(PortAddresses portAddresses);
Jonathan Hartac60c082014-09-23 08:55:17 -070055
56 /**
57 * Removes all address information for the given connection point.
58 *
59 * @param connectPoint the connection point to remove address information
60 */
Jonathan Hart09585c62014-09-23 16:58:04 -070061 void clearAddresses(ConnectPoint connectPoint);
Jonathan Hartac60c082014-09-23 08:55:17 -070062
tom89b63c52014-09-16 09:19:51 -070063}