Dhruv Dhody | 4d8943a | 2016-02-17 16:36:08 +0530 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2016-present Open Networking Foundation |
Dhruv Dhody | 4d8943a | 2016-02-17 16:36:08 +0530 | [diff] [blame] | 3 | * |
| 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 |
| 7 | * |
| 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. |
| 15 | */ |
| 16 | package org.onosproject.ospf.controller.impl; |
| 17 | |
| 18 | import org.onlab.packet.Ip4Address; |
| 19 | import org.onlab.packet.Ip6Address; |
| 20 | import org.onosproject.ospf.controller.OspfDeviceTed; |
| 21 | |
| 22 | import java.util.List; |
| 23 | |
| 24 | /** |
| 25 | * Representation of an OSPF device Traffic Engineering details. |
| 26 | */ |
| 27 | public class OspfDeviceTedImpl implements OspfDeviceTed { |
| 28 | |
| 29 | List<Ip4Address> ipv4RouterIds; |
| 30 | List<Ip6Address> ipv6RouterIds; |
| 31 | List<Short> topologyIds; |
| 32 | Boolean asbr; |
| 33 | Boolean abr; |
| 34 | |
| 35 | /** |
| 36 | * Gets list of IPv4 router id. |
| 37 | * |
| 38 | * @return list of IPv4 router id |
| 39 | */ |
| 40 | public List<Ip4Address> ipv4RouterIds() { |
| 41 | return ipv4RouterIds; |
| 42 | } |
| 43 | |
| 44 | @Override |
| 45 | public void setIpv4RouterIds(List<Ip4Address> ipv4RouterIds) { |
| 46 | this.ipv4RouterIds = ipv4RouterIds; |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * Gets if router is area border router or not. |
| 51 | * |
| 52 | * @return true if it is area border router else false |
| 53 | */ |
| 54 | public Boolean abr() { |
| 55 | return abr; |
| 56 | } |
| 57 | |
| 58 | @Override |
| 59 | public void setAbr(Boolean abr) { |
| 60 | this.abr = abr; |
| 61 | } |
| 62 | |
| 63 | /** |
| 64 | * Gets if router is autonomous system border router or not. |
| 65 | * |
| 66 | * @return true or false |
| 67 | */ |
| 68 | public Boolean asbr() { |
| 69 | return asbr; |
| 70 | } |
| 71 | |
| 72 | @Override |
| 73 | public void setAsbr(Boolean asbr) { |
| 74 | this.asbr = asbr; |
| 75 | } |
| 76 | |
| 77 | /** |
| 78 | * Gets list of topology id's. |
| 79 | * |
| 80 | * @return list of topology id's |
| 81 | */ |
| 82 | public List<Short> topologyIds() { |
| 83 | return topologyIds; |
| 84 | } |
| 85 | |
| 86 | @Override |
| 87 | public void setTopologyIds(List<Short> topologyIds) { |
| 88 | this.topologyIds = topologyIds; |
| 89 | } |
| 90 | |
| 91 | /** |
| 92 | * Gets list of ipv6 router id's. |
| 93 | * |
| 94 | * @return list of ipv6 router id's |
| 95 | */ |
| 96 | public List<Ip6Address> ipv6RouterIds() { |
| 97 | return ipv6RouterIds; |
| 98 | } |
| 99 | |
| 100 | @Override |
| 101 | public void setIpv6RouterIds(List<Ip6Address> ipv6RouterIds) { |
| 102 | this.ipv6RouterIds = ipv6RouterIds; |
| 103 | } |
| 104 | } |