55 Commits

Author SHA1 Message Date
Andrew Gaul
3b09494379 Remove redundant modifiers from interfaces 2014-08-28 19:50:02 -07:00
Andrew Gaul
eb87d61c7b Correct license headers 2014-08-09 22:51:08 -07:00
Roman Coedo
877443a0e4 JCLOUDS-457: Extend javadoc and add README.md
Added more javadoc documentation. This covers the basics of the
provider.
2014-08-08 13:29:39 -07:00
Roman Coedo
3ff09c0ee7 JCLOUDS-457: Implementing getBlob without options
The missing getBlob implementation has been added.
2014-08-05 13:43:59 +02:00
Andrew Phillips
c8f42d6dcc Updating project and jclouds.version to 2.0.0-SNAPSHOT
Follow-up to 8fba1f2
2014-08-05 11:28:15 +02:00
Roman Coedo
9d6f7560a4 Follow-up to Glacier pull request reviews
* updating Javadocs
* minor style changes
2014-08-03 13:57:13 +01:00
Roman Coedo
2bcc52d0af Updating documentation and a configuration property name
Follow-on from 95d9b00
2014-07-28 18:18:11 -04:00
Roman Coedo
e555dc8876 JCLOUDS-457: Small fixes and documentation
Now the BlobStore and the strategy implementations are annotated with @Singleton.

Added a small documentation to the blobstore classes.
2014-07-28 01:17:42 -07:00
Roman Coedo
f7e81799ac JCLOUDS-457: Fix deleteContainer
The ClearVaultStrategy now ignores ResourceNotFound exceptions.

deleteContainer now tries to delete the vault first to avoid long waits.
If the delete request fails, retries it every 24 hours.
2014-07-27 23:49:03 -07:00
Roman Coedo
3b3939b798 JCLOUDS-457: Add Clear vault strategy
Added a proper implementation to the Clear vault strategy
2014-07-27 16:42:51 -07:00
Roman Coedo
84cb480ebe JCLOUDS-457: Add blobExists and blobMetadata
Now the BlobStore abstraction supports the blobExists and the
blobMetadata operations.
2014-07-26 23:39:44 -07:00
Roman Coedo
e5e3f86309 JCLOUDS-457: Add list operation
Now the BlobStore abstraction supports the list Operation
2014-07-26 23:18:47 -07:00
Roman Coedo
550c05c81a JCLOUDS-457: Add getBlob operation
Now the BlobStore abstraction supports the getBlob Operation
2014-07-26 22:40:46 -07:00
Roman Coedo
3320c4ec58 JCLOUDS-457: Add polling strategy
The polling strategy interface for job operations
and a simple implementation class have been added.
This implementation waits an initial time and then
polls at regular intervals.
2014-07-25 23:18:42 -07:00
Roman Coedo
34565bd63d JCLOUDS-457: List containers and remove blob
List containers and remove blob operations have
been added.
2014-07-25 22:47:33 -07:00
Roman Coedo
1851d684b2 JCLOUDS-457: Long live tests
The long live tests have been added. These tests takes several
hours and will leave traces in your AWS account.
2014-07-24 04:55:53 -07:00
Roman Coedo
cdbb845ae7 JCLOUDS-457: BlobStore MultiPartUpload strategy
The code related to the MultiPartUpload strategy has been added.
MultiPart uploads use an upload strategy (e.g. sequential vs parallel)
and also a slicing strategy to split the payload in different parts.
2014-07-20 15:00:35 -07:00
Roman Coedo
1359ba9010 JCLOUDS-457: Fix complete MPU archive size
The completeMultipartUpload operation is taking the archive size
parameter in MB but it should be bytes.
2014-07-18 16:57:21 -07:00
Roman Coedo
71782b1fd2 JCLOUDS-457: BlobStore Skeleton
The Amazon Glacier BlobStore skeleton has been added.
2014-07-18 00:19:28 -07:00
Roman Coedo
121d2c13ae JCLOUDS-457: Add JobStatus enum
Now the job status is stored as an enum instead of
a String. This is useful when comparing the status to
check if a job is completed, failed or still in progress.
2014-07-15 15:12:13 -07:00
Roman Coedo
73d9fa5340 JCLOUDS-457: Test groups and improvements
Test groups have been added. Also, the live tests were
refactored to reduce the number of RPCs.
2014-07-15 03:01:42 -07:00
Roman C. Coedo
ff83778fb7 JCLOUDS-457: uploadPart return type fix
The uploadPart method now returns HashCode instead
of String.
2014-07-04 13:29:21 -07:00
Roman C. Coedo
327a7b0a6b Use assertj extraction feature to shorten test 2014-07-03 16:04:39 -07:00
Roman C. Coedo
fbcf7eac80 Using assertj assertions
testng assertions have been replaced with assertj
assertions.
2014-07-03 16:04:34 -07:00
Roman C. Coedo
625aa6a42c Default value for aws identity/credential property
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:25:43 -07:00
Andrew Gaul
c2cf837e46 Improve use of assertj 2014-07-01 22:00:14 -07:00
Andrew Gaul
e104ef0a4c Use assertj fluent assertions where appropriate
This commit demonstrates a few instances where assertj yields more
informative error messages than testng assertEquals and assertTrue.
Note that we could replace all testng asserts with assertj.
2014-06-30 19:07:50 -07:00
Roman C. Coedo
70fb8cdea0 JCLOUDS-457: Added the retrieve output operations
Now the Glacier client can retrieve data.
2014-06-29 17:26:08 -07:00
Roman C. Coedo
9d871fde00 JCLOUDS-457: Added listJobs operation
Now the Glacier client supports the listJobs operation.
2014-06-27 16:57:15 -07:00
Roman C. Coedo
7156947a18 JCLOUDS-457: Added describeJob operation
Now Glacier client supports the describeJob operation.
2014-06-27 16:03:24 -07:00
Roman C. Coedo
59a43f8c2e JCLOUDS-457: Multiple fixes
This commit addresses some problems found in the code:

- Now VaultMetadata returns a copy of the creation date instead
of their own instance.

- Added a checkNotNull for PaginatedVaultCollection iterable.

- Added a test for listVaults with an empty list of vaults.
2014-06-27 15:49:08 -07:00
Roman C. Coedo
2c713d2b35 JCLOUDS-457: Cleanup for binder classes
The binder classes were making unnecessary checks. They have
been cleaned up.
2014-06-27 15:45:22 -07:00
Roman C. Coedo
c55a9f4522 JCLOUDS-457: Added initiateJob
Now the Glacier client supports the initiateJob operation.
2014-06-26 14:09:14 -07:00
Roman C. Coedo
f1a397359a JCLOUDS-457: limit body size for specific test
For each test, we were forcing the server to discard the content of
the request body on @BeforeMethod. We need to do this on tests with a
huge body, but it may interfere with other tests which actually use
the body data.  To fix this problem, we moved the body limit
restriction to the tests that require it.
2014-06-26 14:07:35 -07:00
Roman C. Coedo
0c36b36d35 Bug fix for ContentRange equals 2014-06-24 18:58:47 -07:00
Roman C. Coedo
3f68c3f0c7 JCLOUDS-457: Added list Multipart operations
Added listParts and listMultipartUploads operations to the Glacier
client.
2014-06-22 17:32:43 -07:00
Andrew Gaul
50df899c53 JCLOUDS-457: Call BeforeMethod and AfterMethod
Use these annotations to initialize before every test.  BeforeTest and
AfterTest initialize once before a single test in this suite.
2014-06-22 16:15:22 -07:00
Roman C. Coedo
b0dddca449 JCLOUDS-457: Added completeMultipartUpload and abortMultipartUplod.
Now the Glacier client supports completeMultipartUpload and i
abortMultipartUpload operations.
2014-06-20 15:00:37 -07:00
Roman C. Coedo
76ea768cb8 JCLOUDS-457: Clean up for the validators and the TreeHash class.
Now the validators use checkArgument instead of throwing an
exception by calling an static method.

There were some missing validators on the Async client, these
were fixed too.

Lastly, TreeHash inner class was removed. Now the factory methods
are in the TreeHash class.
2014-06-19 16:48:32 -07:00
Roman C. Coedo
248c855e48 JCLOUDS-457: Added initiateMultipartUpload and uploadPart operations.
Now the Glacier client supports initiateMultipartUpload and
uploadPart operations.
2014-06-19 14:28:39 -07:00
Roman C. Coedo
2efd8183ce Use Square's mockwebserver 2014-06-19 05:31:15 -07:00
Roman C. Coedo
b206d050e6 JCLOUDS-457: Clean up for GlacierClientMockTest.
GlacierClientMockTest was growing uncontrollably. This commit
is an attempt to fix this problem.

The first measure taken moves the duplicated strings to constants
and the JSON response bodies to resource files. In addition, some
repeated code was moved to static classes, where they can be reused.

We also use @BeforeTest and @AfterTest to make instances of the
MockWebServer and shut them down for each test.
2014-06-18 17:14:06 -07:00
Andrew Gaul
d2c5149836 Store hashes as HashCode for type-safety 2014-06-17 18:55:32 -07:00
Roman C. Coedo
883425fdfb JCLOUDS-457: Part of the code has been cleaned up
On the last commit we added TestUtils class. On this commit
the VaultNameValidator and the ThreeHashTest tests make use
of it.

GlacierClientMockTest was not using GlacierHeaders references.
This commit fixes this problem too.

In addition, the AWSRequestSignerV4, the TreeHash and the
VaultNameValidator classes are now final.
2014-06-17 16:42:09 -07:00
Roman C. Coedo
2916b636cf JCLOUDS-457: Added deleteArchive and uploadArchive operations.
Now the Glacier client supports upload and delete archive
operations.

An static TestUtils class has been made for the archive operations
tests. This class allows us to build payloads and build ByteSources.
2014-06-17 16:21:39 -07:00
Roman C. Coedo
43ee610625 JCLOUDS-457: Changed the ArrayLists in TreeHash util to ImmutableLists. 2014-06-17 12:06:25 -07:00
Andrew Gaul
2e5a8972f0 Avoid buffering entire input when hashing
Also ensure that we close the InputStream.
2014-06-16 16:09:27 -07:00
Roman C. Coedo
7312486a57 JCLOUDS-457: Added TreeHash util class and its test.
The TreeHash class stores two HashCodes, the linear and the
tree HashCode. The TreeHash class also has an static inner class
named Hasher, which allows us to calculate the hashes.

Both Hashes (tree and linear) are needed for the upload archive
and the multipart upload operations. When completing a multipart
upload operation we also need to calculate the tree hash of the
individual part's hashes.
2014-06-16 16:01:54 -07:00
Roman C. Coedo
0a90be9016 JCLOUDS-457: Use random vault names in live tests
Now the live tests are not conditioned by the current state of the
account used.
2014-06-13 13:14:32 -07:00
Roman C. Coedo
3b5aadc182 Renamed FalseIfVaultNotEmpty to be more generic. deleteVault should return false on any IllegalArgumentException. 2014-06-10 14:37:02 -07:00