Hugh Saunders 9fda0dc815 Fix problem where image data is not read from a pipe.
For image-updae and image-create commands, glanceclient attempts to
determine whether image data should be uploaded based on the presence
of data on stdin. Unforunately it is difficult to determine if data is
available, especially when standard in is from a pipe.

This is especially problematic for update operations, where data must
only be uploaded if the image is in queued state. For example data may
be uploaded when the user only wants to rename an image, but the rename
will be rejected because data cannot be uploaded to an unqueued image.

This patch removes the check that attempts to determine if data is
available to read as it didn't work for pipes. It also re-introduces a
check for image state in the update operation, so that glanceclient only
attempts to read data if the image being updated is in queued state.

The image state check is part of the original patchset that was removed
so the patchset could have a single focus [1]

This patch also removes a test for handling empty stdin, and adds a test
for reading stdin from a pipe.

[1] https://review.openstack.org/#/c/27536/3/glanceclient/v1/shell.py

Fixes: bug 1184566
Related to: bug 1173044

Change-Id: I8d37f6412a0bf9ca21cbd75cde6a4d5a174e5545
2013-06-03 18:01:58 +01:00
2013-04-02 14:49:59 -07:00
2013-05-18 09:02:07 -07:00
2013-02-06 16:47:06 +02:00
2013-01-16 18:39:18 -05:00
2012-04-03 20:50:44 -06:00
2013-01-16 18:39:18 -05:00
2012-03-26 22:48:48 -07:00
2013-02-07 05:10:08 -06:00
2013-05-18 09:02:07 -07:00
2013-05-18 09:02:07 -07:00
2013-05-18 08:29:02 -07:00

Python bindings to the OpenStack Images API
=============================================

This is a client library for Glance built on the OpenStack Images API. It provides a Python API (the ``glanceclient`` module) and a command-line tool (``glance``). This library fully supports the v1 Images API, while support for the v2 API is in progress.

Development takes place via the usual OpenStack processes as outlined in the `OpenStack wiki <http://wiki.openstack.org/HowToContribute>`_.  The master repository is on `GitHub <http://github.com/openstack/python-glanceclient>`_.

See release notes and more at `<http://docs.openstack.org/developer/python-glanceclient/>`_.
S
Description
No description provided
Readme 1.7 MiB
Languages
Python 99.4%
Shell 0.6%