blob: cf0877e71aa63f93a7a856934937772a11c35d2f [file] [log] [blame]
Dhruv Dhody4d8943a2016-02-17 16:36:08 +05301/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Dhruv Dhody4d8943a2016-02-17 16:36:08 +05303 *
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 */
16package org.onosproject.ospf.controller.impl;
17
18import org.onlab.packet.Ip4Address;
19import org.onlab.packet.Ip6Address;
20import org.onosproject.ospf.controller.OspfDeviceTed;
21
22import java.util.List;
23
24/**
25 * Representation of an OSPF device Traffic Engineering details.
26 */
27public 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}