blob: 50c6c7e565fd3c839b8515bb03c41645326ede48 [file] [log] [blame]
Jonathan Hart23701d12014-04-03 10:45:48 -07001package net.onrc.onos.core.linkdiscovery.internal;
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -08002
3import net.floodlightcontroller.core.web.serializers.DPIDSerializer;
4
5import org.codehaus.jackson.annotate.JsonProperty;
6import org.codehaus.jackson.map.annotate.JsonSerialize;
7
Ray Milkey269ffb92014-04-03 14:43:30 -07008/**
Ray Milkeyb41100a2014-04-10 10:42:15 -07009 * Topology link up/down event history related classes and members.
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080010 *
Ray Milkey269ffb92014-04-03 14:43:30 -070011 * @author subrata
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080012 */
13public class EventHistoryTopologyLink {
14 // The following fields are not stored as String to save memory
Ray Milkey5d406012014-04-08 14:44:41 -070015 // They should be converted to appropriate human-readable strings by
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080016 // the front end (e.g. in cli in Python)
Ray Milkey269ffb92014-04-03 14:43:30 -070017 public long srcSwDpid;
18 public long dstSwDpid;
19 public int srcPortState;
20 public int dstPortState;
21 public int srcSwport;
22 public int dstSwport;
23 public String linkType;
24 public String reason;
25
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080026 @JsonProperty("Source-Switch")
Ray Milkey269ffb92014-04-03 14:43:30 -070027 @JsonSerialize(using = DPIDSerializer.class)
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080028 public long getSrcSwDpid() {
29 return srcSwDpid;
30 }
Ray Milkey269ffb92014-04-03 14:43:30 -070031
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080032 @JsonProperty("Dest-Switch")
Ray Milkey269ffb92014-04-03 14:43:30 -070033 @JsonSerialize(using = DPIDSerializer.class)
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080034 public long getDstSwDpid() {
35 return dstSwDpid;
36 }
Ray Milkey269ffb92014-04-03 14:43:30 -070037
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080038 @JsonProperty("SrcPortState")
39 public int getSrcPortState() {
40 return srcPortState;
41 }
Ray Milkey269ffb92014-04-03 14:43:30 -070042
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080043 @JsonProperty("DstPortState")
44 public int getDstPortState() {
45 return dstPortState;
46 }
Ray Milkey269ffb92014-04-03 14:43:30 -070047
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080048 @JsonProperty("SrcPort")
49 public int getSrcSwport() {
50 return srcSwport;
51 }
Ray Milkey269ffb92014-04-03 14:43:30 -070052
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080053 @JsonProperty("DstPort")
54 public int getDstSwport() {
55 return dstSwport;
56 }
Ray Milkey269ffb92014-04-03 14:43:30 -070057
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080058 @JsonProperty("LinkType")
59 public String getLinkType() {
60 return linkType;
61 }
Ray Milkey269ffb92014-04-03 14:43:30 -070062
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080063 @JsonProperty("Reason")
64 public String getReason() {
65 return reason;
66 }
Ray Milkey269ffb92014-04-03 14:43:30 -070067
68
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080069}