Ray Milkey

Remove references to deprecated bandwidth method

Change-Id: I98f4f148d573bd7ce644733c33cc038b0b14dc97
...@@ -34,16 +34,6 @@ public class BandwidthResourceRequest implements ResourceRequest { ...@@ -34,16 +34,6 @@ public class BandwidthResourceRequest implements ResourceRequest {
34 } 34 }
35 35
36 /** 36 /**
37 - * Creates a new {@link BandwidthResourceRequest} with bandwidth value.
38 - *
39 - * @param bandwidth bandwidth value to be requested
40 - */
41 - @Deprecated
42 - public BandwidthResourceRequest(double bandwidth) {
43 - this.bandwidth = Bandwidth.valueOf(bandwidth);
44 - }
45 -
46 - /**
47 * Returns the bandwidth resource. 37 * Returns the bandwidth resource.
48 * 38 *
49 * @return the bandwidth resource 39 * @return the bandwidth resource
......
...@@ -130,12 +130,12 @@ public final class DefaultLinkResourceRequest implements LinkResourceRequest { ...@@ -130,12 +130,12 @@ public final class DefaultLinkResourceRequest implements LinkResourceRequest {
130 /** 130 /**
131 * Adds bandwidth request with bandwidth value. 131 * Adds bandwidth request with bandwidth value.
132 * 132 *
133 - * @param bandwidth bandwidth value to be requested 133 + * @param bandwidth bandwidth value in bits per second to be requested
134 * @return self 134 * @return self
135 */ 135 */
136 @Override 136 @Override
137 public Builder addBandwidthRequest(double bandwidth) { 137 public Builder addBandwidthRequest(double bandwidth) {
138 - resources.add(new BandwidthResourceRequest(bandwidth)); 138 + resources.add(new BandwidthResourceRequest(Bandwidth.bps(bandwidth)));
139 return this; 139 return this;
140 } 140 }
141 141
......
...@@ -45,6 +45,7 @@ import org.onosproject.net.flow.TrafficTreatment; ...@@ -45,6 +45,7 @@ import org.onosproject.net.flow.TrafficTreatment;
45 import org.onosproject.net.flow.criteria.Criterion; 45 import org.onosproject.net.flow.criteria.Criterion;
46 import org.onosproject.net.flow.criteria.Criterion.Type; 46 import org.onosproject.net.flow.criteria.Criterion.Type;
47 import org.onosproject.net.flow.instructions.Instruction; 47 import org.onosproject.net.flow.instructions.Instruction;
48 +import org.onosproject.net.resource.Bandwidth;
48 import org.onosproject.net.resource.BandwidthResourceRequest; 49 import org.onosproject.net.resource.BandwidthResourceRequest;
49 import org.onosproject.net.resource.LambdaResourceRequest; 50 import org.onosproject.net.resource.LambdaResourceRequest;
50 import org.onosproject.net.resource.LinkResourceAllocations; 51 import org.onosproject.net.resource.LinkResourceAllocations;
...@@ -270,7 +271,8 @@ public class IntentTestsMocks { ...@@ -270,7 +271,8 @@ public class IntentTestsMocks {
270 public Iterable<ResourceRequest> getAvailableResources(Link link) { 271 public Iterable<ResourceRequest> getAvailableResources(Link link) {
271 final List<ResourceRequest> result = new LinkedList<>(); 272 final List<ResourceRequest> result = new LinkedList<>();
272 if (availableBandwidth > 0.0) { 273 if (availableBandwidth > 0.0) {
273 - result.add(new BandwidthResourceRequest(availableBandwidth)); 274 + result.add(new BandwidthResourceRequest(
275 + Bandwidth.bps(availableBandwidth)));
274 } 276 }
275 if (availableLambda > 0) { 277 if (availableLambda > 0) {
276 result.add(new LambdaResourceRequest()); 278 result.add(new LambdaResourceRequest());
......