Commit Graph

448 Commits

Author SHA1 Message Date
Aled Sage bdfd1facb9 JCLOUDS-529: fix aws-ec2 cleanupIncidentalResources
- Some users get a DependencyVioloation, rather than InvalidGroup.InUse,
  when attempting to delete the security group. This caused
  cleanupIncidentalResources to propagate an exception.
- Fixes it by converting this to an IllegalStateException (in same
  way as is done for “InUse”)
- Adds tests (using MockWebServer) for happy-path and for failing
  to delete the security group with each of InUse and DependencyViolation
  responses.
- Adds Timeouts.cleanupIncidentalResources
- Use that timeout in EC2, when retrying the deletion of security group
  on VM deletion (previously hard-coded as 3 seconds).
- Configure that timeout in the tests, so deterministic number of retries
2015-01-30 11:07:25 +01:00
Jeremy Daggett d3c1e2eab4 Use AutoService to generate service loader metadata 2015-01-09 11:22:12 -08:00
Ignasi Barrera 902f1b4105 JCLOUDS-744: Upgrade to OkHttp 2.1.0 and use its native API 2014-11-27 18:44:08 +01:00
Adrian Cole a449b24e7d JCLOUDS-480 support version 4 signatures for aws-ec2. 2014-11-22 08:08:37 -08:00
Reynald Borer 60ba755219 JCLOUDS-621 add missing R3, t2.micro, t2.small and t2.medium instance types to EC2 2014-11-18 09:02:00 -08:00
Adrian Cole 054189d009 JCLOUDS-774 ec2 api was ignoring the jclouds.region property, which made exceptions possible on all zone-scoped api calls. 2014-11-16 19:06:42 -08:00
Adrian Cole 6040f749bd Revert 428b2bd2ea as this hides inconsistency between regions and zones. 2014-11-16 13:39:02 -08:00
Adrian Cole 3980cd791b Revert "JCLOUDS-653: Address Guava 18 deprecations"
This reverts commit 95cfc0d950.

Many conflicts due to duration between above commit and now
2014-10-24 10:45:58 -07:00
Adrian Cole d735a9fa21 JCLOUDS-40 clear remaining references to Async. 2014-10-12 09:05:35 -07:00
Ignasi Barrera e5fb0b607d Allow to configure CIDR exclusion blocks 2014-10-11 14:04:00 +02:00
Adrian Cole b9525a0877 JCLOUDS-40 unasync Fallback 2014-10-06 13:14:59 -07:00
Adrian Cole 99e217b720 Move off confusing test names. 2014-10-05 17:22:18 -07:00
Jeremy Daggett d2f181bc55 Remove unnecessary blobstore references 2014-09-16 12:50:25 -07:00
Andrew Gaul 8f8b6dd7ce Further FindBugs fixes 2014-09-02 15:24:33 -07:00
Andrew Gaul 34cfdbe266 Enforce Override annotation via Checkstyle
Also remove bogus inheritDoc on base and static methods.
2014-08-31 19:37:50 -07:00
Andrew Gaul 480f0e883d Prevent instantiation of utility classes
Also prevent extension.
2014-08-26 12:23:36 -07:00
Andrew Gaul 74fb8f0183 Add whitespace after semicolons
Also correct some bad line-wrapping.
2014-08-26 11:06:00 -07:00
Jeremy Daggett e711275fb1 Prefer isEmpty() for collections rather than size() 2014-08-20 11:07:48 -07:00
Andrew Gaul 95cfc0d950 JCLOUDS-653: Address Guava 18 deprecations
Mostly renaming Objects.toStringHelper to MoreObjects.toStringHelper.
2014-08-08 11:12:21 -07:00
Andrew Gaul 59462747e7 Reset StringBuilder instead of creating new ones
This avoids unneeded garbage, especially during XML parsing.  Replaced
with:

find -name \*.java | xargs sed -i 's/^\( *[^ ]*\) = new StringBuilder();$/\1.setLength(0);/'
2014-08-06 11:22:49 -07:00
Andrew Phillips e3d9851216 Up to 2.0.0-SNAPSHOT after the 1.8.0 release 2014-08-05 09:10:24 +02:00
Aled Sage 1fb286809e JCLOUDS-549: Fix NPE in LoginCredentials.toString
- also deprecates LoginCredentails.get(Password|PrivateKey)
- use getOptionalPassword and getOptionalPrivateKey instead
2014-07-18 14:09:18 +01:00
Andrew Gaul 7f8e6a03d7 Address Checkstyle violations 2014-07-01 09:33:46 -07:00
Andrew Bayer 5641f675da JCLOUDS-602. Added live tests for new EBS volume fields.
While they're implemented in apis/ec2, the tests are in
providers/aws-ec2, generally, to make sure ec2-alike clones won't barf
on them. We're exercising creation of volumes, images and instances
with the new options. I also had to do some sketchy wait-and-loop'ing
in AMIAPILiveTest.testCreateAndListEBSBackedImage() due to what seems
to be a delay on new AMIs showing up in filtered DescribeImages calls,
though they'll show up instantly when you specify the image ID. Go figure.
2014-06-20 12:27:17 -07:00
Andrew Bayer 6451098f72 JCLOUDS-602 - Add support for volumeType, iops and encrypted to EBS.
Adds CreateVolumeOptions for volume creation, adds support for the
above EBS configs in Image, Volume, BlockDeviceMapping, etc.
2014-06-20 12:27:17 -07:00
Ignasi Barrera b0250cfb4f JCLOUDS-588: Register discovered images in the image cache
Images were cached in memory using a memoized supplier. To allow growing
this cache with the discovered images, the ImageCacheSupplier class has
been created. It provides an in-memory cache with all discovered images
and acts as a view over the image cache that also provides access to
them.

The in-memory cache for the discovered images expires with the session,
just as the image cache does.

The default memoized image supplier has been changed to the
ImageCacheSupplier, to make sure all providers get injected the right
instance, and the old supplier has been qualified with the 'imageCache'
name, in case a provider needs the basic image cache.
2014-06-20 12:35:18 +02:00
Andrew Gaul 9cdd53b0b7 JCLOUDS-546: Remove Javadoc @author annotations
Annotations removed with:

find -name \*.java | xargs sed -i /@author/d

Empty Javadoc removed with multiple iterations of:

find -name \*.java | xargs sed -i -z 's/ \*\n \*\// \*\//'
find -name \*.java | xargs sed -i -z 's/ \* \n \*\// \*\//'
find -name \*.java | xargs sed -i -z 's/\/\*\*\n \*\/\n//'
2014-06-07 21:44:54 -07:00
Ignasi Barrera 39f77ad3f8 JCLOUDS-570: Fallback to the GetImageStrategy
If the TemplateBuilderImpl is given an imageId but the image can not be
found in the image cache, fallback to the GetImageStrategy to perform a
call to the provider to try to get it.

We've seen that in some cases images are not returned in the image list
but they actually exist in the provider. This fix won't make them
available when filtering by other properties such as the operating system,
etc, but at least will make them available if their id is known.
2014-06-06 12:40:27 +02:00
Andrew Phillips 5239e0fea1 Updating EC2 test mocks to match changes in 79c289d 2014-05-18 14:18:35 -04:00
Andrew Gaul 79c289da9d Replace deprecated calls to LoadingCache.apply 2014-05-17 17:39:42 -07:00
Andrew Gaul 70cf3e1f7c Make constants final classes instead of interfaces
This commit prohibits implementation of the empty interface and
instantiation of the class.  Refer to _Effective Java_ item 19 for
more background.
2014-05-16 09:45:52 -07:00
Andrew Bayer d15144cf45 JCLOUDS-564. Add ephemeral disks for m3.xlarge and m3.2xlarge sizes 2014-05-12 09:20:01 -07:00
Andrew Gaul 67c2b5f6b9 Enable whitespace around Checkstyle rule 2014-05-08 18:31:47 -07:00
Andrew Gaul 2d88f5164e Enforce that all commas have trailing whitespace 2014-05-08 18:28:08 -07:00
Andrew Gaul 076e31b076 Address Checkstyle violations 2014-02-18 22:33:56 -08:00
Andrew Bayer a656c7292f JCLOUDS-467. Properly iterate over node names for EC2 instance creation. 2014-02-14 14:54:09 -08:00
Andrew Bayer e1c8c88cf5 JCLOUDS-450. Adding support for EC2 MaxCount option.
Note - no live test for this, because it's very hard to guarantee a
situation where it would be relevant.
2014-02-07 15:03:43 -08:00
Ignasi Barrera 0625c087fa JCLOUDS-431: Added m3.medium and m3.large instance types to EC2 2014-01-24 16:32:08 +01:00
Andrew Gaul 9416416ff4 Address Checkstyle violations 2014-01-19 20:51:51 -08:00
Andrew Bayer 35ecf794cf Cleaning up nodeNames/networks copy-paste mixup in EC2TemplateOptions as well 2014-01-08 15:44:15 -08:00
Andrew Bayer e2cd6d8322 JCLOUDS-416. Add TemplateOptions#networks.
- Adds networks field/methods to TemplateOptions.
- Adds them to children as well for legacy reasons.
- Deprecates CloudStackTemplateOptions#networkIds methods in favor of #networks.
- TODO: Modify compute abstraction layer for provisioning for nova,
    EC2, et al to take advantage of this.
2014-01-07 16:15:48 -08:00
Andrew Bayer fcca1fd525 JCLOUDS-412. Add the new i2.* instance sizes 2013-12-20 10:05:33 -05:00
Andrew Bayer c1ee11d9bd Updating to 1.8.0-SNAPSHOT 2013-12-17 11:31:56 -08:00
Andrew Gaul 828d8790c2 Enforce no unused imports via Checkstyle
Removed with:

mvn checkstyle:checkstyle --quiet -Dcheckstyle.output.file=/dev/stdout -Dcheckstyle.output.format=plain | tac | while read i; do echo $i | sed -n 's/\([^:]*\):\([^:]*\):.*/sed -i \2d \1/p' | bash; done
2013-12-11 17:27:43 -08:00
Andrew Gaul 4cef85d1cd Address Checkstyle violations in tests 2013-12-09 14:40:07 -08:00
Andrew Bayer b351406fc9 JCLOUDS-394. Add note to ec2 README in re: live tests and new accounts 2013-12-08 18:45:16 -08:00
Andrew Gaul cb98a47173 Correct jcloud -> jclouds typos
Corrected with:

find -name pom.xml | xargs sed -i 's/jcloud\>/jclouds/'
2013-12-01 11:21:26 -08:00
Andrew Bayer 23e43b2c8d JCLOUDS-381. Allow explicit naming of nodes via TemplateOptions. 2013-11-21 10:15:25 -08:00
Alex Heneveld 3ecbf90847 remove addl whitespace pointed out in JCLOUDS-331 2013-11-19 17:37:02 -05:00
Alex Heneveld 9a7336bb0e applies tidies for imageChooser (JCLOUDS-331) as suggested in pull #202 2013-11-18 10:31:34 -05:00
Andrew Bayer 0d3f6441c7 JCLOUDS-383. Adding c3 instance sizes. 2013-11-15 12:59:54 -08:00
Andrew Bayer 2077da2879 JCLOUDS-361. Add support for filtering Describe* methods in EC2 2013-11-14 11:53:31 -08:00
jolly 6e7c2c7e88 add g2.2xlarge EC2 instance size (JCLOUDS-364) 2013-11-06 12:24:06 -08:00
Andrew Gaul 6c5effcdb1 Address error-prone empty statement warnings 2013-11-05 16:22:44 -08:00
Andrew Gaul 17ce72794c Enable RedundantModifier for Checkstyle 2013-10-31 10:23:30 -07:00
Alex Heneveld 8207c53cf2 JCLOUDS-331 - support specifying an imageChooser function in TemplateBuilder 2013-10-04 18:38:53 +02:00
Andrew Gaul f1fc63ab76 Add whitespace around keywords and braces 2013-09-30 09:39:29 -07:00
Andrew Bayer 0aa19a0cee Fix aws-ec2 live tests
Involves some non-trivial reworking of EC2 security group
translation/binding, but it was necessary.

Still problems with a number of tests:
- org.jclouds.aws.ec2.compute.AWSEC2TemplateBuilderLiveTest#testTemplateBuilderWithLessRegions
- org.jclouds.ec2.compute.EC2TemplateBuilderLiveTest#testTemplateBuilderCanUseImageIdWithoutFetchingAllImages

Those seem to be failing because there's caching going on that they're
not expecting, but I could be wrong.

Also failing:
- org.jclouds.aws.ec2.features.PlacementGroupApiLiveTest in general
- org.jclouds.aws.ec2.features.SpotInstanceApiLiveTest - a couple tests
2013-09-30 09:33:57 -07:00
Andrew Bayer 962f98969f Fix EC2 live tests
This removes
org.jclouds.ec2.compute.functions.PasswordCredentialsFromWindowsInstanceLiveTest
due to there not being an easily detectable valid AMI for it to run,
and low interest in actually running it in the first place.
2013-09-30 09:33:56 -07:00
Andrew Bayer 7290cc8ea6 JCLOUDS-303. unhook ApiMetadata type hierarchy from ec2 2013-09-27 15:58:25 -07:00
Andrew Bayer eabdfe2d92 JCLOUDS-242. Fixing AWSEC2SecurityGroupExtension based on JCLOUDS-242 fix. 2013-08-18 13:53:15 -04:00
Andrew Gaul 60e9062894 Checkstyle fixes 2013-07-09 14:09:44 -07:00
Ignasi Barrera bbfec4a990 JCLOUDS-160: Support tags in EC2 images
Based on the work made by Brock Noland
2013-07-06 10:08:10 +02:00
Andrew Bayer 5f3b8d3fa7 JCLOUDS-150 - Removal of async from AWS - specifically EC2
...and EC2-related elsewhere. Also moved *Client -> *Api, and moved
everything from .../services to .../features, and threw in a bunch of
Optionals to fit the EC2Api approach.

And a very big tip of the hat to nacx for figuring out the generics
stuff my brain just could not handle. =)
2013-07-01 12:12:26 -07:00
Andrew Bayer 5f524ee6c9 JCLOUDS-101 - Add SecurityGroupExtension for compute
- Adds the SecurityGroupExtension to compute, with tests and stub
support.
- Gets everything else to actually build against this.
- Unifies on compute's IpPermission/IpProtocol, eliminating EC2's.
- Converters from EC2/Nova/CloudStack SecurityGroup (and rules, for
the latter two) to the compute SecurityGroup (and rules, etc).
- EC2SecurityGroupExtension and tests.
- AWSEC2SecurityGroupExtension and tests - depends on JCLOUDS-99.
2013-06-26 14:59:01 -07:00
Andrew Gaul 1a6be0eb67 Do not repeat array type in initializers 2013-06-18 21:02:50 -07:00
Andrew Phillips f8fae7d557 JCLOUDS-123: Using Clojure core incubator-specific nilsafe in AMI service binding
Submitted by Trevor Wennblom
2013-06-12 09:23:01 +01:00
adriancole ed2f18a1af JCLOUDS-31. updated to ASF headers via mvn com.mycila.maven-license-plugin:maven-license-plugin:format 2013-05-16 21:30:37 -07:00
adriancole fa10fc4838 JCLOUDS-31. remove malformed, duplicate, or unnecessary headers 2013-05-16 21:30:32 -07:00
Andrew Bayer 7923009eb5 JCLOUDS-37. Fix RAT violations in incubator-jclouds, master branch 2013-05-13 19:17:50 -07:00
Andrew Bayer 446ac67884 JCLOUDS-30. Switch to 2 space indents for POM files. 2013-05-13 12:04:43 -07:00
Andrew Bayer 259b04ff1c JCLOUDS-16. Switch groupId to org.apache.jclouds, change parent POM, remove old distributionManagement content, add ASF repos. 2013-05-13 12:04:42 -07:00
Andrew Gaul fff2fa6e05 Address Checkstyle violations
This commit requires temporarily disabling some checks.
2013-04-17 16:21:21 -07:00
adriancole 053197fe61 deprecated all top-level Async apis and clients 2013-04-09 10:18:31 -07:00
adriancole 36dd831b84 moved all code off use of RestContext except CloudStackContext, which will use it until 1.7 2013-04-09 09:23:31 -07:00
Adrian Cole 33745cdeb1 Merge pull request #1502 from abayer/listnodesdetails-work
Adding listNodesByIds across the board.
2013-04-08 20:00:18 -07:00
Andrew Bayer c566418d87 Adding listNodesByIds across the board.
Adding to both ListNodesStrategy and ComputeServiceAdapter. When
possible, does a query explicitly for the specified IDs. When not,
falls back on either listDetailsOnNodesMatching (for ListNodesStrategy
implementations and in BaseComputeService) or filters listNodes output
itself (in ComputeServiceAdapter).
2013-04-08 17:21:01 -07:00
adriancole 88871c9fe9 issue #1501: add Closeable annotation to all top-level apis 2013-04-08 16:13:09 -07:00
Andrew Gaul 371db8d18f Address Xlint warnings 2013-03-13 22:23:19 -07:00
Adrian Cole fb69ae0fa9 bump master to 1.7.0-SNAPSHOT 2013-03-08 23:02:40 -08:00
adriancole c31145e42e [maven-release-plugin] prepare for next development iteration 2013-03-04 06:13:59 -08:00
adriancole 0eb3ee8091 [maven-release-plugin] prepare release jclouds-1.6.0-alpha.4 2013-03-04 06:13:57 -08:00
Adrian Cole ac7a4b5354 unhooked version dependency from ec2 async tests 2013-02-25 17:04:32 -08:00
Adrian Cole 6dc03a7993 fixed NPE on ec2 log statement 2013-02-25 15:40:16 -08:00
Adrian Cole 7e270c5ddb various cleanups to get ec2 subnet api up to latest 2013-02-24 14:40:31 -08:00
Andrew Bayer 707a77fedb EC2 Subnet added, with DescribeSubnets support initially. 2013-02-23 17:31:15 -08:00
Adrian Cole 544f06d37c Merge pull request #1347 from maginatics/findbugs
Address FindBugs errors
2013-02-23 10:20:00 -08:00
Andrew Gaul 1f995879d6 Address FindBugs errors 2013-02-22 20:59:29 -08:00
Andrew Bayer 3fb9ebe054 anyResourceId was actually filtering on any resource type instead 2013-02-22 16:04:46 -08:00
adriancole 89fda8ee28 [maven-release-plugin] prepare for next development iteration 2013-02-04 17:30:46 -08:00
adriancole 2b0ad28f26 [maven-release-plugin] prepare release jclouds-1.6.0-alpha.2 2013-02-04 17:30:44 -08:00
adriancole 267069755e [maven-release-plugin] prepare for next development iteration 2013-02-02 08:41:53 -08:00
adriancole 7c924b312f [maven-release-plugin] prepare release jclouds-1.6.0-alpha.1 2013-02-02 08:41:51 -08:00
Adrian Cole 5aa41d07aa Merge pull request #1261 from jclouds/aws-action-names
changed aws apis to use Action key for config instead of more verbose iam names
2013-01-29 05:53:06 -08:00
adriancole b3c3cb0a88 issue #1184 changed aws apis to use Action key for config instead of more verbose iam names 2013-01-29 04:45:42 -08:00
adriancole a51e6a8323 issue #1089 removed default timeout values so that those not using async will have simpler debugging 2013-01-29 04:19:00 -08:00
adriancole 40d9f8bfe7 changes that facilitate synchronous fallbacks and http invocation 2013-01-29 04:09:45 -08:00
adriancole 085a1ef2b8 merged STS and aws-common, so that all aws apis can test support of temporary credentials 2013-01-22 12:27:44 -08:00
Andrew Gaul af963df92d Use Map.entrySet where possible
Improves run-time efficiency and addresses FindBugs warnings.
2013-01-21 23:59:42 -08:00
Adrian Cole 37e587ee51 changes related to centralizing construction of invokables 2013-01-19 17:17:30 -08:00