swift3¶
-
swift3.
version_info
= (1, 11)¶ Version information
(major, minor, revision)
.
-
swift3.
version
= '1.11'¶ Version string
'major.minor.revision'
.
swift3.middleware¶
The swift3 middleware will emulate the S3 REST api on top of swift.
The following operations are currently supported:
- GET Service
- DELETE Bucket
- GET Bucket (List Objects)
- PUT Bucket
- DELETE Object
- Delete Multiple Objects
- GET Object
- HEAD Object
- PUT Object
- PUT Object (Copy)
To add this middleware to your configuration, add the swift3 middleware in front of the auth middleware, and before any other middleware that look at swift requests (like rate limiting).
To set up your client, the access key will be the concatenation of the account and user strings that should look like test:tester, and the secret access key is the account password. The host should also point to the swift storage hostname. It also will have to use the old style calling format, and not the hostname based container format.
An example client using the python boto library might look like the following for an SAIO setup:
from boto.s3.connection import S3Connection
connection = S3Connection(
aws_access_key_id='test:tester',
aws_secret_access_key='testing',
port=8080,
host='127.0.0.1',
is_secure=False,
calling_format=boto.s3.connection.OrdinaryCallingFormat())
-
class
swift3.middleware.
Swift3Middleware
(app, conf, *args, **kwargs)¶ Bases:
object
Swift3 S3 compatibility middleware
-
check_pipeline
(conf)¶ Check that proxy-server.conf has an appropriate pipeline for swift3.
-
handle_request
(req)¶
-
-
swift3.middleware.
check_filter_order
(pipeline, required_filters)¶ Check that required filters are present in order in the pipeline.
-
swift3.middleware.
filter_factory
(global_conf, **local_conf)¶ Standard filter factory to use the middleware with paste.deploy