lp:~jaypipes/glance/parallax-register-image
- Get this branch:
- bzr branch lp:~jaypipes/glance/parallax-register-image
Branch merges
- Michael Gundlach (community): Approve
- Rick Harris (community): Approve
-
Diff: 515 lines (+310/-37)8 files modifiedglance/common/wsgi.py (+0/-1)
glance/parallax/controllers.py (+58/-15)
glance/parallax/db/sqlalchemy/api.py (+1/-1)
glance/parallax/db/sqlalchemy/models.py (+17/-15)
glance/teller/controllers.py (+1/-1)
run_tests.sh (+4/-4)
tests/stubs.py (+87/-0)
tests/unit/test_parallax_api.py (+142/-0)
Related bugs
Related blueprints
Recent revisions
- 15. By Jay Pipes
-
Adds a /images/detail route to the Parallax controller, adds a unit test for it, and cleans up Michael's suggestions.
- 13. By Jay Pipes
-
Implements Parallax API call to register a new image
* Adds unit test for Parallax API controller
* Adds stubouts for glance.parallax. db.sqlalchemy. api calls
regarding images
* Adds --logging-clear-handlers arg to nosetests in run_tests.sh to
prevent extra output in running tests when tests complete successfully - 12. By Jay Pipes
-
This patch overhauls the testing in Glance:
* Adds Nova-like run_tests.sh and tools/* files to automatically run unit tests in a virtual environment. Just do ./run_tests.sh -V from project root. All required dependencies will be installed into a new virtual environment at .glance-venv.
* Adds proper mocking and stubouts using pymox. This removes the need for all the FakeParallaxAdapter and similar code. Unit tests now call stubs.stub_out_parallax( ), etc instead of having swiftfakehttp.py and similar code. - 11. By Rick Harris
-
With this patch Parallax and teller now work end-to-end with the Swift backend.
bash-3.2$ curl localhost:
9292/image? uri=http:// localhost: 9191/images/ 2 > testimg.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 189M 0 189M 0 0 203k 0 --:--:-- 0:15:52 --:--:-- 214kbash-3.2$ md5 testimg.tar.gz
MD5 (testimg.tar.gz) = ef6c5db4f55b0030828b71dd253a23 84 - 10. By Rick Harris
-
This patch:
* Decouples Controller for ParallaxAdapter implementation by adding generic RegistryAdapter and providing a lookup function
* Adds base model attributes to Parallax's JSON (created_at, etc) - 9. By Christopher MacGown
-
Rewrote ImageController to inherit from the work Rick Harris did in glance.common. Moved it into teller/
api/images. py to make teller match parallax. Fixed tests. Renamed them to distinguish if any parallax tests ever get written. - 8. By Rick Harris
-
This patch:
* pulls in a number of useful libraries from Nova under the common/ path (we can factor those out to a shared library in Bexar-release)
* Defines the models in common.db.sqlalchemy. models. py (this should be factored out into the parallax package soon)
* Adds the parallax api-server under /bin (if PyPI was used to pull python-daemon and python-lockfile, you may need to apply a patch I have against it) - 7. By Christopher MacGown
-
Changes the obj['uri'] to obj['location'] to better sync with the representation within Nova. Adds the image_lookup_fn = ParallaxAdapter
.lookup to teller.server - 6. By Christopher MacGown
-
Implements a Parallax adapter for looking up images requested from nova. Adds a size check to SwiftBackend to ensure that the chunks haven't been truncated or anything.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:~hudson-openstack/glance/trunk