jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Turli <notificati...@github.com>
Subject Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)
Date Thu, 15 Feb 2018 10:53:40 GMT
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
Mime
View raw message