commit | 6c9e33a3fad6dd9253235812b44f5c5f17a1632f | [log] [tgz] |
---|---|---|
author | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Thu Jan 07 18:45:27 2016 -0800 |
committer | Gerrit Code Review <gerrit@onlab.us> | Thu Jan 14 07:36:56 2016 +0000 |
tree | d12b213d0ca2a8a22d45a084e9382f97b55634ca | |
parent | 31f37edd9929e606e03c784d94103dfd6601d117 [diff] [blame] |
ONOS-3296: Support continuous type resources Change-Id: I155e41e7a7c1750ff45986a55bedab353485d3fa
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MockResourceService.java b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MockResourceService.java index f5d3d0f..2926346 100644 --- a/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MockResourceService.java +++ b/core/net/src/test/java/org/onosproject/net/intent/impl/compiler/MockResourceService.java
@@ -66,9 +66,10 @@ } @Override - public Optional<ResourceAllocation> getResourceAllocation(ResourcePath resource) { + public List<ResourceAllocation> getResourceAllocation(ResourcePath resource) { return Optional.ofNullable(assignment.get(resource)) - .map(x -> new ResourceAllocation(resource, x)); + .map(x -> ImmutableList.of(new ResourceAllocation(resource, x))) + .orElse(ImmutableList.of()); } @Override