andreaturli commented on this pull request.


>  
          try {
-            network = networkApi.create(
-                  
Network.createBuilder("jclouds-network-test").external(true).networkType(NetworkType.LOCAL).build());
-            assertNotNull(network);
-
-            ipv4SubnetId = 
subnetApi.create(Subnet.createBuilder(network.getId(), 
"198.51.100.0/24").ipVersion(4)
-                  .name("JClouds-Live-IPv4-Subnet").build()).getId();
+            network = networkApi.list().concat().firstMatch(new 
Predicate<Network>() {
+               @Override
+               public boolean apply(@Nullable Network input) {
+                  return input.getExternal();

good point, I think `@Nullable` is wrong here as networkApi.list uses 
`EmptyPagedIterableOnNotFoundOr404`

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1178#discussion_r168440660

Reply via email to