blob: eda41ae2c62334b6ce0142ae4aac64fcc23880b6 [file] [log] [blame]
Jonathan Hart472062d2014-04-03 10:56:48 -07001package net.onrc.onos.core.topology;
Jonathan Hart062a2e82014-02-03 09:41:57 -08002
Jonathan Hart062a2e82014-02-03 09:41:57 -08003import net.floodlightcontroller.util.MACAddress;
Yuta HIGUCHIbfc77f02014-07-14 22:50:25 -07004import net.onrc.onos.core.topology.web.serializers.HostSerializer;
Yuta HIGUCHIa7f1cdd2014-06-09 15:05:20 -07005
Pavlin Radoslavov1cbfcae2014-05-23 17:28:08 -07006import org.codehaus.jackson.map.annotate.JsonSerialize;
Jonathan Hart062a2e82014-02-03 09:41:57 -08007
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -08008/**
Yuta HIGUCHIbfc77f02014-07-14 22:50:25 -07009 * Interface of Host Object exposed to the "NB" read-only Topology.
Ray Milkey269ffb92014-04-03 14:43:30 -070010 * <p/>
Yuta HIGUCHIbfc77f02014-07-14 22:50:25 -070011 * TODO What a Host Object represent is unclear at the moment.
Ray Milkey269ffb92014-04-03 14:43:30 -070012 * <p/>
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080013 * Everything returned by these interfaces must be either Unmodifiable view,
14 * immutable object, or a copy of the original "SB" In-memory Topology.
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080015 */
Yuta HIGUCHIbfc77f02014-07-14 22:50:25 -070016@JsonSerialize(using = HostSerializer.class)
17public interface Host extends ITopologyElement {
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080018 /**
Pavlin Radoslavov53b208a2014-07-28 13:16:11 -070019 * Gets the Host MAC address.
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080020 *
Pavlin Radoslavov53b208a2014-07-28 13:16:11 -070021 * @return the Host MAC address.
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080022 */
23 public MACAddress getMacAddress();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080024
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080025 /**
Sangho Shin2f263692014-09-15 14:09:41 -070026 * Gets the Host IP address.
27 *
28 * @return the Host IP address.
29 */
30 public int getIpAddress();
31
32
33 /**
Pavlin Radoslavov53b208a2014-07-28 13:16:11 -070034 * Gets the Host attachment points.
Ray Milkey269ffb92014-04-03 14:43:30 -070035 * <p/>
Yuta HIGUCHIbf0a8712014-06-30 18:59:46 -070036 * TODO: There is only 1 attachment point right now.
37 * TODO: Add requirement for Iteration order? Latest observed port first.
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080038 *
Pavlin Radoslavov53b208a2014-07-28 13:16:11 -070039 * @return the Host attachment points.
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080040 */
41 public Iterable<Port> getAttachmentPoints();
Yuta HIGUCHI181d34d2014-02-05 15:05:46 -080042
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080043 /**
Pavlin Radoslavova5637c02014-07-30 15:55:11 -070044 * Gets the Host last seen time.
Ray Milkey269ffb92014-04-03 14:43:30 -070045 * <p/>
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080046 *
Pavlin Radoslavov53b208a2014-07-28 13:16:11 -070047 * @return the Host last seen time. (UTC in ms)
Pavlin Radoslavov7c8f69a2014-02-19 19:01:45 -080048 */
49 public long getLastSeenTime();
Jonathan Hart062a2e82014-02-03 09:41:57 -080050}