This branch is Chris' work with a merge of trunk, fix of merge conflicts from trunk, and moving the import of boto into a conditional block so tests can run with the fakes when boto is not installed on the local machine.
The patch does the following:
* Image Create (POST) is broken up into 3 steps (reserve, upload and activate); reserve is used to allow the OpenStack API to return metadata about an image where the data has not been uploaded yet
* Image Update (PUT) now takes image data as the request body and metadata as headers (just like POST); state is enforced so that image data can only be uploaded once.
* Image statuses were changed to match the OpenStack API (queued, saving, active, killed); NOTE: preparing is not used
* update_image and add_image client calls now return metadata instead of just the id
/images request
Change the store API so that add takes a file-like object, not a string.
This avoids loading the whole request body into memory before writing it out,
and allows us to stream it instead.
parameter, fix misdocumented default port, and remove handling of missing
parameters in BaseClient, because the values are always specified by the
subclass's __init__.
Remove incorrect doccomments about there being a default for the host
parameter, fix misdocumented default port, and remove handling of missing
parameters in BaseClient, because the values are always specified by the
subclass's __init__.
coding of the admin tool:
* Fix client constructor to behave like httplib.HTTPConnection
instead of accepting a URL, it now accepts host, port, and
use_ssl boolean switch that turns on HTTPSConnection
* Adds headers properly to the request in client.do_request().
Previously, was erroneously calling httplib.HTTPConnection.putheader
after calling httplib.HTTPConnection.request, which was incorrect
* Now returns type and size of images in index
* Webob.Response and httplib.HTTPResponse have slightly different
ways of accessing headers. Fixed an attribute error that was coming
up because the tests assume webob.
coding of the admin tool:
* Fix client constructor to behave like httplib.HTTPConnection
instead of accepting a URL, it now accepts host, port, and
use_ssl boolean switch that turns on HTTPSConnection
* Adds headers properly to the request in client.do_request().
Previously, was erroneously calling httplib.HTTPConnection.putheader
after calling httplib.HTTPConnection.request, which was incorrect
* Now returns type and size of images in index
* Webob.Response and httplib.HTTPResponse have slightly different
ways of accessing headers. Fixed an attribute error that was coming
up because the tests assume webob.