Committed by
Ray Milkey
Add resources into intent toString() outputs.
Change-Id: Id3903a89e77073c5fa74b48851716b95adfc72de
Showing
7 changed files
with
14 additions
and
7 deletions
... | @@ -126,6 +126,7 @@ public final class HostToHostIntent extends ConnectivityIntent { | ... | @@ -126,6 +126,7 @@ public final class HostToHostIntent extends ConnectivityIntent { |
126 | return MoreObjects.toStringHelper(getClass()) | 126 | return MoreObjects.toStringHelper(getClass()) |
127 | .add("id", id()) | 127 | .add("id", id()) |
128 | .add("appId", appId()) | 128 | .add("appId", appId()) |
129 | + .add("resources", resources()) | ||
129 | .add("selector", selector()) | 130 | .add("selector", selector()) |
130 | .add("treatment", treatment()) | 131 | .add("treatment", treatment()) |
131 | .add("constraints", constraints()) | 132 | .add("constraints", constraints()) | ... | ... |
... | @@ -143,6 +143,7 @@ public final class LinkCollectionIntent extends ConnectivityIntent { | ... | @@ -143,6 +143,7 @@ public final class LinkCollectionIntent extends ConnectivityIntent { |
143 | return MoreObjects.toStringHelper(getClass()) | 143 | return MoreObjects.toStringHelper(getClass()) |
144 | .add("id", id()) | 144 | .add("id", id()) |
145 | .add("appId", appId()) | 145 | .add("appId", appId()) |
146 | + .add("resources", resources()) | ||
146 | .add("selector", selector()) | 147 | .add("selector", selector()) |
147 | .add("treatment", treatment()) | 148 | .add("treatment", treatment()) |
148 | .add("links", links()) | 149 | .add("links", links()) | ... | ... |
... | @@ -125,6 +125,7 @@ public final class MultiPointToSinglePointIntent extends ConnectivityIntent { | ... | @@ -125,6 +125,7 @@ public final class MultiPointToSinglePointIntent extends ConnectivityIntent { |
125 | return MoreObjects.toStringHelper(getClass()) | 125 | return MoreObjects.toStringHelper(getClass()) |
126 | .add("id", id()) | 126 | .add("id", id()) |
127 | .add("appId", appId()) | 127 | .add("appId", appId()) |
128 | + .add("resources", resources()) | ||
128 | .add("selector", selector()) | 129 | .add("selector", selector()) |
129 | .add("treatment", treatment()) | 130 | .add("treatment", treatment()) |
130 | .add("ingress", ingressPoints()) | 131 | .add("ingress", ingressPoints()) | ... | ... |
... | @@ -15,15 +15,14 @@ | ... | @@ -15,15 +15,14 @@ |
15 | */ | 15 | */ |
16 | package org.onosproject.net.intent; | 16 | package org.onosproject.net.intent; |
17 | 17 | ||
18 | -import java.util.Collection; | 18 | +import com.google.common.base.MoreObjects; |
19 | - | 19 | +import com.google.common.collect.ImmutableSet; |
20 | import org.onosproject.core.ApplicationId; | 20 | import org.onosproject.core.ApplicationId; |
21 | import org.onosproject.net.ConnectPoint; | 21 | import org.onosproject.net.ConnectPoint; |
22 | import org.onosproject.net.Link; | 22 | import org.onosproject.net.Link; |
23 | import org.onosproject.net.Path; | 23 | import org.onosproject.net.Path; |
24 | 24 | ||
25 | -import com.google.common.base.MoreObjects; | 25 | +import java.util.Collection; |
26 | -import com.google.common.collect.ImmutableSet; | ||
27 | 26 | ||
28 | public class OpticalPathIntent extends Intent { | 27 | public class OpticalPathIntent extends Intent { |
29 | 28 | ||
... | @@ -69,6 +68,8 @@ public class OpticalPathIntent extends Intent { | ... | @@ -69,6 +68,8 @@ public class OpticalPathIntent extends Intent { |
69 | public String toString() { | 68 | public String toString() { |
70 | return MoreObjects.toStringHelper(getClass()) | 69 | return MoreObjects.toStringHelper(getClass()) |
71 | .add("id", id()) | 70 | .add("id", id()) |
71 | + .add("appId", appId()) | ||
72 | + .add("resources", resources()) | ||
72 | .add("ingressPort", src) | 73 | .add("ingressPort", src) |
73 | .add("egressPort", dst) | 74 | .add("egressPort", dst) |
74 | .add("path", path) | 75 | .add("path", path) | ... | ... |
... | @@ -15,9 +15,6 @@ | ... | @@ -15,9 +15,6 @@ |
15 | */ | 15 | */ |
16 | package org.onosproject.net.intent; | 16 | package org.onosproject.net.intent; |
17 | 17 | ||
18 | -import java.util.Collections; | ||
19 | -import java.util.List; | ||
20 | - | ||
21 | import com.google.common.base.MoreObjects; | 18 | import com.google.common.base.MoreObjects; |
22 | import com.google.common.base.Predicate; | 19 | import com.google.common.base.Predicate; |
23 | import com.google.common.collect.Iterables; | 20 | import com.google.common.collect.Iterables; |
... | @@ -27,6 +24,9 @@ import org.onosproject.net.Path; | ... | @@ -27,6 +24,9 @@ import org.onosproject.net.Path; |
27 | import org.onosproject.net.flow.TrafficSelector; | 24 | import org.onosproject.net.flow.TrafficSelector; |
28 | import org.onosproject.net.flow.TrafficTreatment; | 25 | import org.onosproject.net.flow.TrafficTreatment; |
29 | 26 | ||
27 | +import java.util.Collections; | ||
28 | +import java.util.List; | ||
29 | + | ||
30 | import static com.google.common.base.Preconditions.checkArgument; | 30 | import static com.google.common.base.Preconditions.checkArgument; |
31 | 31 | ||
32 | /** | 32 | /** |
... | @@ -123,6 +123,7 @@ public class PathIntent extends ConnectivityIntent { | ... | @@ -123,6 +123,7 @@ public class PathIntent extends ConnectivityIntent { |
123 | return MoreObjects.toStringHelper(getClass()) | 123 | return MoreObjects.toStringHelper(getClass()) |
124 | .add("id", id()) | 124 | .add("id", id()) |
125 | .add("appId", appId()) | 125 | .add("appId", appId()) |
126 | + .add("resources", resources()) | ||
126 | .add("selector", selector()) | 127 | .add("selector", selector()) |
127 | .add("treatment", treatment()) | 128 | .add("treatment", treatment()) |
128 | .add("constraints", constraints()) | 129 | .add("constraints", constraints()) | ... | ... |
... | @@ -118,6 +118,7 @@ public class PointToPointIntent extends ConnectivityIntent { | ... | @@ -118,6 +118,7 @@ public class PointToPointIntent extends ConnectivityIntent { |
118 | return MoreObjects.toStringHelper(getClass()) | 118 | return MoreObjects.toStringHelper(getClass()) |
119 | .add("id", id()) | 119 | .add("id", id()) |
120 | .add("appId", appId()) | 120 | .add("appId", appId()) |
121 | + .add("resources", resources()) | ||
121 | .add("selector", selector()) | 122 | .add("selector", selector()) |
122 | .add("treatment", treatment()) | 123 | .add("treatment", treatment()) |
123 | .add("ingress", ingressPoint) | 124 | .add("ingress", ingressPoint) | ... | ... |
... | @@ -119,6 +119,7 @@ public class SinglePointToMultiPointIntent extends ConnectivityIntent { | ... | @@ -119,6 +119,7 @@ public class SinglePointToMultiPointIntent extends ConnectivityIntent { |
119 | return MoreObjects.toStringHelper(getClass()) | 119 | return MoreObjects.toStringHelper(getClass()) |
120 | .add("id", id()) | 120 | .add("id", id()) |
121 | .add("appId", appId()) | 121 | .add("appId", appId()) |
122 | + .add("resources", resources()) | ||
122 | .add("selector", selector()) | 123 | .add("selector", selector()) |
123 | .add("treatment", treatment()) | 124 | .add("treatment", treatment()) |
124 | .add("ingress", ingressPoint) | 125 | .add("ingress", ingressPoint) | ... | ... |
-
Please register or login to post a comment