blob: f421fd870b2485ce7350903c2f1e461401e108eb [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.
Thomas Vachuska4b420772014-10-30 16:46: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.
Thomas Vachuska4b420772014-10-30 16:46:17 -070041 * </p>
Jonathan Hartac60c082014-09-23 08:55:17 -070042 *
Jonathan Hart09585c62014-09-23 16:58:04 -070043 * @param addresses address object containing addresses to add and the port
44 * to add them to
Jonathan Hartac60c082014-09-23 08:55:17 -070045 */
Jonathan Hart09585c62014-09-23 16:58:04 -070046 void bindAddressesToPort(PortAddresses addresses);
47
48 /**
49 * Removes the addresses contained in the given PortAddresses object from
50 * the set of addresses bound to the port.
51 *
52 * @param portAddresses set of addresses to remove and port to remove them
53 * from
54 */
55 void unbindAddressesFromPort(PortAddresses portAddresses);
Jonathan Hartac60c082014-09-23 08:55:17 -070056
57 /**
58 * Removes all address information for the given connection point.
59 *
60 * @param connectPoint the connection point to remove address information
61 */
Jonathan Hart09585c62014-09-23 16:58:04 -070062 void clearAddresses(ConnectPoint connectPoint);
Jonathan Hartac60c082014-09-23 08:55:17 -070063
tom89b63c52014-09-16 09:19:51 -070064}