10 Commits

Author SHA1 Message Date
karen chan
6097660f0c s3api: Implement object versioning API
Translate AWS S3 Object Versioning API requests to native Swift Object
Versioning API, speficially:

 * bucket versioning status
 * bucket versioned objects listing params
 * object GETorHEAD & DELETE versionId
 * multi_delete versionId

Change-Id: I8296681b61996e073b3ba12ad46f99042dc15c37
Co-Authored-By: Tim Burke <tim.burke@gmail.com>
Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com>
2020-01-28 14:00:08 -08:00
Tim Burke
e11c58ef89 Turn off dns_compliant_bucket_names for ceph tests
We get a handful more passing tests that way, following their move to boto3.

Change-Id: I73e9c38bde00a7117cec97e98f013e86350aa5be
2019-11-22 17:39:01 +00:00
Tim Burke
249a302d0c Remove a bunch of known-failures that moved from boto to boto3
Change-Id: I775a03e0ba1e10982eb6f7ef52be773c8831b1ec
2019-11-19 14:57:02 -08:00
Tim Burke
cfb3ae6019 Update known-failures and config for up-rev'ed ceph/s3tests
Change-Id: I3833843cd8d23c498a2afe6c68a3f0afe26343c0
2019-11-16 14:24:08 -08:00
Zuul
854a72facf Merge "S3Api: handle non-ASCII markers in v1 listings." 2019-05-29 23:32:20 +00:00
Timur Alperovich
8b64381371 Set Content-Type with s3api metadata updates.
S3 supports two metadata operations on object copy: COPY and REPLACE.
When using REPLACE, the Content-Type should be set to the one supplied
by the caller. When using COPY, the existing object's Content-Type value
is used.

Change-Id: Ic7c6278dedef308c9219eb45751abfa5655f144f
Closes-Bug: #1828907
2019-05-14 09:48:47 -07:00
Timur Alperovich
dade632b0f S3Api: handle non-ASCII markers in v1 listings.
Added a test for S3 v1 listings that use URL encoding and have non-ASCII
characters. In the process discovered that the XML schema for
ListBucketResult had a small problem: Delimiter and EncodingType needed
to be reordered.

Change-Id: Ib3124ea079a73a577b86de97657603a64b16f965
2019-05-08 12:17:38 -07:00
karen chan
78c9fd9f93 Change PUT bucket conflict error
When a bucket already exists, PUT returned a BucketAlreadyExists error.
AWS S3 returns BucketAlreadyOwnedByYou error instead, so this changes
the error returned by swift3.

When sending a PUT request to a bucket, if the bucket already exists and
is not owned by the user, return 409 conflict error,
BucketAlreadyExists.

Change-Id: I32a0a9add57ca0e4d667b5eb538dc6ea53359944
Closes-Bug: #1498231
2018-10-08 12:37:06 -04:00
Kota Tsuyuzaki
2c7768a3cb Small cleanup on s3api
This patch is one of follow up to remove unnecessary
files, and a comment in the code.

The conf files are used to setup functests environment
in the past swift3 repository but that should port to
setuppers of functests (see related change). Anyway,
we don't need shell based older conf.in script on that way.

Change-Id: If431979ea6fa373ac1cde4b7e13d57d91fb15be8
Related-Change: I6f30f74678ad35479da237361bee48c46c0ecc49
2018-05-01 16:35:27 +09:00
Kota Tsuyuzaki
636b922f3b Import swift3 into swift repo as s3api middleware
This attempts to import openstack/swift3 package into swift upstream
repository, namespace. This is almost simple porting except following items.

1. Rename swift3 namespace to swift.common.middleware.s3api
1.1 Rename also some conflicted class names (e.g. Request/Response)

2. Port unittests to test/unit/s3api dir to be able to run on the gate.

3. Port functests to test/functional/s3api and setup in-process testing

4. Port docs to doc dir, then address the namespace change.

5. Use get_logger() instead of global logger instance

6. Avoid global conf instance

Ex. fix various minor issue on those steps (e.g. packages, dependencies,
  deprecated things)

The details and patch references in the work on feature/s3api are listed
at https://trello.com/b/ZloaZ23t/s3api (completed board)

Note that, because this is just a porting, no new feature is developed since
the last swift3 release, and in the future work, Swift upstream may continue
to work on remaining items for further improvements and the best compatibility
of Amazon S3. Please read the new docs for your deployment and keep track to
know what would be changed in the future releases.

Change-Id: Ib803ea89cfee9a53c429606149159dd136c036fd
Co-Authored-By: Thiago da Silva <thiago@redhat.com>
Co-Authored-By: Tim Burke <tim.burke@gmail.com>
2018-04-27 15:53:57 +09:00