Thomas Vachuska | 83e090e | 2014-10-22 14:25:35 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2014-present Open Networking Laboratory |
Thomas Vachuska | 83e090e | 2014-10-22 14:25:35 -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 | 83e090e | 2014-10-22 14:25:35 -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 | 83e090e | 2014-10-22 14:25:35 -0700 | [diff] [blame] | 15 | */ |
Pier Ventre | 647138f | 2016-08-26 17:32:44 -0700 | [diff] [blame] | 16 | |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 17 | package org.onosproject.net.intent; |
Ray Milkey | 0742ec9 | 2014-10-13 08:39:55 -0700 | [diff] [blame] | 18 | |
Pier Ventre | 27d4257 | 2016-08-29 17:37:08 -0700 | [diff] [blame] | 19 | import java.util.List; |
Pier Ventre | 27d4257 | 2016-08-29 17:37:08 -0700 | [diff] [blame] | 20 | import java.util.Set; |
Yi Tseng | 2a81c9d | 2016-09-14 10:14:24 -0700 | [diff] [blame] | 21 | import java.util.stream.Collectors; |
Pier Ventre | 27d4257 | 2016-08-29 17:37:08 -0700 | [diff] [blame] | 22 | |
Brian O'Connor | 9476fa1 | 2015-06-25 15:17:17 -0400 | [diff] [blame] | 23 | import com.google.common.annotations.Beta; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 24 | import org.onosproject.core.ApplicationId; |
| 25 | import org.onosproject.net.ConnectPoint; |
Yi Tseng | 2a81c9d | 2016-09-14 10:14:24 -0700 | [diff] [blame] | 26 | import org.onosproject.net.FilteredConnectPoint; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 27 | import org.onosproject.net.Link; |
| 28 | import org.onosproject.net.flow.TrafficSelector; |
| 29 | import org.onosproject.net.flow.TrafficTreatment; |
Ray Milkey | 0742ec9 | 2014-10-13 08:39:55 -0700 | [diff] [blame] | 30 | |
Pier Ventre | 27d4257 | 2016-08-29 17:37:08 -0700 | [diff] [blame] | 31 | import com.google.common.base.MoreObjects; |
| 32 | import com.google.common.collect.ImmutableSet; |
Yi Tseng | 2a81c9d | 2016-09-14 10:14:24 -0700 | [diff] [blame] | 33 | import org.slf4j.Logger; |
| 34 | |
| 35 | import static org.slf4j.LoggerFactory.getLogger; |
Ray Milkey | 0742ec9 | 2014-10-13 08:39:55 -0700 | [diff] [blame] | 36 | |
| 37 | /** |
| 38 | * Abstraction of a connectivity intent that is implemented by a set of path |
| 39 | * segments. |
| 40 | */ |
Brian O'Connor | 9476fa1 | 2015-06-25 15:17:17 -0400 | [diff] [blame] | 41 | @Beta |
Thomas Vachuska | c96058a | 2014-10-20 23:00:16 -0700 | [diff] [blame] | 42 | public final class LinkCollectionIntent extends ConnectivityIntent { |
Ray Milkey | 0742ec9 | 2014-10-13 08:39:55 -0700 | [diff] [blame] | 43 | |
| 44 | private final Set<Link> links; |
| 45 | |
Yi Tseng | 2a81c9d | 2016-09-14 10:14:24 -0700 | [diff] [blame] | 46 | private final Set<FilteredConnectPoint> ingressPoints; |
| 47 | private final Set<FilteredConnectPoint> egressPoints; |
Pier Ventre | 27d4257 | 2016-08-29 17:37:08 -0700 | [diff] [blame] | 48 | private final boolean egressTreatmentFlag; |
Pier Ventre | ffe88d6 | 2016-10-13 14:34:40 -0700 | [diff] [blame^] | 49 | private final double cost; |
| 50 | private static final int DEFAULT_COST = 1; |
Yi Tseng | 2a81c9d | 2016-09-14 10:14:24 -0700 | [diff] [blame] | 51 | |
Pier Ventre | ffe88d6 | 2016-10-13 14:34:40 -0700 | [diff] [blame^] | 52 | /** |
| 53 | * Creates a new actionable intent capable of funneling the selected |
| 54 | * traffic along the specified convergent tree and out the given egress |
| 55 | * point satisfying the specified constraints. |
| 56 | * |
| 57 | * @param appId application identifier |
| 58 | * @param key key to use for the intent |
| 59 | * @param selector traffic match |
| 60 | * @param treatment action |
| 61 | * @param links traversed links |
| 62 | * @param ingressPoints filtered ingress points |
| 63 | * @param egressPoints filtered egress points |
| 64 | * @param constraints optional list of constraints |
| 65 | * @param priority priority to use for the flows generated by this intent |
| 66 | * @param egressTreatment true if treatment should be applied by the egress device |
| 67 | * @param cost the cost of the links |
| 68 | * @throws NullPointerException {@code path} is null |
| 69 | */ |
| 70 | private LinkCollectionIntent(ApplicationId appId, |
| 71 | Key key, |
| 72 | TrafficSelector selector, |
| 73 | TrafficTreatment treatment, |
| 74 | Set<Link> links, |
| 75 | Set<FilteredConnectPoint> ingressPoints, |
| 76 | Set<FilteredConnectPoint> egressPoints, |
| 77 | List<Constraint> constraints, |
| 78 | int priority, |
| 79 | boolean egressTreatment, |
| 80 | double cost) { |
| 81 | super(appId, key, resources(links), selector, treatment, constraints, priority); |
| 82 | this.links = links; |
| 83 | this.ingressPoints = ingressPoints; |
| 84 | this.egressPoints = egressPoints; |
| 85 | this.egressTreatmentFlag = egressTreatment; |
| 86 | this.cost = cost; |
| 87 | } |
Jonathan Hart | 6b2ffc3 | 2014-10-18 02:09:22 -0700 | [diff] [blame] | 88 | |
Ray Milkey | 0742ec9 | 2014-10-13 08:39:55 -0700 | [diff] [blame] | 89 | /** |
Pavlin Radoslavov | 2811c40 | 2015-02-25 14:30:17 -0800 | [diff] [blame] | 90 | * Creates a new actionable intent capable of funneling the selected |
| 91 | * traffic along the specified convergent tree and out the given egress |
Pavlin Radoslavov | 2811c40 | 2015-02-25 14:30:17 -0800 | [diff] [blame] | 92 | * point satisfying the specified constraints. |
Sho SHIMIZU | ac8f352 | 2014-11-10 12:14:50 -0800 | [diff] [blame] | 93 | * |
| 94 | * @param appId application identifier |
Ray Milkey | ebc5d22 | 2015-03-18 15:45:36 -0700 | [diff] [blame] | 95 | * @param key key to use for the intent |
Sho SHIMIZU | ac8f352 | 2014-11-10 12:14:50 -0800 | [diff] [blame] | 96 | * @param selector traffic match |
| 97 | * @param treatment action |
| 98 | * @param links traversed links |
Yi Tseng | 2a81c9d | 2016-09-14 10:14:24 -0700 | [diff] [blame] | 99 | * @param ingressPoints filtered ingress points |
| 100 | * @param egressPoints filtered egress points |
Sho SHIMIZU | ac8f352 | 2014-11-10 12:14:50 -0800 | [diff] [blame] | 101 | * @param constraints optional list of constraints |
Ray Milkey | c24cde3 | 2015-03-10 18:20:18 -0700 | [diff] [blame] | 102 | * @param priority priority to use for the flows generated by this intent |
Nicholas Dean | 126b8af | 2016-07-18 14:43:13 -0700 | [diff] [blame] | 103 | * @param egressTreatment true if treatment should be applied by the egress device |
Sho SHIMIZU | ac8f352 | 2014-11-10 12:14:50 -0800 | [diff] [blame] | 104 | * @throws NullPointerException {@code path} is null |
| 105 | */ |
Ray Milkey | ebc5d22 | 2015-03-18 15:45:36 -0700 | [diff] [blame] | 106 | private LinkCollectionIntent(ApplicationId appId, |
Nicholas Dean | 126b8af | 2016-07-18 14:43:13 -0700 | [diff] [blame] | 107 | Key key, |
| 108 | TrafficSelector selector, |
| 109 | TrafficTreatment treatment, |
| 110 | Set<Link> links, |
Yi Tseng | 2a81c9d | 2016-09-14 10:14:24 -0700 | [diff] [blame] | 111 | Set<FilteredConnectPoint> ingressPoints, |
| 112 | Set<FilteredConnectPoint> egressPoints, |
Nicholas Dean | 126b8af | 2016-07-18 14:43:13 -0700 | [diff] [blame] | 113 | List<Constraint> constraints, |
Pier Ventre | 647138f | 2016-08-26 17:32:44 -0700 | [diff] [blame] | 114 | int priority, |
Yi Tseng | 2a81c9d | 2016-09-14 10:14:24 -0700 | [diff] [blame] | 115 | boolean egressTreatment) { |
Pier Ventre | ffe88d6 | 2016-10-13 14:34:40 -0700 | [diff] [blame^] | 116 | this(appId, key, selector, treatment, links, ingressPoints, egressPoints, constraints, |
| 117 | priority, egressTreatment, DEFAULT_COST); |
Ray Milkey | 0742ec9 | 2014-10-13 08:39:55 -0700 | [diff] [blame] | 118 | } |
| 119 | |
Thomas Vachuska | c96058a | 2014-10-20 23:00:16 -0700 | [diff] [blame] | 120 | /** |
| 121 | * Constructor for serializer. |
| 122 | */ |
Ray Milkey | 0742ec9 | 2014-10-13 08:39:55 -0700 | [diff] [blame] | 123 | protected LinkCollectionIntent() { |
Ray Milkey | 0742ec9 | 2014-10-13 08:39:55 -0700 | [diff] [blame] | 124 | this.links = null; |
Pavlin Radoslavov | 2811c40 | 2015-02-25 14:30:17 -0800 | [diff] [blame] | 125 | this.ingressPoints = null; |
Michele Santuari | 4a33807 | 2014-11-05 18:38:55 +0100 | [diff] [blame] | 126 | this.egressPoints = null; |
Nicholas Dean | 126b8af | 2016-07-18 14:43:13 -0700 | [diff] [blame] | 127 | this.egressTreatmentFlag = false; |
Pier Ventre | ffe88d6 | 2016-10-13 14:34:40 -0700 | [diff] [blame^] | 128 | this.cost = DEFAULT_COST; |
Ray Milkey | 0742ec9 | 2014-10-13 08:39:55 -0700 | [diff] [blame] | 129 | } |
| 130 | |
Ray Milkey | e668408 | 2014-10-16 16:59:47 -0700 | [diff] [blame] | 131 | /** |
Ray Milkey | ebc5d22 | 2015-03-18 15:45:36 -0700 | [diff] [blame] | 132 | * Returns a new link collection intent builder. The application id, |
| 133 | * ingress point and egress points are required fields. If they are |
| 134 | * not set by calls to the appropriate methods, an exception will |
| 135 | * be thrown. |
| 136 | * |
| 137 | * @return single point to multi point builder |
| 138 | */ |
| 139 | public static Builder builder() { |
| 140 | return new Builder(); |
| 141 | } |
| 142 | |
| 143 | /** |
| 144 | * Builder of a single point to multi point intent. |
| 145 | */ |
| 146 | public static final class Builder extends ConnectivityIntent.Builder { |
Yi Tseng | 2a81c9d | 2016-09-14 10:14:24 -0700 | [diff] [blame] | 147 | private final Logger log = getLogger(getClass()); |
| 148 | private Set<Link> links; |
| 149 | private Set<FilteredConnectPoint> ingressPoints; |
| 150 | private Set<FilteredConnectPoint> egressPoints; |
| 151 | private boolean egressTreatmentFlag; |
Pier Ventre | ffe88d6 | 2016-10-13 14:34:40 -0700 | [diff] [blame^] | 152 | private double cost; |
| 153 | |
Ray Milkey | ebc5d22 | 2015-03-18 15:45:36 -0700 | [diff] [blame] | 154 | |
| 155 | private Builder() { |
| 156 | // Hide constructor |
| 157 | } |
| 158 | |
| 159 | @Override |
| 160 | public Builder appId(ApplicationId appId) { |
| 161 | return (Builder) super.appId(appId); |
| 162 | } |
| 163 | |
| 164 | @Override |
| 165 | public Builder key(Key key) { |
| 166 | return (Builder) super.key(key); |
| 167 | } |
| 168 | |
| 169 | @Override |
| 170 | public Builder selector(TrafficSelector selector) { |
| 171 | return (Builder) super.selector(selector); |
| 172 | } |
| 173 | |
| 174 | @Override |
| 175 | public Builder treatment(TrafficTreatment treatment) { |
| 176 | return (Builder) super.treatment(treatment); |
| 177 | } |
| 178 | |
| 179 | @Override |
| 180 | public Builder constraints(List<Constraint> constraints) { |
| 181 | return (Builder) super.constraints(constraints); |
| 182 | } |
| 183 | |
| 184 | @Override |
| 185 | public Builder priority(int priority) { |
| 186 | return (Builder) super.priority(priority); |
| 187 | } |
| 188 | |
| 189 | /** |
| 190 | * Sets the ingress point of the single point to multi point intent |
| 191 | * that will be built. |
| 192 | * |
| 193 | * @param ingressPoints ingress connect points |
| 194 | * @return this builder |
| 195 | */ |
Yi Tseng | 2a81c9d | 2016-09-14 10:14:24 -0700 | [diff] [blame] | 196 | @Deprecated |
Ray Milkey | ebc5d22 | 2015-03-18 15:45:36 -0700 | [diff] [blame] | 197 | public Builder ingressPoints(Set<ConnectPoint> ingressPoints) { |
Yi Tseng | 2a81c9d | 2016-09-14 10:14:24 -0700 | [diff] [blame] | 198 | if (this.ingressPoints != null) { |
| 199 | log.warn("Ingress points are already set, " + |
| 200 | "this will override original ingress points."); |
| 201 | } |
| 202 | this.ingressPoints = ingressPoints.stream() |
| 203 | .map(FilteredConnectPoint::new) |
| 204 | .collect(Collectors.toSet()); |
Ray Milkey | ebc5d22 | 2015-03-18 15:45:36 -0700 | [diff] [blame] | 205 | return this; |
| 206 | } |
| 207 | |
| 208 | /** |
| 209 | * Sets the egress points of the single point to multi point intent |
| 210 | * that will be built. |
| 211 | * |
| 212 | * @param egressPoints egress connect points |
| 213 | * @return this builder |
| 214 | */ |
Yi Tseng | 2a81c9d | 2016-09-14 10:14:24 -0700 | [diff] [blame] | 215 | @Deprecated |
Ray Milkey | ebc5d22 | 2015-03-18 15:45:36 -0700 | [diff] [blame] | 216 | public Builder egressPoints(Set<ConnectPoint> egressPoints) { |
Yi Tseng | 2a81c9d | 2016-09-14 10:14:24 -0700 | [diff] [blame] | 217 | if (this.egressPoints != null) { |
| 218 | log.warn("Egress points are already set, " + |
| 219 | "this will override original egress points."); |
| 220 | } |
| 221 | this.egressPoints = egressPoints.stream() |
| 222 | .map(FilteredConnectPoint::new) |
| 223 | .collect(Collectors.toSet()); |
| 224 | return this; |
| 225 | } |
| 226 | |
| 227 | /** |
| 228 | * Sets the filtered ingress point of the single point to multi point intent |
| 229 | * that will be built. |
| 230 | * |
| 231 | * @param ingressPoints ingress connect points |
| 232 | * @return this builder |
| 233 | */ |
| 234 | public Builder filteredIngressPoints(Set<FilteredConnectPoint> ingressPoints) { |
| 235 | this.ingressPoints = ImmutableSet.copyOf(ingressPoints); |
| 236 | return this; |
| 237 | } |
| 238 | |
| 239 | /** |
| 240 | * Sets the filtered egress points of the single point to multi point intent |
| 241 | * that will be built. |
| 242 | * |
| 243 | * @param egressPoints egress connect points |
| 244 | * @return this builder |
| 245 | */ |
| 246 | public Builder filteredEgressPoints(Set<FilteredConnectPoint> egressPoints) { |
Ray Milkey | ebc5d22 | 2015-03-18 15:45:36 -0700 | [diff] [blame] | 247 | this.egressPoints = ImmutableSet.copyOf(egressPoints); |
| 248 | return this; |
| 249 | } |
| 250 | |
| 251 | /** |
| 252 | * Sets the links of the link collection intent |
| 253 | * that will be built. |
| 254 | * |
| 255 | * @param links links for the intent |
| 256 | * @return this builder |
| 257 | */ |
| 258 | public Builder links(Set<Link> links) { |
| 259 | this.links = ImmutableSet.copyOf(links); |
| 260 | return this; |
| 261 | } |
| 262 | |
Nicholas Dean | 126b8af | 2016-07-18 14:43:13 -0700 | [diff] [blame] | 263 | /** |
| 264 | * Sets the intent to apply treatment at the egress rather than the |
| 265 | * ingress. |
| 266 | * |
| 267 | * @param treatmentOnEgress true applies treatment on egress device |
| 268 | * @return this builder |
| 269 | */ |
| 270 | public Builder applyTreatmentOnEgress(boolean treatmentOnEgress) { |
| 271 | this.egressTreatmentFlag = treatmentOnEgress; |
| 272 | return this; |
| 273 | } |
Ray Milkey | ebc5d22 | 2015-03-18 15:45:36 -0700 | [diff] [blame] | 274 | |
| 275 | /** |
Pier Ventre | ffe88d6 | 2016-10-13 14:34:40 -0700 | [diff] [blame^] | 276 | * Sets the cost for the links of the Intent. |
| 277 | * |
| 278 | * @param cost the cost of the links |
| 279 | * @return this builder |
| 280 | */ |
| 281 | public Builder cost(double cost) { |
| 282 | this.cost = cost; |
| 283 | return this; |
| 284 | } |
| 285 | |
| 286 | /** |
Ray Milkey | ebc5d22 | 2015-03-18 15:45:36 -0700 | [diff] [blame] | 287 | * Builds a single point to multi point intent from the |
| 288 | * accumulated parameters. |
| 289 | * |
| 290 | * @return point to point intent |
| 291 | */ |
| 292 | public LinkCollectionIntent build() { |
| 293 | |
| 294 | return new LinkCollectionIntent( |
| 295 | appId, |
| 296 | key, |
| 297 | selector, |
| 298 | treatment, |
| 299 | links, |
| 300 | ingressPoints, |
| 301 | egressPoints, |
| 302 | constraints, |
Nicholas Dean | 126b8af | 2016-07-18 14:43:13 -0700 | [diff] [blame] | 303 | priority, |
Pier Ventre | ffe88d6 | 2016-10-13 14:34:40 -0700 | [diff] [blame^] | 304 | egressTreatmentFlag, |
| 305 | cost |
Ray Milkey | ebc5d22 | 2015-03-18 15:45:36 -0700 | [diff] [blame] | 306 | ); |
| 307 | } |
| 308 | } |
| 309 | |
Ray Milkey | ebc5d22 | 2015-03-18 15:45:36 -0700 | [diff] [blame] | 310 | /** |
Ray Milkey | e668408 | 2014-10-16 16:59:47 -0700 | [diff] [blame] | 311 | * Returns the set of links that represent the network connections needed |
| 312 | * by this intent. |
| 313 | * |
| 314 | * @return Set of links for the network hops needed by this intent |
| 315 | */ |
Ray Milkey | 0742ec9 | 2014-10-13 08:39:55 -0700 | [diff] [blame] | 316 | public Set<Link> links() { |
| 317 | return links; |
| 318 | } |
| 319 | |
Jonathan Hart | 6b2ffc3 | 2014-10-18 02:09:22 -0700 | [diff] [blame] | 320 | /** |
Pavlin Radoslavov | 2811c40 | 2015-02-25 14:30:17 -0800 | [diff] [blame] | 321 | * Returns the ingress points of the intent. |
Jonathan Hart | 6b2ffc3 | 2014-10-18 02:09:22 -0700 | [diff] [blame] | 322 | * |
Pavlin Radoslavov | 2811c40 | 2015-02-25 14:30:17 -0800 | [diff] [blame] | 323 | * @return the ingress points |
| 324 | */ |
| 325 | public Set<ConnectPoint> ingressPoints() { |
Yi Tseng | 2a81c9d | 2016-09-14 10:14:24 -0700 | [diff] [blame] | 326 | if (this.ingressPoints == null) { |
| 327 | return null; |
| 328 | } |
| 329 | return ingressPoints.stream() |
| 330 | .map(FilteredConnectPoint::connectPoint) |
| 331 | .collect(Collectors.toSet()); |
Pavlin Radoslavov | 2811c40 | 2015-02-25 14:30:17 -0800 | [diff] [blame] | 332 | } |
| 333 | |
| 334 | /** |
| 335 | * Returns the egress points of the intent. |
| 336 | * |
| 337 | * @return the egress points |
Jonathan Hart | 6b2ffc3 | 2014-10-18 02:09:22 -0700 | [diff] [blame] | 338 | */ |
Michele Santuari | 4a33807 | 2014-11-05 18:38:55 +0100 | [diff] [blame] | 339 | public Set<ConnectPoint> egressPoints() { |
Yi Tseng | 2a81c9d | 2016-09-14 10:14:24 -0700 | [diff] [blame] | 340 | if (this.egressPoints == null) { |
| 341 | return null; |
| 342 | } |
| 343 | return egressPoints.stream() |
| 344 | .map(FilteredConnectPoint::connectPoint) |
| 345 | .collect(Collectors.toSet()); |
| 346 | } |
| 347 | |
| 348 | /** |
| 349 | * Returns the filtered ingress points of the intent. |
| 350 | * |
| 351 | * @return the ingress points |
| 352 | */ |
| 353 | public Set<FilteredConnectPoint> filteredIngressPoints() { |
| 354 | return ingressPoints; |
| 355 | } |
| 356 | |
| 357 | /** |
| 358 | * Returns the egress points of the intent. |
| 359 | * |
| 360 | * @return the egress points |
| 361 | */ |
| 362 | public Set<FilteredConnectPoint> filteredEgressPoints() { |
Michele Santuari | 4a33807 | 2014-11-05 18:38:55 +0100 | [diff] [blame] | 363 | return egressPoints; |
Jonathan Hart | 6b2ffc3 | 2014-10-18 02:09:22 -0700 | [diff] [blame] | 364 | } |
| 365 | |
Nicholas Dean | 126b8af | 2016-07-18 14:43:13 -0700 | [diff] [blame] | 366 | /** |
| 367 | * Returns whether treatment should be applied on egress. |
| 368 | * |
| 369 | * @return the egress treatment flag |
| 370 | */ |
| 371 | public boolean applyTreatmentOnEgress() { |
| 372 | return egressTreatmentFlag; |
| 373 | } |
| 374 | |
Pier Ventre | ffe88d6 | 2016-10-13 14:34:40 -0700 | [diff] [blame^] | 375 | /** |
| 376 | * Returns the cost of the links of this intent. |
| 377 | * |
| 378 | * @return the cost of the links |
| 379 | */ |
| 380 | public double cost() { |
| 381 | return cost; |
| 382 | } |
| 383 | |
Ray Milkey | 0742ec9 | 2014-10-13 08:39:55 -0700 | [diff] [blame] | 384 | @Override |
Ray Milkey | 0742ec9 | 2014-10-13 08:39:55 -0700 | [diff] [blame] | 385 | public String toString() { |
| 386 | return MoreObjects.toStringHelper(getClass()) |
| 387 | .add("id", id()) |
Ray Milkey | c357381 | 2015-02-09 09:18:34 -0800 | [diff] [blame] | 388 | .add("key", key()) |
Thomas Vachuska | e291c84 | 2014-10-21 02:52:38 -0700 | [diff] [blame] | 389 | .add("appId", appId()) |
Ray Milkey | c24cde3 | 2015-03-10 18:20:18 -0700 | [diff] [blame] | 390 | .add("priority", priority()) |
Jonathan Hart | 23b5a76 | 2015-01-26 14:47:33 -0800 | [diff] [blame] | 391 | .add("resources", resources()) |
Thomas Vachuska | e291c84 | 2014-10-21 02:52:38 -0700 | [diff] [blame] | 392 | .add("selector", selector()) |
| 393 | .add("treatment", treatment()) |
Ray Milkey | 0742ec9 | 2014-10-13 08:39:55 -0700 | [diff] [blame] | 394 | .add("links", links()) |
Pavlin Radoslavov | 2811c40 | 2015-02-25 14:30:17 -0800 | [diff] [blame] | 395 | .add("ingress", ingressPoints()) |
Michele Santuari | 4a33807 | 2014-11-05 18:38:55 +0100 | [diff] [blame] | 396 | .add("egress", egressPoints()) |
Pier Ventre | 27d4257 | 2016-08-29 17:37:08 -0700 | [diff] [blame] | 397 | .add("treatementOnEgress", applyTreatmentOnEgress()) |
Pier Ventre | ffe88d6 | 2016-10-13 14:34:40 -0700 | [diff] [blame^] | 398 | .add("cost", cost()) |
Ray Milkey | 0742ec9 | 2014-10-13 08:39:55 -0700 | [diff] [blame] | 399 | .toString(); |
| 400 | } |
Pier Ventre | 647138f | 2016-08-26 17:32:44 -0700 | [diff] [blame] | 401 | } |