Commit Graph

1570 Commits

Author SHA1 Message Date
Ignasi Barrera 2220996605 JCLOUDS-1362: Better password generation utility 2018-01-08 08:42:12 +01:00
Ignasi Barrera 4327e658ba Next development version 2.0.4-SNAPSHOT 2017-11-25 22:33:58 +01:00
Ignasi Barrera 0f889d8159 Apache jclouds 2.0.3-rc1 release 2017-11-25 22:28:20 +01:00
William L. Thomson Jr 78881d2f53 core/src/main/java/org/jclouds/rest/internal/TransformerForRequest.java:
Fix for Java 1.8 and Guice 4.1. Not sure if this is correct, but does
compile. Committing to see if it passes tests to confirm fix or not.

Modified per @nacx on jclouds PR1036
https://github.com/jclouds/jclouds/pull/1036#issuecomment-319904820
2017-08-03 19:22:50 +02:00
Ignasi Barrera 3b5fe0b02f Next development version 2.0.3-SNAPSHOT 2017-06-29 12:24:45 +02:00
Ignasi Barrera 574c7fc3c1 Apache jclouds 2.0.2-rc1 release 2017-06-29 12:21:59 +02:00
Ignasi Barrera db4f191b5f
JCLOUDS-1295: Support deprecated date formats in the Expires header 2017-05-29 17:04:13 +03:00
Geoff Macartney 81f8818e32 Temporarily use a custom annotation instead of @SinceApiVersion.
The intention is to use @SinceApiVersion for this purpose, but that
would affect a number of APIs, and we would want to have good test
coverage before merging that change (in
FormSignerUtils#getAnnotatedApiVersion). However, there is some issue
wth certain tests at resent that means we cannot successfully test
all APIs that make use of @SinceApiVersion in order to assure
ourselves that FormSignerUtils will not introduce some problem.

See https://github.com/jclouds/jclouds/pull/1102#issuecomment-302682049
for details.

This annotation is introduced as a temporary measure in order to
decouple the functionality of FormSignerUtils#getAnnotatedApiVersion
from @SinceApiVersion and the tests in question. It can be removed and
replaced by @SinceApiVersion when those tests are fixed.

Designates that a method overrides the {@link ApiVersion} on the class
with a specific value.
2017-05-29 10:32:51 +02:00
Ignasi Barrera 05f64b20a8 Fix default executor rejection policies 2017-04-24 08:16:45 +02:00
Andrea Turli 43c0b3472a Revert "[JCLOUDS-1233] bump jax-rs version"
This reverts commit 40d18f2006.
2017-03-06 17:35:15 +01:00
Andrea Turli 40d18f2006 [JCLOUDS-1233] bump jax-rs version 2017-03-06 17:20:06 +01:00
Ignasi Barrera cbc750cb8b Next development version 2.0.2-SNAPSHOT 2017-02-22 10:32:50 +01:00
Ignasi Barrera bafa52be97 Apache jclouds 2.0.1-rc2 release 2017-02-22 10:28:10 +01:00
Geoff Macartney c4245acd35 Fix O(n^2) response time for "list-security-groups" on openstack-nova.
For https://issues.apache.org/jira/browse/JCLOUDS-1235.

This change takes the approach of storing the information about the
overall list of groups within the `SecurityGroupInRegion` when it is
created, so that any subsequent conversion operation has access to all
the groups in the same region as the one to be converted.

It also collapses the functionality of `NovaSecurityGroupToSecurityGroup`,
`SecurityGroupRuleToIpPermission` and `FindSecurityGroupWithNameAndReturnTrue`
all into `NovaSecurityGroupInRegionToSecurityGroup`, and deletes the
now unused-classes SecurityGroupRuleToIpPermission,
NovaSecurityGroupToSecurityGroup and associated tests.
2017-02-13 12:34:12 +01:00
Andrew Gaul a5dd78b0cc Correct regex in ExpandProperties
Previously Android choked on this incomplete regex.
2017-01-25 00:22:28 -08:00
Zack Shoylev 5dd1032b25 Allow ipv6 address blocks 2017-01-10 14:35:43 -06:00
Vijay Panghal 79ad45d6b9 Make user agent header configurable
Jclouds sends default user agent string with each request to cloud
services. But some of the application would like to overide this and
send custom user agent instead.

This commit define a string property to overide this default user agent
string. This property will be applied to all outgoing http request to
cloud services

JCLOUDS-819
2016-12-20 11:12:53 +01:00
Ignasi Barrera 970f521bcd Next development version 2.0.1-SNAPSHOT 2016-11-15 01:17:08 +01:00
Ignasi Barrera 6a3a37f4e0 Apache jclouds 2.0.0-rc3 release 2016-11-09 22:30:45 +01:00
Ignasi Barrera 0b48d4a25a Make code compatible with newer OSGi framework versions 2016-11-03 09:43:36 +01:00
Ignasi Barrera cfe22389a8 Resource management moved to the caller 2016-10-25 15:19:20 +02:00
Ignasi Barrera a43acaffce JCLOUDS-1187: Do not load Json payloads to memory when serializing objects 2016-10-25 15:19:20 +02:00
Andrew Gaul 3c9f66b8e9 Avoid lower-case l literal suffix
Readers can confuse this with 1.  Found via error-prone.  Fixed via:

find -name \*.java | xargs sed -i 's/\( [0-9][0-9]*\)l/\1L/g'
find -name \*.java | xargs sed -i 's/\(([0-9][0-9]*\)l/\1L/g'
2016-10-23 14:24:35 -07:00
Andrew Gaul 8117574c83 Avoid C-style array declarations
Found via error-prone.
2016-10-23 13:51:59 -07:00
Ignasi Barrera 8030e53f32 Move digital ocean rate limit handler to core to make it reusable 2016-10-19 16:56:51 +02:00
Zack Shoylev 00f7ee0738 jclouds was not properly retrying on an expect: 100-continue PUT request that requires re-athentication because of java protocol code
JCLOUDS-1179 This fix also addresses the same problem with other providers

No currently working tests because of https://github.com/square/okhttp/issues/675

This is a common problem in other tools as well https://curl.haxx.se/mail/lib-2004-08/0002.html
2016-10-13 12:17:19 -05:00
Andrew Gaul 7cde28a4d2 JCLOUDS-1074: Guava 20 compatibility
* dynamically call TypeToken.isSupertypeOf with Guava 19 and later and
  TypeToken.isAssignableFrom with Guava 18 and earlier
* consume or ignore values from methods with CheckReturnValue
* replace usage of removed Iterators.emptyIterator
2016-09-06 21:49:20 -07:00
Duncan Grant 7aad599721 Fix autovalue class loading in karaf
When Class.forName is called for a class in a different bundle it will
fail as the default karaf class loader won't load classes from other
bundles.

I have fixed this by using the classloader of the original
(non-autovalue) type and assuming it will be in the same bundle as the
autovalue type (I think this is a reasonable assumtion).

So far the only place where I've actually seen this being an issue is
when using the jclouds-labs-google provider within karaf. It fails
when serialising the Firewall.Rule class within a FirewallOptions
object.
2016-09-05 14:11:59 +02:00
Ignasi Barrera 4c92763663 Upgrade to Gson 2.5 instead of Gson 2.7
Related issues: JCLOUDS-1166, JCLOUDS-1160, JCLOUDS-1169

This change reverts commit da4614e and upgrades from Gson 2.3.1 to 2.5,
which is the last version that exports the internal packages, used in
jclouds-core, in the OSGi bundle.
2016-09-02 08:33:21 +02:00
Andrew Gaul da4614e72c JCLOUDS-1160: Upgrade to Gson 2.7
Changelog:

https://github.com/google/gson/blob/master/CHANGELOG.md
2016-08-29 19:54:44 -07:00
Iván Lomba 79e95c5a4c JCLOUDS-482: Add support for arbitrary CPU and RAM
This is a combination of 16 commits:

* First approach to ArbitraryCpuRamTemplateBuilderImpl
* Several fixes: refactoring some names, format, identation problems, some missing license headers and generateId method
* Refactored parse utility
* Added GoogleComputeEngineArbitraryCpuRamTemplateBuilderImpl to support GCE custom machine URI
* extracted hardware creation to automaticHardwareForCpuAndRam method
* Fixed ide automatic asterisk imports
* correcting WIP base case PR according to comments
* added machineTypeUriToHardware to set custom hardware in nodes
* fix checkstyle violations and other PR comments
* Set the providerId to custom machineType URI and fix adding node log
* Arbitrary hardware tests added to BaseTemplateBuilderLiveTest and GoogleComputeEngineTemplateBuilderLiveTest
* Added two more tests to BaseTemplateBuilderLiveTest
* Move repeated constants to TestUtils to reuse code
* Fix full path in the Hardware id and URI
* Add custom hardware tests to BaseComputeServiceLiveTest and GCEServiceLiveTest
* Change customHardware test to use buildTemplate and fix identation
2016-08-16 02:44:04 +02:00
Ignasi Barrera 040df11d3f JCLOUDS-1116: Delegate endpoint should be preferred to the caller's one 2016-06-21 09:40:53 +02:00
Andrew Gaul 1d192dfe56 Remove scoping annotations on abstract types
These annotations are not meaningful.  Found via error-prone.
2016-06-20 10:54:52 -07:00
Andrew Gaul d6454b822f Disentangle Iterable and Iterator
Found via error-prone.
2016-06-20 10:21:01 -07:00
Andrew Gaul 5fec2346a6 JCLOUDS-1028: Configure idempotent methods
Enable POST for Atmos, S3, and Swift.
2016-06-15 16:35:22 -07:00
Andrew Gaul 28ed955183 Address error-prone ClassNewInstance errors
Previous behavior deprecated in Java 9.
2016-06-03 03:34:06 -07:00
Andrew Gaul a67ae3f27b Make inner classes static where possible
Found via error-prone.
2016-06-01 20:03:54 -07:00
Ignasi Barrera 613290ea8d Allow to link contexts and views together
Some providers need other APIs or portable services to perform certain
operations. This change allows to pass existing Context and View
instances when creating a context, so they are added to the injector of
the context being built. This allows to inject external apis and
providers into an existing provider to leverage the external
functionality.
2016-05-25 21:14:26 +02:00
Andrew Gaul b7ed4f34ab Replace identity in RestAnnotationProcessor
References jclouds/jclouds-labs#270.
2016-05-23 14:21:42 -07:00
Andrew Gaul 981b882f59 Handle nested braces in UriTemplates.expand
This allows replacement of JSON-like payloads without using hacks like
percent-encoding braces.
2016-05-20 09:26:45 -07:00
Andrew Gaul cdbf856900 Address error-prone AssertFalse warnings 2016-04-27 18:54:09 -07:00
Andrew Gaul 66cda12b50 Avoid eager evaluation of Preconditions messages
Found via error-prone.
2016-04-24 23:28:55 -07:00
Ignasi Barrera e5f65a4791 Revert "Add FalseOnNotFoundOr204 Fallback"
This fallback was added by mistake and because of my bad advice
on a code review. Fallbacks only apply for failed responses which
status code is >= 300, so a fallback for a 204 would never
be triggered.

This reverts commit e65950b858.
2016-04-19 16:36:30 +02:00
Andrew Gaul 3cf4e3d79c JCLOUDS-1101: Correct generics wildcard errors
Always incorrect but previously broken on Java 9.  Reference:

https://bugs.openjdk.java.net/browse/JDK-8075793
2016-04-18 09:49:58 -07:00
Rita Zhang e65950b858 Add FalseOnNotFoundOr204 Fallback 2016-04-15 23:51:55 +02:00
Alex Heneveld 4ecb078092 JCLOUDS-1075: Clean up logic and docs for setting proxies 2016-02-08 19:12:04 -05:00
Andrew Gaul eb6f16e2f9 Enable CollectionIncompatibleType
Also suppress two false positives.
2016-01-29 08:50:09 -08:00
Andrew Gaul bcc06cc6ec Emit sensitive property name instead of constant
This makes more sense to users of external utilities like jclouds-cli.
2016-01-28 22:58:15 -08:00
Andrew Gaul 3872b57483 Remove userMetadata from equals and hashCode
This caused test failures, regression from
a3376d4efe.
2016-01-26 14:08:39 -08:00
Andrew Gaul a3376d4efe Consistently implement domain object methods
Including equals, hashCode, and toString.
2016-01-24 21:58:39 -08:00