Commit Graph

368 Commits

Author SHA1 Message Date
Nikolay Sokolov 5b4ac5f186 Added support for RunInstances parameter PrivateIpAddress on EC2 2015-02-16 22:14:48 +01:00
Ignasi Barrera acd06b3024 JCLOUDS-462: Fix AWSEC2TemplateBuilderLiveTest 2015-02-04 11:04:18 +01:00
Ignasi Barrera 9a8a604bac Added C4 instance types 2015-02-04 11:04:18 +01:00
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
Adrian Cole ba868af553 JCLOUDS-781 cluster regions is a subset of regions. 2014-11-20 07:54:26 -08:00
Andrea Turli 9128448de0 add support for recent centos and ubuntu versions 2014-11-19 17:31:42 +01:00
Adrian Cole 5dc6ddcb98 JCLOUDS-621 update live tests for new instance sizes. 2014-11-18 21:26: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 278a735272 JCLOUDS-778 Remove OS support tests from TemplateBuilderLiveTest, as people are ignoring failures, 2014-11-17 09:42:06 -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
Andrew Gaul 489850d7db Fix GuiceAssistedInjectScoping error-prone warning 2014-10-12 15:47:30 -07:00
Adrian Cole 99e217b720 Move off confusing test names. 2014-10-05 17:22:18 -07:00
Andrew Gaul 808bef3339 Add missing ec2 mock expectations
Regression from 8f8b6dd.
2014-09-02 17:56:53 -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
Roman C. Coedo 3932e8a3bd Default values for aws credential properties
Every project was using undefined properties in their pom.xml.
A default value for test.aws.identity and test.aws.credential was
added.
2014-07-02 15:33:10 -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 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 Gaul 2d88f5164e Enforce that all commas have trailing whitespace 2014-05-08 18:28:08 -07:00
Matheus Cunha fbb1ffa81d JCLOUDS-503 - Missing c3.large from AWSEC2HardwareSupplier 2014-04-04 11:01:12 +02:00
Andrew Bayer a0ad055e63 JCLOUDS-470. Include region in group name for AWSEC2SecurityGroupExtension. 2014-02-14 12:09:41 -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 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 c1ee11d9bd Updating to 1.8.0-SNAPSHOT 2013-12-17 11:31:56 -08:00
Andrew Gaul 0398276be3 Remove redundant imports
Also enforce no new ones via Checkstyle
2013-12-12 18:23:43 -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 23e43b2c8d JCLOUDS-381. Allow explicit naming of nodes via TemplateOptions. 2013-11-21 10:15:25 -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 Phillips e2f67a7567 Removing debugging System.err calls mistakenly included in ecc918b4 2013-11-01 16:33:36 -04: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 Bayer f7dd08a2a5 JCLOUDS-242. Fix security group creation on aws-ec2
Contributed by Richard Downer.
2013-08-14 11:07:59 -07:00
Andrew Bayer 82fe701c77 JCLOUDS-221. Add availabilityZone to spot price history. 2013-08-01 17:56:16 -07:00