Commit Graph

1138 Commits

Author SHA1 Message Date
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 fb60d76704 JCLOUDS-622: Remove most vestiges of InputSupplier
Guava 16 deprecated InputSupplier and a future release will remove it.
2014-07-16 16:07:59 -07:00
Andrea Turli 717a545baa [JCLOUDS-474] refactor SoftLayer support 2014-07-16 11:05:48 +02:00
Jeremy Daggett 801aecafea JCLOUDS-40: Unasync OpenStack Nova API 2014-07-15 14:29:09 -07:00
Andrew Gaul a8b106c2bb JCLOUDS-622: remove calls to InputSupplier methods
Guava 16 deprecated these methods and Guava 18 will remove them.
2014-07-15 03:09:58 -07:00
Andrew Gaul bdb5cbcbe7 Improve use of ByteSource with test resources
This commit ensures proper resource cleanup, simplifies
initialization, and paves the way for purely synthetic inputs in a
subsequent commit.
2014-07-11 09:10:51 -07:00
Andrew Gaul 05c37c2c77 Consistently use Square's mockwebserver
Google mockwebserver merged into OkHttp as per:

https://code.google.com/p/mockwebserver/
2014-07-03 14:39:07 -04:00
Andrew Gaul 71043ac9a2 Provide descriptive bogus values for properties 2014-07-02 22:42:00 -07: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
Chris Custine ba894fe07b JCLOUDS-585: Add HP Cloud Block Storage Provider (OpenStack Cinder) 2014-07-01 12:43:30 -07:00
Andrew Gaul 8fa209b15e Use more specific testng asserts where possible
These asserts yield more informative error messages.  Found with:

grep -rI 'assertTrue(.* =='
grep -rI 'assertTrue(.* !='
grep -rI 'assertTrue(.*\.equals('
2014-06-24 13:54:01 -07:00
Chris Custine 309c053c77 JCLOUDS-584: HP Cloud Object Storage Fixes for 13.5 2014-06-24 12:01:51 -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 e799a7409c JCLOUDS-597: HashCode methods for Content-MD5
This works more naturally with Guava Hashing methods and immutability
provides better safety guarantees.  Also deprecate existing byte[]
methods.
2014-06-12 15:29:17 -07:00
Chris Custine c857ccc479 JCLOUDS-583: Updates HP Cloud compute provider to work with 13.5 release 2014-06-10 09:41:46 +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
Andrew Gaul b9b6f39d42 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:09:23 -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
Ignasi Barrera a7e342422c JCLOUDS-517: New ElasticHosts images and regions
Added the new ElasticHosts regions.

Updated the ElasticStack api to get the list of standard
drives using an API call. All providers except ServerLove
support the new API call, so the old logic in the ElasticStack
api has been moved to that provider. The rest of providers will now
extract all the OperatingSystem information by parsing the name of the
StandardDrive.

A unit test has been added to the ElasticStack api with all the images
that were hardcoded, to make sure all names are still parsed as expected
and all information in the existing providers is kept.

Modified the default template for all ElasticHosts providers to
match newer Ubuntu images and updated the Template*Live tests
accordingly.

Also refactored the WellKnownImage map to a supplier to lazy load it
when needed and avoid unexpected errors when building the Guice injector
if there are authentication errors or similar.
2014-06-02 16:57:44 +02:00
Andrew Gaul 186f052022 Remove BlobBuilder and Payloads.calculateMD5
Callers should instead explicitly set contentMD5, usually with the
results from Guava Hashing.md5(). This narrows the API and removes a
strange IOException from callers.  Further it removes a dangerous
rebuffering of arbitrarily-large non-repeatable Payloads.
2014-05-28 12:54:18 -07:00
Andrew Gaul 26b53e52b7 Use ByteSource methods to create test input
Also avoids excessive system calls due to unbuffered writes.  Finally
migrate repeatingArrayByteSource to ByteSources.
2014-05-22 10:43:57 -07: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 Gaul 8d51ad6f87 Prefer Guava HttpHeaders over JAX-RS
jclouds code contains more instances of the former and Guava has
additional constants like CONTENT_MD5.
2014-05-15 01:55:51 -07:00
Jeremy Daggett 64ecd497c1 Updated ServiceType refs in Cloud Databases 2014-05-09 12:35:41 -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 a45124c51a JCLOUDS-505: Remove unused ObjectMD5
The only users of this seem to be
org.jclouds.atmos.blobstore.strategy.FindMD5InUserMetadata and
org.jclouds.azureblob.blobstore.strategy.FindMD5InBlobProperties which
are themselves unused.
2014-05-07 10:16:18 +02:00
Andrew Gaul 5fabd87685 Mark Swift blobstores as eventually consistent
This allows tests to retry correctly.  Most blobstores, including
Swift[1], offer eventual consistency, although Azure[2] and the
jclouds test blobstores offer strong consistency.

[1] https://lists.launchpad.net/openstack/msg06788.html
[2] http://blogs.msdn.com/b/windowsazure/archive/2011/11/21/windows-azure-storage-a-highly-available-cloud-storage-service-with-strong-consistency.aspx
2014-04-14 19:50:45 -07:00
Andrew Gaul 82e9e9e42f JCLOUDS-534: Upgrade to Guava 17.0-rc2
This commit accommodates changes to Predicates.and.toString and
PublicSuffixPatterns.EXACT.  Release notes:

https://code.google.com/p/guava-libraries/wiki/Release17
2014-04-14 18:38:15 -07:00
Andrew Gaul d0bd30cc15 Address several Guava InputSupplier deprecations
Many remain due to Payload implementing InputSupplier<InputStream>.  Guava 18
will remove InputSupplier.
2014-04-12 12:02:26 -07:00
Matheus Cunha fbb1ffa81d JCLOUDS-503 - Missing c3.large from AWSEC2HardwareSupplier 2014-04-04 11:01:12 +02:00
Bhathiya90 c308bb9bcb Supporting uppercase user names in Azure blob live tests 2014-04-02 01:43:55 +02:00
Andrew Gaul 266d7f847b Prefer ByteSource over deprecated InputSupplier 2014-02-18 22:35:10 -08: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 Gaul c7b0f66544 Replace calls to Closeables.closeQuietly
Guava 16 removes this API.  Replace with Closeables2.closeQuietly.
References JCLOUDS-413 and JCLOUDS-415.
2013-12-21 12:30:59 -08:00
Andrew Bayer bd36ccd551 Updating to 1.8.0-SNAPSHOT 2013-12-17 11:51:11 -08:00
Andrew Bayer c1ee11d9bd Updating to 1.8.0-SNAPSHOT 2013-12-17 11:31:56 -08:00
Andrew Bayer 805d45a7a9 Fixing rackspace-clouddatabases-{us,uk} openstack-trove dependency groupIds 2013-12-16 15:50:19 -08:00
Andrew Gaul ac1f05ffac Remove unneeded calls to ByteSources.asByteSource 2013-12-15 22:57:32 -08:00
Andrew Gaul 0398276be3 Remove redundant imports
Also enforce no new ones via Checkstyle
2013-12-12 18:23:43 -08:00
Zack Shoylev 6de84cb003 Moving trove to jclouds from jclouds-openstack-labs https://issues.apache.org/jira/browse/JCLOUDS-102 2013-12-12 17:13:38 -06:00
Andrew Gaul f4895cc0e2 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:59 -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 3321506c84 JCLOUDS-403. Add support for Swift object expiry 2013-12-11 14:20:32 -08:00
Andrew Gaul 4cef85d1cd Address Checkstyle violations in tests 2013-12-09 14:40:07 -08:00
Zack Shoylev 295c6e741e Fixes broken cloudservers live tests, updates versions for images 2013-12-02 11:47:43 -06: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
Andrew Bayer 2077da2879 JCLOUDS-361. Add support for filtering Describe* methods in EC2 2013-11-14 11:53:31 -08:00
Andrea Turli 55b21b6449 JCLOUDS-373: Change parent of SoftLayerOrderItemDuplicateException to HttpResponseException
- SoftLayerOrderItemDuplicateException extends HttpResponseException as it is a propagated exception by jclouds
2013-11-14 12:48:15 +01:00
Andrea Turli 4e75e0a1e1 JCLOUDS-373: Fix VirtualGuestToNodeMetadata when server returns SoftLayer_Exception_Order_Item_Duplicate
* Wrap getOrderTemplate in VirtualGuestToNodeMetadata.getImage with try/catch
* Address comments from @nacx and @demobox:
  - remove the fields of the custom SoftLayerOrderItemDuplicateException and propagate the HttpResponseException
  - use of order = null instead of return null
  - extend RuntimeException instead IllegalStateException in SoftLayerOrderItemDuplicateException

Conflicts solved:
	providers/softlayer/src/main/java/org/jclouds/softlayer/compute/functions/VirtualGuestToNodeMetadata.java
2013-11-13 14:20:40 +01:00
Andrew Phillips 2abc98ab6b Revert "JCLOUDS-375: Fix VirtualGuestToNodeMetadata when server returns SoftLayer_Exception_Order_Item_Duplicate" to correct JIRA issue number
This reverts commit 43f2f0ba3b.
2013-11-13 14:19:56 +01:00
Andrea Turli 43f2f0ba3b JCLOUDS-375: Fix VirtualGuestToNodeMetadata when server returns SoftLayer_Exception_Order_Item_Duplicate
* Wrap getOrderTemplate in VirtualGuestToNodeMetadata.getImage with try/catch
* Address comments from @nacx and @demobox:
  - remove the fields of the custom SoftLayerOrderItemDuplicateException and propagate the HttpResponseException
  - use of order = null instead of return null
  - extend RuntimeException instead IllegalStateException in SoftLayerOrderItemDuplicateException

Conflicts solved:
	providers/softlayer/src/main/java/org/jclouds/softlayer/compute/functions/VirtualGuestToNodeMetadata.java
2013-11-13 14:12:24 +01: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 17ce72794c Enable RedundantModifier for Checkstyle 2013-10-31 10:23:30 -07:00
Diwaker Gupta 13f38d628d Return false if container already exists in AWS-S3
AWS-S3 returns the incorrect creation status when a container already
exists in the us-standard (or default) region.  Fixes JCLOUDS-334.
2013-10-17 13:58:43 -07:00
Andrew Gaul e30f865215 Work around CloudFiles test failures
Java helpfully interprets Expect: 100-continue instead of returning
the response code.  This commit reverts
100afba1d8.
2013-10-17 13:08:02 -07:00
Everett Toews 747fde69e9 Support HKG region for Rackspace providers. 2013-10-10 20:58:33 -05:00
Andrew Bayer 46b8fd0eee Fix OpenStack Nova SecurityGroupExtension based on live tests
So there were a few problems, but the core ugly one is that what you
pass in for creating a rule allowing groups' access is not the same
thing you get back from a group with such a rule, which makes mapping
between the arguments and the output insanely painful. So now, well,
we do some insanely painful stuff.
2013-10-07 17:50:53 -07:00
Adrian Cole 6eda031e27 JCLOUDS-311. work around mixed versions in hpcloud-objectstorage regions 2013-09-30 15:33:23 -07: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
Adrian Cole ddfefd7ec7 JCLOUDS-304. Remove broken terremark providers 2013-09-30 09:00:24 -07:00
Andrew Gaul 06b8cd7ac5 JCLOUDS-305. Disable S3 virtual host buckets for generic S3
Not all S3-compatible providers support virtual host buckets and thus
we should disable this feature by default.  Continue to enable virtual
host buckets for AWS-S3 which supports this although this feature
suffers from DNS settling issues.  Ran ran integration tests against
AWS-S3 and Scality using its S3 API.
2013-09-27 16:22:42 -07:00
Andrew Bayer 7290cc8ea6 JCLOUDS-303. unhook ApiMetadata type hierarchy from ec2 2013-09-27 15:58:25 -07:00
Andrew Gaul 5f8961723f Remove BlobStore Map abstractions
These provide little end-user benefit and make evolving the core API
more difficult.  We deprecated these in 1.6.0.
2013-09-25 20:46:31 -07:00
Aled Sage e29cdb142a JCLOUDS-282: Add NL to assignable locations for SoftLayer
- zone contained NL, so needed to add it to SoftLayerProviderMetadata's
  iso3166Codes
2013-09-16 15:57:18 +01:00
Aled Sage 404870c705 JCLOUDS-269: Report ram as MB rather than GB for SoftLayer 2013-09-16 11:04:32 +01:00
Ignasi Barrera ec1f2375f8 Improved javadoc and parameter naming 2013-09-16 09:52:46 +02:00
Ignasi Barrera ef7b7f7c52 Cleaned up ChefApi and ChefService interfaces
Cleaned up and renamed some methods to have a more consistent naming,
and improved the javadocs.
2013-09-13 17:55:02 +02:00
Andrew Gaul 342ae65974 [JCLOUDS-279] Remove spurious executable bit 2013-09-11 15:54:48 -07:00
Andrew Gaul 5b719900a0 [trivial] Remove unused variables 2013-09-09 22:38:41 -07:00
Diwaker Gupta 0930b638e3 Revert "Disable timed temporary signed URLs for AWS-S3"
This reverts commit bc0abbaa07 and
re-enables temp-signed URLs for S3.

Closes JCLOUDS-200
2013-09-09 15:28:31 -07:00
Andrew Gaul d8490f872d Enable some Xlint warnings
Also address a handful of warnings.
2013-09-04 19:45:44 -07:00
Ignasi Barrera 063dcc4c9d Removed redundant binders 2013-09-04 10:44:32 +02:00
Ignasi Barrera 5cc56f414a JCLOUDS-245/JCLOUDS-254: Fix live tests
Refactored the domain model to be immutable and addressed some
inconsistences with the Chef Server API model.

Removed all HEAD methods, as they have been removed from newer versions
of Chef. They were used to test the existance of a given resource, and
with newer versions the only way to do that is via a GET operation.

Now all live tests are passing for Community Chef 0.10.8, 11.0.6 and
Enterprise Chef.
2013-09-03 09:37:37 +02:00
Andrew Bayer a61ad06cbf JCLOUDS-166, JCLOUDS-167 - Removing async from vcloud and Terremark APIs/providers 2013-08-29 11:29:14 -07:00
Ignasi Barrera ac2a44ad6f JCLOUDS-246: Joined Hosted and Private Chef apis
Joined Hosted and Private Chef apis and renamed the provider
to Enterprise Chef.
2013-08-28 14:56:09 +02:00
Zack Shoylev 100afba1d8 Skips tests for time signed URLs 2013-08-26 20:35:16 -05: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
Everett Toews bf2138089d Support IAD region for Rackspace providers. 2013-08-06 20:54:23 -05:00
Andrew Gaul bc0abbaa07 Disable timed temporary signed URLs for AWS-S3
This functionality uncovered subtleties in URL parameter encoding
which result in random failures integration tests.  References
JCLOUDS-200.
2013-08-06 14:17:00 -07:00
Andrew Gaul 435103eb35 Add live test for JCLOUDS-233 2013-08-06 11:53:48 -07:00
Tom Manville 19f79145fc Handle multiple of MAX_BLOCK_SIZE for Azure MPU
Currently files are not properly uploaded if they are a multiple of
MAX_BLOCK_SIZE.  Fixes JCLOUDS-233.
2013-08-06 11:46:53 -07:00
Diwaker Gupta 96c326d0cd Enable time-bound signed URL tests for HPCS.
HP does, in fact, support configurable temporary signed URLs:
http://docs.hpcloud.com/api/object-storage#temp_url

References JCLOUDS-231
2013-08-05 21:36:42 -07:00
Andrew Bayer 29a5360d71 Fixing API casting for cloudsigma-zrh live test. 2013-08-02 09:55:51 -07:00
Andrew Bayer a14c03ba0b Remove async from glesys 2013-08-02 07:57:42 -07:00
Andrew Bayer d4bf51128e Remove async from gogrid 2013-08-02 07:57:42 -07:00
Andrew Bayer a2af31c419 Removed async from elasticstack 2013-08-02 07:57:41 -07:00
Andrew Bayer 1a6071ab92 Removed async from cloudsigma 2013-08-02 07:57:41 -07:00
Andrew Bayer dae2c67d79 Remove async from softlayer 2013-08-01 18:13:48 -07:00