Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 1 | /* |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 2 | * Copyright 2014 Open Networking Laboratory |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 3 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 7 | * |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
Thomas Vachuska | 781d18b | 2014-10-27 10:31:25 -0700 | [diff] [blame] | 15 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.config; |
Jonathan Hart | 74f9c3b | 2014-09-29 20:03:50 -0700 | [diff] [blame] | 17 | |
Jonathan Hart | d7bd982 | 2014-10-20 18:18:02 -0700 | [diff] [blame] | 18 | import com.fasterxml.jackson.annotation.JsonProperty; |
Jonathan Hart | 74f9c3b | 2014-09-29 20:03:50 -0700 | [diff] [blame] | 19 | |
Jonathan Hart | 43ae293 | 2015-01-20 11:08:20 -0800 | [diff] [blame^] | 20 | import java.util.List; |
| 21 | |
Jonathan Hart | 74f9c3b | 2014-09-29 20:03:50 -0700 | [diff] [blame] | 22 | /** |
| 23 | * Represents a set of addresses bound to a port. |
| 24 | */ |
| 25 | public class AddressEntry { |
| 26 | private String dpid; |
Jonathan Hart | 43ae293 | 2015-01-20 11:08:20 -0800 | [diff] [blame^] | 27 | private long portNumber; |
Jonathan Hart | 70da512 | 2014-10-01 16:37:42 -0700 | [diff] [blame] | 28 | private List<String> ipAddresses; |
| 29 | private String macAddress; |
Jonathan Hart | 74f9c3b | 2014-09-29 20:03:50 -0700 | [diff] [blame] | 30 | |
| 31 | public String getDpid() { |
| 32 | return dpid; |
| 33 | } |
| 34 | |
| 35 | @JsonProperty("dpid") |
| 36 | public void setDpid(String strDpid) { |
| 37 | this.dpid = strDpid; |
| 38 | } |
| 39 | |
Jonathan Hart | 43ae293 | 2015-01-20 11:08:20 -0800 | [diff] [blame^] | 40 | public long getPortNumber() { |
Jonathan Hart | 74f9c3b | 2014-09-29 20:03:50 -0700 | [diff] [blame] | 41 | return portNumber; |
| 42 | } |
| 43 | |
| 44 | @JsonProperty("port") |
Jonathan Hart | 43ae293 | 2015-01-20 11:08:20 -0800 | [diff] [blame^] | 45 | public void setPortNumber(long portNumber) { |
Jonathan Hart | 74f9c3b | 2014-09-29 20:03:50 -0700 | [diff] [blame] | 46 | this.portNumber = portNumber; |
| 47 | } |
| 48 | |
Jonathan Hart | 70da512 | 2014-10-01 16:37:42 -0700 | [diff] [blame] | 49 | public List<String> getIpAddresses() { |
Jonathan Hart | 74f9c3b | 2014-09-29 20:03:50 -0700 | [diff] [blame] | 50 | return ipAddresses; |
| 51 | } |
| 52 | |
| 53 | @JsonProperty("ips") |
Jonathan Hart | 70da512 | 2014-10-01 16:37:42 -0700 | [diff] [blame] | 54 | public void setIpAddresses(List<String> strIps) { |
| 55 | this.ipAddresses = strIps; |
Jonathan Hart | 74f9c3b | 2014-09-29 20:03:50 -0700 | [diff] [blame] | 56 | } |
| 57 | |
Jonathan Hart | 70da512 | 2014-10-01 16:37:42 -0700 | [diff] [blame] | 58 | public String getMacAddress() { |
Jonathan Hart | 74f9c3b | 2014-09-29 20:03:50 -0700 | [diff] [blame] | 59 | return macAddress; |
| 60 | } |
| 61 | |
| 62 | @JsonProperty("mac") |
Jonathan Hart | 70da512 | 2014-10-01 16:37:42 -0700 | [diff] [blame] | 63 | public void setMacAddress(String macAddress) { |
Jonathan Hart | 74f9c3b | 2014-09-29 20:03:50 -0700 | [diff] [blame] | 64 | this.macAddress = macAddress; |
| 65 | } |
| 66 | } |