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 15:23:45 GMT
andreaturli commented on this pull request.



> @@ -275,15 +258,24 @@ public boolean apply(Network input) {
    }
 
 
-   private List<Network> getNetworksFromPoolNames(String regionId, final Optional<Set<String>>
poolNames) {
-      return getNetworkApi(regionId).list().concat().filter(new Predicate<Network>()
{
-         @Override
-         public boolean apply(Network network) {
-            return poolNames.isPresent() &&
-                   !poolNames.get().isEmpty() &&
-                   poolNames.get().contains(network.getName());
+   /**
+    * Get all suitable networks to allocate a floating ip
+    *
+    * It will prefer networks specified using the poolNames first and then the external networks
in the given availability zone
+    */
+   private List<Network> getNetworksFromPoolNamesAndExternal(String regionId, final
String availabilityZone, final Optional<Set<String>> poolNames) {
+      if (poolNames.isPresent() && poolNames.get().isEmpty()) return Lists.newArrayList();

you are right, I will fix it

-- 
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_r168508239
Mime
View raw message