blob: e6ed36a047680fed768b88453aa377d1fd2d505a [file] [log] [blame]
Jonathan Hartbac07a02014-10-13 21:29:54 -07001package org.onlab.onos.sdnip.config;
2
3import java.util.Collections;
4import java.util.List;
5
6import org.codehaus.jackson.annotate.JsonProperty;
7
8/**
9 * Contains the configuration data for SDN-IP that has been read from a
10 * JSON-formatted configuration file.
11 */
12public class Configuration {
13 // We call the BGP routers in our SDN network the BGP speakers, and call
14 // the BGP routers outside our SDN network the BGP peers.
15 private List<BgpSpeaker> bgpSpeakers;
16 private List<BgpPeer> peers;
17
18 /**
19 * Default constructor.
20 */
21 public Configuration() {
22 }
23
24 /**
25 * Gets a list of bgpSpeakers in the system, represented by
26 * {@link BgpSpeaker} objects.
27 *
28 * @return the list of BGP speakers
29 */
30 public List<BgpSpeaker> getBgpSpeakers() {
31 return Collections.unmodifiableList(bgpSpeakers);
32 }
33
34 /**
35 * Sets a list of bgpSpeakers in the system.
36 *
37 * @param bgpSpeakers the list of BGP speakers
38 */
39 @JsonProperty("bgpSpeakers")
40 public void setBgpSpeakers(List<BgpSpeaker> bgpSpeakers) {
41 this.bgpSpeakers = bgpSpeakers;
42 }
43
44 /**
45 * Gets a list of BGP peers we are configured to peer with. Peers are
46 * represented by {@link BgpPeer} objects.
47 *
48 * @return the list of BGP peers
49 */
50 public List<BgpPeer> getPeers() {
51 return Collections.unmodifiableList(peers);
52 }
53
54 /**
55 * Sets a list of BGP peers we are configured to peer with.
56 *
57 * @param peers the list of BGP peers
58 */
59 @JsonProperty("bgpPeers")
60 public void setPeers(List<BgpPeer> peers) {
61 this.peers = peers;
62 }
63
64}