Split notification strategies out into modules.

1) Add a Strategy class that defines the interface that a particular
notification strategy must implement.

2) Split each notification strategy out into its own module.

This is in part just an attempt at some "code cleanup", but it also has
an advantage that it is easier to make a particular notification
strategy be optional and not impose a hard dependency on all of glance.

Change-Id: Iab658637c56e764e2b3ec54c67e752db0cbfbe5c
Add comments for swift options in glance-api.conf.

Fixes bug #771465.

Comments added for the following two options in
glance-api.conf
    'swift_store_auth_address'
    'swift_store_user'

Indent reason for BadStoreUri exception in swift.py.

Change-Id: Ife28e01a4e2344cf1e5a179752d244b68e45d348
Fixes incorrect URI scheme for s3 backend

Fixes bug #912094.

URI scheme for s3 backend should be 's3+https', not 'swift+https'.

Use s3.amazonaws.com instead of s3service.com to follow RFC2606.

Indent reason for BadStoreUri exception in s3.py.

Comments added for the following option in etc/glance-api.conf
    's3_store_host'

Change-Id: Id456b287d82fe61711f0d738e61ccb599f0b5684
Remove doc/Makefile.

Use "python setup.py build_sphinx" instead.  There are some things that
the Makefile did that setup.py does not do, but they will be easy enough
to add later if anyone misses them.

Change-Id: I430dcc027bac207af515fb7d927500db18320ba5
Add Fedora clauses to the installing document.

This change resolves 2 Fedora-related todo items in installing.rst.

It also cleans up a bit:
 - fixes weird grammar
 - fixes improper list numbering
 - uses proper name for Red Hat, where space is necessary
 - replaces A/B syntax with A, B

This is my first commit and I am adding myself to Authors file
on a suggestion by Brian Waldon.

Change-Id: I398ae8150d7912e0b61375a7bdc5aab1101f34bc
Bug #909533: Swift uploads through Glance using ridiculously small chunks

Remove the use of a temporary disk buffer when streaming to Swift.  This
was added on the assumption that it was not possible to stream chunks to
Swift direct from webob.Request.body_file.  That's not true -- a simple
file-like object wrapping body_file does the job perfectly.

This removes the need for swift_store_object_buffer_dir in the config file.
It is also significantly cheaper, since there is one copy fewer.

Fix the parsing of the swift_store_large_object_size and
swift_store_large_object_chunk_size options.  These are
specified in MB in the config file, but needs to be in bytes internally,
because they are compared against the image_size parameter given to add().

Update the unit tests to match.  This includes an additional check that
put_object is called the correct number of times.  The unit tests missed the
latter problem problem because there was no check that a small object is only
uploaded in one chunk, and despite the comment to the contrary there was no
check that the right number of chunks were written in the large-object case
either.  Added these in all places where store.add is called.

Change-Id: Ieb4cf68516b53bd16d2671e49e805b26118b3671
Merge "Remove doc/Makefile."
Merge "Bug #909533: Swift uploads through Glance using ridiculously small chunks"
Merge "Add comments for swift options in glance-api.conf."
Merge "Fixes incorrect URI scheme for s3 backend"
Merge "Split notification strategies out into modules."
Add notifications for sending an image

An image.send notification is to be sent to the notifier every time an image is
transmitted from glance. This can be used to track things such as bandwidth
usage.

Addresses bug 914440

Change-Id: If8b6504c4250fa6444d17d611de43d9704ca9aae
LP Bug#912800 - Delete image remain in cache

Adds a functional test case that verifies that when an
image is deleted and the cache middleware is place, that
the image is properly removed from the image cache.

Change-Id: I20fc4461bd5f53528b264536b248f596aff510af
Add optional revision field to version number

Add a revision field to the version number to account for releases from
the stable branch, e.g. 2011.3.1.

See http://wiki.openstack.org/StableBranchRelease

Change-Id: Ibe3b69fcc7e7d09f17c8f6e68a0e7bb17afbfdce
Merge "LP Bug#912800 - Delete image remain in cache"
Merge "Add notifications for sending an image"
Remove assertDictEqual for python 2.6 compatibility.

Fixes bug 915604. Removes assertDictEqual from glance tests and replaces it with assertEqual.

Change-Id: I1439516331b4e92051ccfce6abebe17a0516a52e
Return correct href if bind_host is 0.0.0.0.

The existing code returns incorrect href= in the root document (aka
"version" document) if the default configuration is used. If a remote
system accesses Glance API, the netspec of href= contains 0.0.0.0,
which cannot be used for further remote accesses. This happens because
attempts to use local configuration or the bind address to reconstruct
URLs are futile.

The correct way resolve this problem is to use the Host: header
of the HTTP request. As a bonus, it works with IPv6, should we ever
support it.

Change-Id: I661351b679c695bd6ab310104a3246dd3069f9c6
Bug: 915621
Merge "Return correct href if bind_host is 0.0.0.0."
Implement retries in notify_kombu

Fixes bug 915817

Copies code from nova and includes improvements pending for nova as well

Change-Id: Ib596f4bacc5f58c4507f4111cdfac273029018bc