swift/swift
Paul Luse 46c68aebd1 Add Storage Policy Support
The basic idea here is to replace the use of a single object ring in
the Application class with a collection of object rings. The
collection includes not only the Ring object itself but the policy
name associated with it, the filename for the .gz and any other
metadata associated with the policy that may be needed. When
containers are created, a policy (thus a specific obj ring) is
selected allowing apps to specify policy at container creation time
and leverage policies simply by using different containers for object
operations.

The policy collection is based off of info in the swift.conf file.
The format of the sections in the .conf file is as follows:

swift.conf format:

    [storage-policy:0]
    name = chicken

    [storage-policy:1]
    name = turkey
    default = yes

With the above format:

- Policy 0 will always be used for access to existing containers
  without the policy specified. The ring name for policy 0 is always
  'object', assuring backwards compatiblity. The parser will always
  create a policy 0 even if not specified

- The policy with 'default=yes' is the one used for new container
  creation. This allows the admin to specify which policy is used without
  forcing the application to add the metadata.

This commit simply introduces storage policies and the loading
thereof; nobody's using it yet. That will follow in subsequent
commits.

Expose storage policies in /info

DocImpact
Implements: blueprint storage-policies
Change-Id: Ica05f41ecf3adb3648cc9182f11f1c8c5c678985
2014-06-18 17:31:37 -07:00
..
account debug level logs should not be translated 2014-05-11 14:46:10 +02:00
cli replaced e.message with a bare "e" object ref 2014-06-03 21:55:49 +00:00
common Add Storage Policy Support 2014-06-18 17:31:37 -07:00
container Merge "isolate representation from content in GET request" 2014-06-14 00:17:11 +00:00
obj replace string format arguments with function parameters 2014-05-20 11:40:39 +02:00
proxy Add Storage Policy Support 2014-06-18 17:31:37 -07:00
__init__.py Make pbr a build-time only dependency 2013-10-29 12:29:49 -07:00