Committed by
Mahesh Poojary Huawei
[ONOS-3117] Changes on VtnRscEventFeedback
Change-Id: I4a835ae81bd2fb5d535d0af10852573ca3667f0e
Showing
1 changed file
with
131 additions
and
2 deletions
... | @@ -20,6 +20,10 @@ import java.util.Objects; | ... | @@ -20,6 +20,10 @@ import java.util.Objects; |
20 | import org.onosproject.vtnrsc.FloatingIp; | 20 | import org.onosproject.vtnrsc.FloatingIp; |
21 | import org.onosproject.vtnrsc.Router; | 21 | import org.onosproject.vtnrsc.Router; |
22 | import org.onosproject.vtnrsc.RouterInterface; | 22 | import org.onosproject.vtnrsc.RouterInterface; |
23 | +import org.onosproject.vtnrsc.PortPair; | ||
24 | +import org.onosproject.vtnrsc.PortPairGroup; | ||
25 | +import org.onosproject.vtnrsc.FlowClassifier; | ||
26 | +import org.onosproject.vtnrsc.PortChain; | ||
23 | 27 | ||
24 | import static com.google.common.base.MoreObjects.toStringHelper; | 28 | import static com.google.common.base.MoreObjects.toStringHelper; |
25 | import static com.google.common.base.Preconditions.checkNotNull; | 29 | import static com.google.common.base.Preconditions.checkNotNull; |
... | @@ -31,6 +35,10 @@ public class VtnRscEventFeedback { | ... | @@ -31,6 +35,10 @@ public class VtnRscEventFeedback { |
31 | private final FloatingIp floaingtIp; | 35 | private final FloatingIp floaingtIp; |
32 | private final Router router; | 36 | private final Router router; |
33 | private final RouterInterface routerInterface; | 37 | private final RouterInterface routerInterface; |
38 | + private final PortPair portPair; | ||
39 | + private final PortPairGroup portPairGroup; | ||
40 | + private final FlowClassifier flowClassifier; | ||
41 | + private final PortChain portChain; | ||
34 | 42 | ||
35 | /** | 43 | /** |
36 | * Creates VtnRscEventFeedback object. | 44 | * Creates VtnRscEventFeedback object. |
... | @@ -41,6 +49,10 @@ public class VtnRscEventFeedback { | ... | @@ -41,6 +49,10 @@ public class VtnRscEventFeedback { |
41 | this.floaingtIp = checkNotNull(floatingIp, "floaintIp cannot be null"); | 49 | this.floaingtIp = checkNotNull(floatingIp, "floaintIp cannot be null"); |
42 | this.router = null; | 50 | this.router = null; |
43 | this.routerInterface = null; | 51 | this.routerInterface = null; |
52 | + this.portPair = null; | ||
53 | + this.portPairGroup = null; | ||
54 | + this.flowClassifier = null; | ||
55 | + this.portChain = null; | ||
44 | } | 56 | } |
45 | 57 | ||
46 | /** | 58 | /** |
... | @@ -52,6 +64,10 @@ public class VtnRscEventFeedback { | ... | @@ -52,6 +64,10 @@ public class VtnRscEventFeedback { |
52 | this.floaingtIp = null; | 64 | this.floaingtIp = null; |
53 | this.router = checkNotNull(router, "router cannot be null"); | 65 | this.router = checkNotNull(router, "router cannot be null"); |
54 | this.routerInterface = null; | 66 | this.routerInterface = null; |
67 | + this.portPair = null; | ||
68 | + this.portPairGroup = null; | ||
69 | + this.flowClassifier = null; | ||
70 | + this.portChain = null; | ||
55 | } | 71 | } |
56 | 72 | ||
57 | /** | 73 | /** |
... | @@ -64,6 +80,74 @@ public class VtnRscEventFeedback { | ... | @@ -64,6 +80,74 @@ public class VtnRscEventFeedback { |
64 | this.router = null; | 80 | this.router = null; |
65 | this.routerInterface = checkNotNull(routerInterface, | 81 | this.routerInterface = checkNotNull(routerInterface, |
66 | "routerInterface cannot be null"); | 82 | "routerInterface cannot be null"); |
83 | + this.portPair = null; | ||
84 | + this.portPairGroup = null; | ||
85 | + this.flowClassifier = null; | ||
86 | + this.portChain = null; | ||
87 | + } | ||
88 | + | ||
89 | + /** | ||
90 | + * Creates VtnRscEventFeedback object. | ||
91 | + * | ||
92 | + * @param portPair the Port-Pair | ||
93 | + */ | ||
94 | + public VtnRscEventFeedback(PortPair portPair) { | ||
95 | + this.floaingtIp = null; | ||
96 | + this.router = null; | ||
97 | + this.routerInterface = null; | ||
98 | + this.portPair = checkNotNull(portPair, | ||
99 | + "Port-Pair cannot be null"); | ||
100 | + this.portPairGroup = null; | ||
101 | + this.flowClassifier = null; | ||
102 | + this.portChain = null; | ||
103 | + } | ||
104 | + | ||
105 | + /** | ||
106 | + * Creates VtnRscEventFeedback object. | ||
107 | + * | ||
108 | + * @param portPairGroup the Port-Pair-Group | ||
109 | + */ | ||
110 | + public VtnRscEventFeedback(PortPairGroup portPairGroup) { | ||
111 | + this.floaingtIp = null; | ||
112 | + this.router = null; | ||
113 | + this.routerInterface = null; | ||
114 | + this.portPair = null; | ||
115 | + this.portPairGroup = checkNotNull(portPairGroup, | ||
116 | + "Port-Pair-Group cannot be null"); | ||
117 | + this.flowClassifier = null; | ||
118 | + this.portChain = null; | ||
119 | + } | ||
120 | + | ||
121 | + /** | ||
122 | + * Creates VtnRscEventFeedback object. | ||
123 | + * | ||
124 | + * @param flowClassifier the Flow-Classifier | ||
125 | + */ | ||
126 | + public VtnRscEventFeedback(FlowClassifier flowClassifier) { | ||
127 | + this.floaingtIp = null; | ||
128 | + this.router = null; | ||
129 | + this.routerInterface = null; | ||
130 | + this.portPair = null; | ||
131 | + this.portPairGroup = null; | ||
132 | + this.flowClassifier = checkNotNull(flowClassifier, | ||
133 | + "Flow-Classifier cannot be null"); | ||
134 | + this.portChain = null; | ||
135 | + } | ||
136 | + | ||
137 | + /** | ||
138 | + * Creates VtnRscEventFeedback object. | ||
139 | + * | ||
140 | + * @param portChain the Port-Chain | ||
141 | + */ | ||
142 | + public VtnRscEventFeedback(PortChain portChain) { | ||
143 | + this.floaingtIp = null; | ||
144 | + this.router = null; | ||
145 | + this.routerInterface = null; | ||
146 | + this.portPair = null; | ||
147 | + this.portPairGroup = null; | ||
148 | + this.flowClassifier = null; | ||
149 | + this.portChain = checkNotNull(portChain, | ||
150 | + "Port-Chain cannot be null"); | ||
67 | } | 151 | } |
68 | 152 | ||
69 | /** | 153 | /** |
... | @@ -93,9 +177,46 @@ public class VtnRscEventFeedback { | ... | @@ -93,9 +177,46 @@ public class VtnRscEventFeedback { |
93 | return routerInterface; | 177 | return routerInterface; |
94 | } | 178 | } |
95 | 179 | ||
180 | + /** | ||
181 | + * Returns Port-Pair. | ||
182 | + * | ||
183 | + * @return portPair the Port-Pair | ||
184 | + */ | ||
185 | + public PortPair portPair() { | ||
186 | + return portPair; | ||
187 | + } | ||
188 | + | ||
189 | + /** | ||
190 | + * Returns Port-Pair-Group. | ||
191 | + * | ||
192 | + * @return portPairGroup the Port-Pair-Group | ||
193 | + */ | ||
194 | + public PortPairGroup portPairGroup() { | ||
195 | + return portPairGroup; | ||
196 | + } | ||
197 | + | ||
198 | + /** | ||
199 | + * Returns Flow-Classifier. | ||
200 | + * | ||
201 | + * @return flowClassifier the Flow-Classifier | ||
202 | + */ | ||
203 | + public FlowClassifier flowClassifier() { | ||
204 | + return flowClassifier; | ||
205 | + } | ||
206 | + | ||
207 | + /** | ||
208 | + * Returns Port-Chain. | ||
209 | + * | ||
210 | + * @return portChain the Port-Chain | ||
211 | + */ | ||
212 | + public PortChain portChain() { | ||
213 | + return portChain; | ||
214 | + } | ||
215 | + | ||
96 | @Override | 216 | @Override |
97 | public int hashCode() { | 217 | public int hashCode() { |
98 | - return Objects.hash(floaingtIp, router, routerInterface); | 218 | + return Objects.hash(floaingtIp, router, routerInterface, portPair, |
219 | + portPairGroup, flowClassifier, portChain); | ||
99 | } | 220 | } |
100 | 221 | ||
101 | @Override | 222 | @Override |
... | @@ -107,7 +228,11 @@ public class VtnRscEventFeedback { | ... | @@ -107,7 +228,11 @@ public class VtnRscEventFeedback { |
107 | final VtnRscEventFeedback that = (VtnRscEventFeedback) obj; | 228 | final VtnRscEventFeedback that = (VtnRscEventFeedback) obj; |
108 | return Objects.equals(this.floaingtIp, that.floaingtIp) | 229 | return Objects.equals(this.floaingtIp, that.floaingtIp) |
109 | && Objects.equals(this.router, that.router) | 230 | && Objects.equals(this.router, that.router) |
110 | - && Objects.equals(this.routerInterface, that.routerInterface); | 231 | + && Objects.equals(this.routerInterface, that.routerInterface) |
232 | + && Objects.equals(this.portPair, that.portPair) | ||
233 | + && Objects.equals(this.portPairGroup, that.portPairGroup) | ||
234 | + && Objects.equals(this.flowClassifier, that.flowClassifier) | ||
235 | + && Objects.equals(this.portChain, that.portChain); | ||
111 | } | 236 | } |
112 | return false; | 237 | return false; |
113 | } | 238 | } |
... | @@ -118,6 +243,10 @@ public class VtnRscEventFeedback { | ... | @@ -118,6 +243,10 @@ public class VtnRscEventFeedback { |
118 | .add("router", router) | 243 | .add("router", router) |
119 | .add("floaingtIp", floaingtIp) | 244 | .add("floaingtIp", floaingtIp) |
120 | .add("routerInterface", routerInterface) | 245 | .add("routerInterface", routerInterface) |
246 | + .add("portPair", portPair) | ||
247 | + .add("portPairGroup", portPairGroup) | ||
248 | + .add("flowClassifier", flowClassifier) | ||
249 | + .add("portChain", portChain) | ||
121 | .toString(); | 250 | .toString(); |
122 | } | 251 | } |
123 | } | 252 | } | ... | ... |
-
Please register or login to post a comment