59 Commits

Author SHA1 Message Date
Andrew Gaul
7eb46cce36 JCLOUDS-651: Swift support for conditional copies 2016-02-16 16:29:54 -08:00
Andrew Gaul
293d3f864e Convert CopyOptions into an AutoValue
This commit requires an interface change since AutoValue lacks support
for Optional and uses Nullable annotations instead.
2016-02-16 16:29:54 -08:00
Andrew Gaul
2bd0550110 Add support for Swift conditional copy 2016-02-09 16:34:48 -08:00
Reijhanniel Jearl Campos
d83282ca53 JCLOUDS-691: Remove 404 fallbacks of PUT and POST calls from OpenStack APIs 2016-02-04 12:10:06 +01:00
Andrew Gaul
6360023f09 Remove unnecessary static imports
Found via error-prone.
2016-01-29 09:14:55 -08:00
Andrew Gaul
02b2e80b27 Delete single- and multi-part objects in Swift
Due to Swift's wonky MPU implementation we must try the multi-part
delete first followed by a single-part delete if it fails.  Previously
delete would leave orphan subobjects.  Fixes andrewgaul/s3proxy#92.
2016-01-26 21:22:54 -08:00
Andrew Gaul
68ff250c38 Return response from StaticLargeObjectApi.delete 2016-01-25 13:26:03 -08:00
Andrew Gaul
b63f74a6eb JCLOUDS-948: Swift Cache-Control support
Not supported.
2016-01-15 13:22:15 -08:00
Rita Zhang
a12ce5a8b7 Add support for AzureBlobStore.getBlobAccess and RegionScopedSwiftBlobStore.getBlobAccess.
They are currently throwing UnsupportedOperationException exception.
2016-01-05 15:33:50 -08:00
Andrew Gaul
91b202f4ea JCLOUDS-844: Swift putBlob ACLs 2015-12-22 00:46:34 -08:00
Andrew Gaul
4abd5dd16f Revert "Delete parts when removing Swift multipart objects"
This reverts commit 3c1588527dfc0682faf696186ebc18d29f7ee0da.
2015-12-08 10:08:22 +08:00
Andrew Gaul
3c1588527d Delete parts when removing Swift multipart objects
Swift implements multi-part upload with user-visible parts and an
explicit manifest.  When deleting an MPU blob it can delete only the
manifest or both the manifest and parts.  For consistency with other
providers, we now do the latter in the portable abstraction.  Swift
ignores the multipart-manifest=delete parameter for single-part
objects.  Fixes andrewgaul/s3proxy#92.
2015-11-17 23:06:33 -08:00
Andrew Gaul
22c789da9e JCLOUDS-894: Use prefix when listing MPU on Swift
Previously we only used the blob name and not the blob
name/slo/timestamp/part size cookie which yield extra parts when
listing an MPU with parts from a previous MPU.  Listing using the
stricter prefix gives the expected results.
Fixes andrewgaul/s3proxy#91.
2015-11-13 12:15:29 -08:00
Oliver Gondža
edde721937 JCLOUDS-962: Make all @Provider methods final 2015-09-02 23:54:44 +02:00
Timur Alperovich
2c417c83a6 JCLOUDS-992: Handle directories as blobs in Swift. 2015-08-20 12:42:10 -07:00
Andrew Gaul
e2b6950462 JCLOUDS-872: Swift copy object and append metadata
The existing method replaces metadata.
2015-08-11 13:26:56 -07:00
Andrew Gaul
4f32e863ad JCLOUDS-883: Replace metadata during Swift copy
Previously Swift copy would append metadata instead of replacing it.
2015-08-06 11:26:45 -07:00
Andrew Gaul
86f47394bf Correct FindBugs violations 2015-07-31 14:53:58 -07:00
Ka-Hing Cheung
2c578d7bcb marker should be null when there are no more items 2015-07-21 15:46:58 -07:00
Ka-Hing Cheung
ad38e48205 range get of manifest object has no etag 2015-07-14 17:20:14 -07:00
Timur Alperovich
6ec11fd6ec JCLOUDS-929: Implement delimiter support in Swift.
The patch adds the delimiter support in the openstack-swift API. As
part of the change, the subdirectory support in results is introduced.
This occurs when a prefix and delimiter options are set and there are
subdirectories present in the listing (i.e. multiple objects under the
same prefix/delimiter). In this case, Swift will return a list of
"subdir" objects (similar to CommonPrefixes in S3), which need to be
treated differently.
2015-07-13 14:34:59 -07:00
Timur Alperovich
a29d75a5d1 JCLOUDS-929: Implement generic delimiter support.
The patch adds delimiter option support in the generic blob store
interface. A live integration test is added to verify that jclouds
correctly lists objects separated by a delimiter.
2015-07-13 14:34:58 -07:00
Zack Shoylev
65b7bdf282 Removes CopyObjectException in favor of jclouds-standard blobstore exceptions 2015-07-09 18:28:14 -05:00
Timur Alperovich
86af0753bf Swift: do not assume only 1 container in tests.
Openstack Swift ContainerApiLiveTest testListWithOptions assumes that
there are no other containers and that ContainerApiLiveTest container
will _always_ be the first container.

The patch changes the behavior of the test to instead pull out the
container from the returned list.
2015-07-07 18:05:20 -07:00
Timur Alperovich
6d27fbb18a JCLOUDS-930: Handle subdir entries correctly.
When listing blobs, Swift returns an array of "subdir" entries for
every common prefix. The openstack-swift provider needs to process
such entries and add them to the result set. The subdir array is an
array of strings, so additional metadata needs to be added to the
objects (bogus ETag, bogus LastModifiedDate, and so on).

When directory marker blobs are used, this means that potential _two_
entries are generated for every directory if:
1. the delimiter is set and matches the directory blob (e.g. dir/ and
   delimiter /)
2. there are objects under the directory name (e.g. dir/blob), which
   will result in results that include common prefixes (subdir)

In the above example, we should expect two results: "dir" and "dir/"
representing the directory marker blob and the common prefix,
respectively.

This is caught in the testDirectory integration test.

The patch changes the behavior of the Swift provider to correctly
handle the results in the subdir stanza and changes the test to expect
the directory marker to be returned in the list.
2015-07-07 17:55:50 -07:00
Timur Alperovich
1cb0822972 JCLOUDS-930: Add prefix option to OpenStack Swift.
Plumbs the prefix option to the openstack-swift provider. In the
process, the support for the recursive option is modified to avoid
setting the _path_ parameter, but rather use the delimiter if required
(setting the delimiter is sufficient for a non-recursive listing).
2015-06-29 17:31:56 -07:00
Timur Alperovich
7c7d2e2df6 JCLOUDS-930: Add the prefix option.
Add a prefix option to the ListContainerOptions class.
2015-06-29 17:31:55 -07:00
Ka-Hing Cheung
e0bafd4c10 list MPU parts with prefix listing instead of marker
we now use segment conventions that allow us to do more
efficient listing
2015-06-23 20:06:10 -07:00
Ka-Hing Cheung
b8b20c16f5 use segment names similar to those created by python-swiftclient
Currently swift creates blob-1, blob-2... blob-n for multipart
upload segments, which are very common names that can easily
collide with normal objects. This changes the naming convention
to that of python-swiftclient (the `swift' command line).

python-swiftclient also uses a different segment container by
default, that's not implemented by this patch
2015-06-19 17:34:40 -07:00
Andrew Gaul
b0dfae1092 Use a configurable timeout for awaitConsistency
This allows setting to zero for strongly-consistency implementations
of s3 and swift stores.
2015-06-15 15:45:17 -07:00
Ka-Hing Cheung
320742c6b5 send HEAD instead of GET for blobMetadata 2015-06-11 17:33:51 -07:00
Ka-Hing Cheung
6ed95d8968 fix range get for manifest object
swift doesn't return the etag if the client is doing a range
get of a manifest (SLO or DLO), this fixes SwiftObject so
etag is optional
2015-06-10 13:38:55 -07:00
Andrew Gaul
4f6af13329 JCLOUDS-894: Swift portable MPU improvements 2015-06-08 11:20:09 -07:00
Andrew Gaul
9a02157a7f JCLOUDS-894: Add portable multipart upload for Swift 2015-06-06 16:32:16 -07:00
Zack Shoylev
f397bebeb2 JCLOUDS-894 Multipart upload code fixes for swift 2015-05-12 19:13:15 -05:00
Andrew Gaul
deeebe46f7 JCLOUDS-894: Expose Swift multipart operations 2015-05-01 13:32:36 -07:00
Andrew Gaul
0c6052f803 JCLOUDS-651: Swift copy object content metadata 2015-04-08 22:51:49 -07:00
Andrew Gaul
d8f48c48b4 JCLOUDS-651: Copy Swift system metadata 2015-04-06 15:35:59 -07:00
Zack Shoylev
576005a335 Adds live test. 2015-04-06 15:35:59 -07:00
Zack Shoylev
a1cbec1092 Allows copying an object and modifying metadata (user and object) 2015-04-06 15:35:58 -07:00
Andrew Gaul
67d731f054 JCLOUDS-651: Add Swift server-side copyBlob
This has some limitations as discussed in JCLOUDS-872.
2015-04-02 15:36:54 -07:00
Andrew Gaul
866ac3fabb Fix error-prone PreconditionsCheckNotNullPrimitive 2015-03-30 19:06:48 -07:00
Ignasi Barrera
f469cf8b51 Next development version 2.0.0-SNAPSHOT 2015-03-24 10:52:01 +01:00
Ignasi Barrera
bb41ed4341 Apache jclouds 1.9.0 release 2015-03-24 10:35:42 +01:00
Andrew Gaul
a56fa3926a JCLOUDS-732: Swift portable object ACLs
Swift does not implement support for these:

https://blueprints.launchpad.net/swift/+spec/object-acls
2015-02-21 10:28:02 -08:00
Andrew Gaul
c14141dec3 JCLOUDS-144: Swift multi-blob delete 2015-02-15 01:06:04 -08:00
Andrew Gaul
fcc991fa22 JCLOUDS-660: Swift portable container ACLs
Not implemented for legacy Swift.
2015-02-12 17:26:48 -08:00
Andrew Gaul
34733e991b Skip test which cannot run on openstack-swift 2015-01-24 15:12:38 -08:00
Everett Toews
7375ca4619 Normalize deprecation messages to make them easier to find 2015-01-21 11:00:43 -06:00
Andrew Gaul
e170f1e632 JCLOUDS-654: Add size to Swift StorageMetadata
This allows callers to read the content length during container
listing.  Follow-on to fae097e144c0b9adf00f88ded1d614e2aec963f8.
2015-01-15 17:46:24 -08:00