blob: db8c9c67700257b7452d34ebfd88d1e00709e557 [file] [log] [blame]
janani b9ed76be2017-08-29 19:11:33 +05301/*
2 * Copyright 2017-present Open Networking Foundation
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
17package org.onosproject.l3vpn.netl3vpn;
18
19/**
20 * Represents the tunnel information.
21 */
22public class TunnelInfo {
23
24 /**
25 * Destination ip address.
26 */
27 private final String desIp;
28
29 /**
30 * Tunnel name.
31 */
32 private final String tnlName;
33
34 /**
35 * Tunnel policy name.
36 */
37 private final String polName;
38
39 /**
40 * Device id.
41 */
42 private final String devId;
43
44 /**
45 * Level of the model.
46 */
47 private ModelIdLevel level;
48
49 /**
50 * Creates tunnel info with destination ip address, tunnel name, tunnel
51 * policy name and device id.
52 *
53 * @param dIp destination ip
54 * @param tName tunnel name
55 * @param pName tunnel policy name
56 * @param dId device id
57 */
58 public TunnelInfo(String dIp, String tName, String pName, String dId) {
59 this.desIp = dIp;
60 this.tnlName = tName;
61 this.polName = pName;
62 this.devId = dId;
63 }
64
65 /**
66 * Returns the destination ip-address.
67 *
68 * @return destination ip-address
69 */
70 public String desIp() {
71 return desIp;
72 }
73
74 /**
75 * Returns the tunnel name.
76 *
77 * @return tunnel name
78 */
79 public String tnlName() {
80 return tnlName;
81 }
82
83 /**
84 * Returns the tunnel policy name.
85 *
86 * @return tunnel policy name
87 */
88 public String polName() {
89 return polName;
90 }
91
92 /**
93 * Returns the device id.
94 *
95 * @return device id
96 */
97 public String devId() {
98 return devId;
99 }
100
101 /**
102 * Returns the model id level.
103 *
104 * @return model id level
105 */
106 public ModelIdLevel level() {
107 return level;
108 }
109
110 /**
111 * Sets the model id level.
112 *
113 * @param level model id level
114 */
115 public void level(ModelIdLevel level) {
116 this.level = level;
117 }
118}