blob: 12ed97bde11e6772c3882ed671d63909a22c294a [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 Cluster merge/split 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 EventHistoryTopologyCluster {
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 dpid;
18 public long clusterIdOld; // Switch with dpid moved from cluster x to y
19 public long clusterIdNew;
20 public String reason;
21
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080022 @JsonProperty("Switch")
Ray Milkey269ffb92014-04-03 14:43:30 -070023 @JsonSerialize(using = DPIDSerializer.class)
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080024 public long getDpid() {
25 return dpid;
26 }
Ray Milkey269ffb92014-04-03 14:43:30 -070027
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080028 @JsonProperty("OldClusterId")
Ray Milkey269ffb92014-04-03 14:43:30 -070029 @JsonSerialize(using = DPIDSerializer.class)
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080030 public long getClusterIdOld() {
31 return clusterIdOld;
32 }
Ray Milkey269ffb92014-04-03 14:43:30 -070033
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080034 @JsonProperty("NewClusterId")
Ray Milkey269ffb92014-04-03 14:43:30 -070035 @JsonSerialize(using = DPIDSerializer.class)
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080036 public long getClusterIdNew() {
37 return clusterIdNew;
38 }
Ray Milkey269ffb92014-04-03 14:43:30 -070039
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080040 @JsonProperty("Reason")
41 public String getReason() {
42 return reason;
43 }
Ray Milkey269ffb92014-04-03 14:43:30 -070044
45
Umesh Krishnaswamy345ee992012-12-13 20:29:48 -080046}