Commit Graph

178 Commits

Author SHA1 Message Date
Brian Waldon d2ab65255f Remove AuthorizationFailure exception
The AuthorizationFailure exception isn't used anywhere, so
remove it.

Fix bug 1015940.

Change-Id: Ie6da74b63e3d1658c8ae26c272222f00f1209e38
2012-07-10 21:10:40 -07:00
Brian Waldon cf8613e76d Preserve image properties on update
* By default, image properties should not be deleted on image update.
* A user can specify --purge-props through the CLI or purge_props
  as a keyword argument to ImageManager.update to override the default
  behavior and force properties to be deleted.
* Fixes bug 1022758

Change-Id: Ib079378cb765552fc29a66913aefbbcd934d2065
2012-07-09 21:03:46 -07:00
Brian Waldon 0e8ab72357 Add --file to image-update and correct bad name
* Add the --file option to the image-update action, as it was left out
  of a previous patch
* Additionally, change a bad reference (args.fields) to args.file
* Fix bug 1022750

Change-Id: Idde127ec3f138f718d671b2133d50debec26236e
2012-07-09 15:25:10 -07:00
Jenkins 88a039488b Merge "Allow image filtering by custom properties" 2012-07-09 17:42:13 +00:00
Jenkins 7a2b39727b Merge "Expand v1 image-list filters" 2012-07-09 17:42:11 +00:00
Jenkins 12c51bbcad Merge "Add --timeout option to cli" 2012-07-09 17:42:10 +00:00
Jenkins ce806d615b Merge "Add size filtering to image-list action" 2012-07-09 17:34:41 +00:00
Jenkins cc9e28a4c1 Merge "Use PyPI for keystoneclient." 2012-07-05 20:56:15 +00:00
Brian Waldon a1691ddc10 Allow image filtering by custom properties
A user can filter a list of images by passing in a 'properties'
sub-dictionary inside of the 'filters' keyword argumen to
ImageManager.list(). The same functionality can be used through
the CLI through the use of one or more'--property-filter' options.

Related to bp glance-client-parity.

Change-Id: I7d119174d83faa894dde557e1944289de296a02c
2012-07-04 15:49:41 -07:00
Brian Waldon e7db533bc0 Expand v1 image-list filters
Add comparison filters for the v1 image-list command: --name,
--status, --container-format, --disk-format.

Related to bp glance-client-parity.

Change-Id: I27377764ea5543a4bef593f0a731b09a914a9265
2012-07-04 15:24:08 -07:00
Brian Waldon b05a9c0200 Add --timeout option to cli
Create a --timeout option to allow users to provide a custom timeout
for requests from the command line. The timeout functonality already
exists in both v1 and v2 client classes.

Related to bp glance-client-parity

Change-Id: Ic91de5eae2824b37f6aad3adc5fda28b9674250e
2012-07-04 14:52:33 -07:00
Brian Waldon 9aad246f0e Add size filtering to image-list action
Add --size-min and --size-max options to image-list to
represent the size_min and size_max filters passed to
the ImageManager.list method.

Related to bp glance-client-parity

Change-Id: Icb5458c3ed26ea754cff6360b741b3af99d1beb5
2012-07-04 14:24:38 -07:00
Adam Gandelman 2713ca1bdc Allow image upload from local file to v1 API
Allow an image to be read from a local file as an alternative to
stdin (which remains the default).

Change-Id: I81070ded9c505df7924c4efd5ae54cf3c0fa534d
2012-07-03 10:52:37 -07:00
Monty Taylor ac7121fc0e Use PyPI for keystoneclient.
Change-Id: Ib1ce43cde3e6848a873778dd9fc6aa4709df6452
2012-07-02 18:24:05 -04:00
Dan Prince e9b8f8ec2f Switch CLI to support underscores and dashes.
Update the glanceclient CLI to support both underscores and dashes.

Dashes are prefered and show up in help.

This will hopefully keep the CLI more consistent with the other
OpenStack client projects like Nova, Swift, Keystone in addition to the
old Glance client which all seem to prefer underscores to dashes.

Fixes LP Bug #1018467.

Change-Id: I80d7a19f94033554f7f639166911726de4a5159f
2012-06-29 16:47:18 -04:00
Monty Taylor 089d509f35 Split reading of versioninfo out into a method
Make the read_versioninfo to match write_versioninfo.

Additionally, there is an edge case where if the code is installed from a
github zipball, versioning info is missing. Now that we're using this,
there should be virtual no instances where a zipball will be easier or
less cost than an sdist created tarball, all of which should be public and
accessible, but during the transition, we need to account for the codepath.

Change-Id: Icd3fe97c6341bb04da27adc55a85f1ab6b525c46
2012-06-26 14:05:36 -05:00
Jenkins 993a7b7dd6 Merge "Add support for tag-based version numbers." 2012-06-26 16:58:08 +00:00
Monty Taylor 03efd16896 Add support for tag-based version numbers.
Change-Id: I9b0e24f65e9b79c39bdf279b7af9c1040ded7952
2012-06-25 10:09:44 -05:00
Bhuvan Arumugam d6e0a03a93 Support --os-endpoint-type in glanceclient.
Bug: 993993

* glanceclient/shellp.py
  OpenStackImagesShell.get_base_parser(): Parse --os-endpoint-type
  argument. Default to one defined in os.environ.
  OpenStackImagesShell._authenticate(): Define endpoint type based
  on command line argument. Use 'publicURL', if it's not specified
  in command line and also not defined in os.environ.
  OpenStackImagesShell.main(): Pass this value to authenticate.

Change-Id: I0c0cde5212198eec2a7d75fb2a7cad1cde048c7c
2012-06-23 22:28:21 -07:00
Brian Waldon 99e872a57b Hook up GET /v1/images/<id>
This allows us to get raw image data out of the API! Related to
bp glance-client-parity

Change-Id: Id5f55553d2ff3b7bf58515062afdfd4b9b183a54
2012-06-21 13:06:18 -07:00
Monty Taylor 6e1157059e Add initial docs.
Change-Id: I1f8407597105a914945c932ff55945c8005e273c
2012-06-14 14:24:05 -04:00
Clark Boylan a8d7043266 Edit build_sphinx options.
To better facilitate the building and publishing of sphinx
documentation by Jenkins we are moving all openstack projects with
sphinx documentation to a common doc tree structure. Documentation
goes in project/doc/source and build results go in project/doc/build.

Change-Id: Idf3e4472f91a1f5ae36e64b339bef99d4d960b88
2012-06-08 15:23:58 -07:00
Jenkins 0d53efe930 Merge "Add 'explain' command to v2 that describes schemas" 2012-06-08 21:29:59 +00:00
Jenkins 0246e99817 Merge "Minimize tox.ini" 2012-06-07 22:43:34 +00:00
Brian Waldon 1c3db6c756 Minimize tox.ini
Change-Id: I77d0873cbd789726b93b059429d742f1cbdc57c1
2012-06-07 14:51:29 -07:00
Brian Waldon 7f48506781 Add 'explain' command to v2 that describes schemas
At its core, this is adding the ability to finx a schema through
published links and convert it to a usable object.

Related to bp glance-client-v2

Change-Id: I7b38ad091c6b0ad80197eb789503cf73989893e5
2012-06-07 14:43:00 -07:00
Brian Waldon 2822748bc1 Stick prettytable at v0.6
Doing this so we can align columns reliably

Change-Id: Ibdbc6f3df08d6f9c45b6e0a0f5a2440ba2637dbd
2012-06-07 14:41:14 -07:00
Brian Waldon 0935e38113 Add tests dir to pep8 command
Change-Id: I28120c67e157277202976696eea37023fb719d6d
2012-06-07 14:37:56 -07:00
Jenkins 2e81493192 Merge "Auto generate AUTHORS file for glanceclient component." 2012-06-06 20:48:14 +00:00
Brian Waldon bcff183f9a Set pep8 dependency at v1.2
Additionally, remove the pep8 dep override in tox.ini so the dep we
set in tools/test-requires is actually used

Change-Id: Iceb6d7a5dd8eceeebc1408e8a5edfabb48462d3e
2012-06-04 09:12:36 -07:00
Brian Waldon 4b62848a4c Add minimal support for the v2 API
This only allows you to run image-list, but sets up a framework
that we can use to fill in the rest of the v2 functionality.

* Related to bp glance-client-v2

Change-Id: I8827e36fdcf79fe402990a6d05898ec00cbd54c6
2012-06-04 08:49:26 -07:00
Bhuvan Arumugam a1f8ea1c7f Auto generate AUTHORS file for glanceclient component.
Bug: 976267

Now that git commits are gated by CLA, we shouldn't enforce
committers to add an entry in AUTHORS file. The AUTHORS file
should be generated automatically, based on git commits.

This commit fixes the problem.

* AUTHORS
  Remove this file.

* .gitignore
  Add AUTHORS file.

* glanceclient/openstack/common/setup.py
  Sync changes from openstack-common.

* setup.py
  Generate AUTHORS file before creating the package.

* glanceclient/shell.py
  Pep8 fix.

* tests/test_authors.py
  Remove this test case.

Change-Id: I9e9d4da5ca3b147b483250dcf25a3b2a840123c2
2012-06-02 00:04:12 -07:00
Chuck Short b9b8972528 Include ChangeLog in tarball
Include ChangeLog when generating the tarball.

Change-Id: I4a65b82928e3f55775cfa5d3d51b3c3b4e1ef079
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2012-05-29 08:32:19 -04:00
Monty Taylor 32ba1385ef Properly install from zipball.
Change-Id: I505a42ec11b388e3ee5c818a1aadf0f70d5565c5
2012-05-25 14:38:33 -04:00
Michael Basnight 405d2494e3 Adds support for --insecure.
fixes lp#1004281.

Change-Id: I464e39515a7172bfb72921a92f46d31baac466d8
2012-05-24 22:35:14 -05:00
Monty Taylor a0f6ef9c6b Fix the zipball change.
-f downloads things from a url. -e does them for vcs.

Change-Id: I14c5edd0ca163112baea08c81771f35f13930264
2012-05-24 09:46:38 -04:00
Monty Taylor ee7ea16481 Replace git url with github zipball.
distribute does not grok git urls, but auto-generated zipfiles are a
short-term workaround until we've got pypi uploads sorted.

Fixes bug 1003328

Change-Id: Iaded7245cea7a30c2f421c7b48ece9823aaf152f
2012-05-23 11:38:06 -04:00
Jenkins 995372fff7 Merge "Refactor HTTPClient to use two request methods" 2012-05-22 23:55:35 +00:00
Brian Waldon 3943699427 Refactor HTTPClient to use two request methods
Rather than depend on magic, I would prefer that we explicitly call
two different request methods: json_request and raw_request. The
former will encode/decode request bodies to and from JSON, while
the latter will not.

Change-Id: I6a429a5975993f71df85df55f11c5d51c050c289
2012-05-22 08:45:00 -07:00
Thierry Carrez 78cd3d9e16 Add missing files to MANIFEST.in
Some files were missing from tarballs generated using
'python setup.py sdist', this adds them to MANIFEST.in.
Fixes bug 1001217.

Change-Id: I0c99deba3f24989b34cff27b5d3cd1c999cd08fa
2012-05-22 11:48:58 +02:00
Brian Waldon 623a0898f8 Add importutils from openstack-common
As a side-effect, openstack.common.setup is getting updated

Change-Id: I9f8696ec5c82ef32872e1a974102dcd179eb70f9
2012-05-20 13:08:20 -07:00
Michael Basnight 399d0bbdef Adding service type as configurable shell option
fixes lp#997698

Change-Id: I5179a2ed5f32a8e7253806f6f9b02de3c06913ed
2012-05-10 14:15:54 -05:00
Jenkins b31c272ae1 Merge "Remove printt" 2012-05-07 23:36:46 +00:00
Dean Troyer 332858d56b Remove printt
prettyprint 0.6 removed printt at the last minute, replace with get_string

Fixes bug 995826

Change-Id: I9a25efc3d723ab0208ea88fc6431a95cc9176acb
2012-05-07 10:39:45 -05:00
Chuck Short 93c1755acd Added condition requirement to simplejson
simplejson is a part of python 2.6.

Change-Id: I3a1d776918c8707f21532fe3b043a039b72d6704
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2012-04-30 11:21:12 -04:00
James E. Blair ae58edcba7 Use tox for running tests locally.
See: http://wiki.openstack.org/ProjectTestingInterface

Tox can manage virtualenvs, and is currently doing so for running
tests in Jenkins.  It's just as, or more, useful for running tests
locally, so this starts the migration from the run_tests system to
tox.  The goal is to reduce duplicate testing infrastructure, and
get what's running locally on developer workstations as close to
what is run by Jenkins as possible.

This patch removes run_tests.py, and the scripts that manage .venv.
It makes run_tests.sh call tox to facilitate the transition for
developers used to typing "run_tests.sh".

Developers will need tox installed on their workstations.  It can
be installed from PyPI with "pip install tox".  run_tests.sh outputs
those instructions if tox is not present.

New facilities are available using tox directly, including:

  tox -e py26  # run tests under python 2.6
  tox -e py27  # run tests under python 2.7
  tox -e pep8  # run pep8 tests
  tox          # run all of the above
  tox -e venv foo  # run the command "foo" inside a virtualenv

The configuration of the openstack nose plugin is removed from
setup.cfg and added to the nosetests command line arguments in tox.
It is used when running tox from the command line, so the enhanced,
colorized output is visible to developers running the test suite
locally.  However, when Jenkins runs tox, the xunit plugin will be
used instead, providing output natively understood by jenkins which
is much more readable in that context.

Change-Id: Id678c2fb8a5a7d79c680d3d1f2f12141f73dc8a6
2012-04-27 23:45:38 +00:00
Gabriel Hurley 3344eac545 Adds filter support to images.list().
This existed in glance.client, and should exist in the new
client as well! :-)

Change-Id: Iea8c55fcb0f0d30d6dc138072354c3f20d1288cf
2012-04-27 12:25:48 -07:00
Brian Waldon 1f106a3bd9 Add '.tox' to .gitignore
Change-Id: Ie29752e7e4194fca4cbe82c161d7cac9ebd0848c
2012-04-25 20:12:07 -07:00
Jenkins a8ae91b5df Merge "Add fields to image-list" 2012-04-25 03:49:52 +00:00
Jenkins a88bfee9c5 Merge "Strip version from service catalog endpoint" 2012-04-25 03:41:40 +00:00