183 Commits

Author SHA1 Message Date
jaypipes@gmail.com
9e4d7c8b0d Make run_tests.sh return failure when pep8 returns fail, and fix the pep8 error in /bin/glance-upload 2011-01-23 12:18:48 -05:00
Rick Harris
33f909593f This patch:
* Converts dashes to underscores when extracting image-properties from HTTP headers (we already do this for 'regular' image attributes
* Update image_properties on image PUTs rather than trying to create dups

Bonus:
* Remove useless test_data file (no longer needed now that we can actually use Glance API via glance/client.py)
* Add glance_upload.py which we can use to add raw/extra-kernel images (this might be able to go away once we have a full-blown glance-admin tool. However, for now, this is useful for testing Glance <-> Nova integration.
2011-01-23 16:26:24 +00:00
Rick Harris
e231c618cd This patch replaces some remaining references to req.body (which buffers the entire request body into memory!) with the util.has_body method which can determine whether a body is present without reading any of it into memory. 2011-01-23 16:16:27 +00:00
Rick Harris
9685f63c25 Adding Apache license, fixing long line 2011-01-22 19:42:07 +00:00
Rick Harris
a89f94d057 Making glance-upload a first-class binary 2011-01-22 19:35:29 +00:00
Rick Harris
d0ba568360 Revove useless test_data.py file, add image uploader 2011-01-22 19:17:07 +00:00
Rick Harris
ba947efb78 Fix property create 2011-01-22 19:15:55 +00:00
Rick Harris
9c57d403b2 Dont buffer entire image stream on PUT 2011-01-22 03:53:16 +00:00
jaypipes@gmail.com
df4b32d33e Adds man pages for glance-registry and glance-api programs. Adds Getting Started guide to the Glance documentation.
Fixes Bug #704842
2011-01-21 19:01:45 +00:00
jaypipes@gmail.com
9af7453afe Fixes LP Bug #700162: Images greater than 2GB cannot be uploaded
using glance.client.Client.
2011-01-21 18:51:28 +00:00
jaypipes@gmail.com
9c95aa6122 Duh, it helps to import the class you are inheriting from.... 2011-01-21 13:00:15 -05:00
jaypipes@gmail.com
54da96c611 OK, found a solution to our test or functional dilemma. w00t. 2011-01-21 12:35:40 -05:00
jaypipes@gmail.com
5bab765b4e Merge Rick's changes and correct small bug that was affecting test cases. 2011-01-21 11:35:11 -05:00
Rick Harris
5fd631dde9 Make compat with chunked transfer 2011-01-21 04:55:16 +00:00
jaypipes@gmail.com
e1cacfddd2 Removes the last vestiges of Twisted from Glance.
Bonus: shaves a full 45 seconds off of run_tests.sh -V -f now that a giant twisted tarball doesn't need to be downloaded.
2011-01-20 23:56:18 +00:00
jaypipes@gmail.com
28cdd61d6b Pull in typo fix 2011-01-20 18:50:35 -05:00
jaypipes@gmail.com
ea0549f73d Add in manpage installation hook. Thanks Soren :) 2011-01-20 18:49:13 -05:00
jaypipes@gmail.com
32866f1a15 Fixes LP Bug #700162: Images greater than 2GB cannot be uploaded
using glance.client.Client.

This patch introduces chunked-transfer encoding to the client
classes. When the glance.client.BaseClient.do_request() method
is called and the method is either POST or PUT and the body
argument is a file-like object, then the do_request() method
builds a chunked-transfer encoded request and send()s chunks of
the body file-like object over the httplib connection.

Not sure how we fully test this, since we'd have to pack up
a very large file for use in testing, but I'm open to suggestions :)
2011-01-20 15:27:41 -05:00
jaypipes@gmail.com
1f1888d17d Merge removal of twisted 2011-01-20 14:58:34 -05:00
jaypipes@gmail.com
d0e32336aa Removes Twisted from tools/install_venv.py and zope.interface from tools/pip-requires. Shaved a full 45 seconds for me off of run_tests.sh -V -f now we're not downloading a giant Twisted tarball... 2011-01-20 14:48:11 -05:00
jaypipes@gmail.com
9f0b0a436b Remove last little vestiges of twisted. 2011-01-20 14:37:42 -05:00
jaypipes@gmail.com
fbc496ae7b Quick typo fix in docs. 2011-01-20 14:20:34 -05:00
Soren Hansen
ba666b06c6 Add run_tests.py to tarball. 2011-01-20 15:56:19 +00:00
Soren Hansen
51878645d1 Also include run_tests.py in tarball. 2011-01-20 11:13:46 +01:00
jaypipes@gmail.com
c967f9ace2 Adds man pages for glance-registry and glance-api. Adds Getting Started guide to Glance docs. 2011-01-19 16:38:39 -05:00
jaypipes@gmail.com
bd035dfd10 Fixes bug #696375: x-image-meta-size not optional despite documentation saying so. 2011-01-19 20:41:21 +00:00
jaypipes@gmail.com
96eb80f589 PEP8 fixes in /glance/store/__init__.py
Also makes run_tests.sh automatically call pep8.
Pulls in Nova's run_tests.py wrapper for prettying
up output from nosetests...
2011-01-19 14:22:41 -05:00
jaypipes@gmail.com
4d0f6da88b Fix Bug #704038: Unable to start or connect to register server on anything other than 0.0.0.0:9191 2011-01-19 19:16:19 +00:00
jaypipes@gmail.com
c9d93d2219 Fix Bug #704038: Unable to start or connect to register server on anything other than 0.0.0.0:9191 2011-01-18 16:01:49 -05:00
Monty Taylor
9767165098 upgrade version... 2011-01-18 18:41:18 +00:00
jaypipes@gmail.com
56fa9a39bf Fixes Bug#696375: x-image-meta-size is not optional, contrary to
documentation. 

The image's size is set to zero now during reservation of the image ID if the
image's size is not passed in with headers. In addition,
glance.store.Backend.add() now returns a tuple of (location, size) and
the image's size attribute in the registry is updated to this value if 
previously set to zero.

Adds a new test case that ensures the size attribute is set properly
when not included in the image meta headers.

Adds documentation for the new _reserve(), _upload(), and _activate()
methods in glance.server.Controller.
2011-01-18 12:58:23 -05:00
jaypipes@gmail.com
f73ee950a1 Merge trunk 2011-01-18 12:48:42 -05:00
Monty Taylor
96ddcc0462 Increase version after release. 2011-01-18 09:31:40 -08:00
Monty Taylor
e1ad853246 Cut 0.1.2. 2011-01-17 14:24:50 -08:00
Monty Taylor
c4815119a2 Files missing from the tarball (and you probably need to cut a 0.1.2.) 2011-01-17 22:21:20 +00:00
jaypipes@gmail.com
14cc5df1cc Cleanup of RST documentation and addition of docs on an image's status 2011-01-17 13:09:14 -05:00
Monty Taylor
bdb2f2209b Include some files that were left out. 2011-01-15 12:02:31 -08:00
jaypipes@gmail.com
0afe4cc554 Implements the S3 store to the level of the swift store.
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.
2011-01-14 22:11:34 +00:00
jaypipes@gmail.com
9d107d234a Merge trunk, resolve conflicts, and move import of boto into conditional block to prevent import errors when running tests and not having boto installed. 2011-01-14 14:32:52 -05:00
jaypipes@gmail.com
18d6cf8b32 fixes bug698318.
Work done by Ewan Mellor; I just fixed a conflict after merging trunk...
2011-01-13 17:16:24 +00:00
jaypipes@gmail.com
b2cd2b0c3d Merge trunk and resolve conflict in server.py 2011-01-13 12:03:04 -05:00
Christopher MacGown
14ca119e29 Fixes suggested by JayPipes review. Did not modify docstrings in non-related files. 2011-01-12 22:03:54 +01:00
Rick Harris
1f4a644e61 This merge is in conjunction with lp:~rconradharris/nova/xs-snap-return-image-id-before-snapshot
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
2011-01-12 16:31:29 +00:00
Rick Harris
21cea9c5e6 Updating docs 2011-01-11 11:34:48 -06:00
Rick Harris
f62a676159 Merging trunk 2011-01-11 11:04:14 -06:00
Cory Wright
5048e3fc48 Clean up the rest of Glance's PEP8 problems. 2011-01-10 16:57:03 +00:00
Rick Harris
6880a7a764 PEP-8 Fixes 2011-01-07 00:13:33 -06:00
Rick Harris
19e411bc48 Fixing eventlet-raise issue 2011-01-06 19:14:53 -06:00
Ewan Mellor
4b924c9618 Bug #698316: Glance reads the whole image into memory when handling a POST
/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.
2011-01-06 21:24:17 +00:00
Rick Harris
0465f1810f Merging trunk 2011-01-05 11:47:18 -06:00