blob: 314324d64e1b3b17dae1437007614a4c48b2801c [file] [log] [blame]
Jonathan Hart382623d2014-04-03 09:48:11 -07001package net.onrc.onos.apps.bgproute;
Jonathan Hart1236a9b2013-06-18 22:10:05 +12002
Jonathan Hart4dfc3652013-08-02 20:22:36 +12003import java.util.Collections;
Jonathan Hart1236a9b2013-06-18 22:10:05 +12004import java.util.List;
Jonathan Hart1236a9b2013-06-18 22:10:05 +12005
Jonathan Hart2f790d22013-08-15 14:01:24 +12006import net.floodlightcontroller.util.MACAddress;
7
Jonathan Hart1236a9b2013-06-18 22:10:05 +12008import org.codehaus.jackson.annotate.JsonProperty;
Jonathan Hart832a7cb2013-06-24 11:25:35 +12009import org.openflow.util.HexString;
Jonathan Hart1236a9b2013-06-18 22:10:05 +120010
11public class Configuration {
Ray Milkey269ffb92014-04-03 14:43:30 -070012 private long bgpdAttachmentDpid;
13 private short bgpdAttachmentPort;
14 private MACAddress bgpdMacAddress;
15 private short vlan;
16 private List<String> switches;
17 private List<Interface> interfaces;
18 private List<BgpPeer> peers;
Jonathan Hart1236a9b2013-06-18 22:10:05 +120019
Ray Milkey269ffb92014-04-03 14:43:30 -070020 public Configuration() {
21 // TODO Auto-generated constructor stub
22 }
Jonathan Hart832a7cb2013-06-24 11:25:35 +120023
Ray Milkey269ffb92014-04-03 14:43:30 -070024 public long getBgpdAttachmentDpid() {
25 return bgpdAttachmentDpid;
26 }
Jonathan Hart832a7cb2013-06-24 11:25:35 +120027
Ray Milkey269ffb92014-04-03 14:43:30 -070028 @JsonProperty("bgpdAttachmentDpid")
29 public void setBgpdAttachmentDpid(String bgpdAttachmentDpid) {
30 this.bgpdAttachmentDpid = HexString.toLong(bgpdAttachmentDpid);
31 }
Jonathan Hart832a7cb2013-06-24 11:25:35 +120032
Ray Milkey269ffb92014-04-03 14:43:30 -070033 public short getBgpdAttachmentPort() {
34 return bgpdAttachmentPort;
35 }
Jonathan Hart2f790d22013-08-15 14:01:24 +120036
Ray Milkey269ffb92014-04-03 14:43:30 -070037 @JsonProperty("bgpdAttachmentPort")
38 public void setBgpdAttachmentPort(short bgpdAttachmentPort) {
39 this.bgpdAttachmentPort = bgpdAttachmentPort;
40 }
Jonathan Hart1236a9b2013-06-18 22:10:05 +120041
Ray Milkey269ffb92014-04-03 14:43:30 -070042 public MACAddress getBgpdMacAddress() {
43 return bgpdMacAddress;
44 }
Jonathan Hart832a7cb2013-06-24 11:25:35 +120045
Ray Milkey269ffb92014-04-03 14:43:30 -070046 @JsonProperty("bgpdMacAddress")
47 public void setBgpdMacAddress(String strMacAddress) {
48 this.bgpdMacAddress = MACAddress.valueOf(strMacAddress);
49 }
Jonathan Hart832a7cb2013-06-24 11:25:35 +120050
Ray Milkey269ffb92014-04-03 14:43:30 -070051 public List<String> getSwitches() {
52 return Collections.unmodifiableList(switches);
53 }
54
55 @JsonProperty("vlan")
56 public void setVlan(short vlan) {
57 this.vlan = vlan;
58 }
59
60 public short getVlan() {
61 return vlan;
62 }
63
64 @JsonProperty("switches")
65 public void setSwitches(List<String> switches) {
66 this.switches = switches;
67 }
68
69 public List<Interface> getInterfaces() {
70 return Collections.unmodifiableList(interfaces);
71 }
72
73 @JsonProperty("interfaces")
74 public void setInterfaces(List<Interface> interfaces) {
75 this.interfaces = interfaces;
76 }
77
78 public List<BgpPeer> getPeers() {
79 return Collections.unmodifiableList(peers);
80 }
81
82 @JsonProperty("bgpPeers")
83 public void setPeers(List<BgpPeer> peers) {
84 this.peers = peers;
85 }
Jonathan Hart832a7cb2013-06-24 11:25:35 +120086
Jonathan Hart1236a9b2013-06-18 22:10:05 +120087}