Jonathan Hart | 832a7cb | 2013-06-24 11:25:35 +1200 | [diff] [blame] | 1 | package net.onrc.onos.ofcontroller.bgproute; |
| 2 | |
| 3 | import java.net.InetAddress; |
| 4 | |
Jonathan Hart | 832a7cb | 2013-06-24 11:25:35 +1200 | [diff] [blame] | 5 | import org.codehaus.jackson.annotate.JsonProperty; |
| 6 | |
| 7 | import com.google.common.net.InetAddresses; |
| 8 | |
| 9 | public class BgpPeer { |
| 10 | private String interfaceName; |
| 11 | private InetAddress ipAddress; |
Jonathan Hart | 832a7cb | 2013-06-24 11:25:35 +1200 | [diff] [blame] | 12 | |
| 13 | public String getInterfaceName() { |
| 14 | return interfaceName; |
| 15 | } |
| 16 | |
| 17 | @JsonProperty("interface") |
| 18 | public void setInterfaceName(String interfaceName) { |
| 19 | this.interfaceName = interfaceName; |
| 20 | } |
| 21 | |
| 22 | public InetAddress getIpAddress() { |
| 23 | return ipAddress; |
| 24 | } |
| 25 | |
| 26 | @JsonProperty("ipAddress") |
| 27 | public void setIpAddress(String ipAddress) { |
| 28 | this.ipAddress = InetAddresses.forString(ipAddress); |
| 29 | } |
Jonathan Hart | 832a7cb | 2013-06-24 11:25:35 +1200 | [diff] [blame] | 30 | } |