Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Andrea Turli
Closed #1178. -- 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#event-1476352774

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Andrea Turli
Merged at [master](https://git1-us-west.apache.org/repos/asf?p=jclouds.git;a=commit;h=50ae6828) -- 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#issuecomment-365995753

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Andrea Turli
merging now -- 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#issuecomment-365995432

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Ignasi Barrera
nacx approved this pull request. -- 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#pullrequestreview-96909129

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Andrea Turli
@andreaturli pushed 1 commit. ef03157 more comments -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds/pull/1178/files/a0aee8e86c6d22322992e471ebc9ab031984a804..ef03157a14a20991a1f8bc1d69896edf58b9f8f7

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Andrea Turli
andreaturli commented on this pull request. > @@ -275,15 +258,24 @@ public boolean apply(Network input) { } - private List getNetworksFromPoolNames(String regionId, final Optional poolNames) { - return getNetworkApi(regionId).list().concat().filter(new Predicate() { -

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Ignasi Barrera
nacx requested changes on this pull request. > @@ -275,15 +258,24 @@ public boolean apply(Network input) { } - private List getNetworksFromPoolNames(String regionId, final Optional poolNames) { - return getNetworkApi(regionId).list().concat().filter(new Predicate() { -

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Andrea Turli
@andreaturli pushed 1 commit. a0aee8e more comments addressed -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds/pull/1178/files/f5c484c40ad35720edd621bfe6b031e5b3e107bc..a0aee8e86c6d22322992e471ebc9ab031984a804

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Andrea Turli
andreaturli commented on this pull request. > public NovaComputeServiceLiveTest() { provider = "openstack-nova"; - - Properties overrides = setupProperties(); - neutronApiContext = ContextBuilder.newBuilder("openstack-neutron") -

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Ignasi Barrera
nacx commented on this pull request. >return floatingIP; } + + private List getNetworksFromPoolNames(String regionId, final Optional poolNames) { + return getNetworkApi(regionId).list().concat().filter(new Predicate() { if the pool name set is absent or empty, just

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Andrea Turli
@andreaturli pushed 1 commit. f5c484c comments addressed -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds/pull/1178/files/99f434fa292950f7cff2560c6b5881627962d7ff..f5c484c40ad35720edd621bfe6b031e5b3e107bc

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Ignasi Barrera
nacx commented on this pull request. > + } + }); + return floatingIPOptional; + } + + private org.jclouds.openstack.neutron.v2.domain.FloatingIP createFloatingIpUsingNeutron(org.jclouds.openstack.neutron.v2.features.FloatingIPApi neutronFloatingApi, NodeMetadata node,

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Andrea Turli
andreaturli commented on this pull request. > + } + }); + return floatingIPOptional; + } + + private org.jclouds.openstack.neutron.v2.domain.FloatingIP createFloatingIpUsingNeutron(org.jclouds.openstack.neutron.v2.features.FloatingIPApi neutronFloatingApi, NodeMetadata

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Andrea Turli
andreaturli commented on this pull request. > @@ -51,7 +78,66 @@ protected LoggingModule getLoggingModule() { @Override protected Iterable setupModules() { - return ImmutableSet.of(getLoggingModule(), credentialStoreModule, getSshModule()); + return ImmutableSet. of( +

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Ignasi Barrera
nacx commented on this pull request. > + Optional > floatingIPOptional = tryFindExistingFloatingIp(neutronFloatingApi, > availabilityZone); + org.jclouds.openstack.neutron.v2.domain.FloatingIP floatingIP; + if (floatingIPOptional.isPresent()) { +

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Andrea Turli
andreaturli commented on this pull request. > + } + + private final Location location; + + @Inject + public NeutronFloatingIpToFloatingIp(@Assisted Location location) { + this.location = location; + } + + @Override + public FloatingIP apply(@Nullable

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Andrea Turli
andreaturli commented on this pull request. > + Optional > floatingIPOptional = tryFindExistingFloatingIp(neutronFloatingApi, > availabilityZone); + org.jclouds.openstack.neutron.v2.domain.FloatingIP floatingIP; + if (floatingIPOptional.isPresent()) {

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Ignasi Barrera
nacx commented on this pull request. > + Optional networkOptional = > getNetworkApi(regionId).list().concat().firstMatch(new Predicate() { + @Override + public boolean apply(@Nullable Network input) { +return input.getExternal() &&

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Andrea Turli
andreaturli commented on this pull request. > + Optional networkOptional = > getNetworkApi(regionId).list().concat().firstMatch(new Predicate() { + @Override + public boolean apply(@Nullable Network input) { +return input.getExternal() &&

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Andrea Turli
andreaturli commented on this pull request. > try { -network = networkApi.create( - Network.createBuilder("jclouds-network-test").external(true).networkType(NetworkType.LOCAL).build()); -assertNotNull(network); - -ipv4SubnetId =

Re: [jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Ignasi Barrera
nacx commented on this pull request. Thanks @andreaturli! > try { -network = networkApi.create( - Network.createBuilder("jclouds-network-test").external(true).networkType(NetworkType.LOCAL).build()); -assertNotNull(network); - -

[jclouds/jclouds] [JCLOUDS-1382] improve usage of Neutron capabilities from Nova (#1178)

2018-02-15 Thread Andrea Turli
://github.com/jclouds/jclouds/pull/1178 -- Commit Summary -- * [JCLOUDS-1382] improve usage of Neutron capabilities from Nova -- File Changes -- M apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2/NeutronApi.java (14) M apis/openstack-neutron/src/main/java/org/jclouds