summaryrefslogtreecommitdiff
path: root/glanceclient
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Honor '--insecure' commandline flag also for keystone authentication"Jenkins2012-07-311-2/+4
|\
| * Honor '--insecure' commandline flag also for keystone authenticationSascha Peilicke2012-07-261-2/+4
| | | | | | | | | | | | Currently, keystone auth fails with self-signed certificates. Change-Id: Ice89bcd0662038260bc4bd12058972bb35e61e3b
* | Fix --debug CLI optionBrian Waldon2012-07-292-10/+7
|/ | | | | | | | | | The --debug argument has been ignored since httplib2 was replaced with httplib. This re-enables the --debug flag as an equivalent to the env var GLANCECLIENT_DEBUG. Fixes bug 1030700 Change-Id: Ib653049eea2f18c4cc2f8f8aac7884245afd0f04
* Replace httplib2 with httplib as http driverBrian Waldon2012-07-234-57/+37
| | | | | | | | * This allows us to send truly chunked responses to users * Handle bad connection url schemes with a new InvalidEndpoint exception * Fixes bug 1023240 Change-Id: I34500987f51d4e0c6e1f89ecf93853de3fcbb1c3
* Clarify usage of --insecure flagSascha Peilicke2012-07-201-1/+4
| | | | Change-Id: If19a7aab92350fb68e447a0ffe8a97e079d762e4
* Add pagination to v1 image-listBrian Waldon2012-07-192-16/+43
| | | | | | | | | | | | | | | | * Use recursive generator function to make subsequent requests to the v1 detailed images resource * 'limit' continues to act as the absolute limit of images to return from a list call * 'page_size' indicates how many images to ask for in each subsequent pagination request * Expose --page-size through the cli * Convert v1 images tests to use strict url comparison * Drop strict_url_check from FakeAPI kwargs - now the functionality is always active and tests must directly match fixture urls * Fix bug 1024614 Change-Id: Ifa7874d88360e03b5c8aa95bfb9d5e6dc6dc927e
* Merge "Wrap image data in iterator"Jenkins2012-07-192-4/+32
|\
| * Wrap image data in iteratorBrian Waldon2012-07-112-4/+32
| | | | | | | | | | | | | | | | | | | | This is establishing the API for a future optimization. We want to be able to offer true socket-level caching, but can't do that with httplib2 right now. For now, we will just fake the optimization by returning an iterator over the image body, which happens to already be fully loaded into a string. Change-Id: I2d36e3cdd45b26d7c7c27ba050bf6a4b5765df6c
* | Add pagination to v2 image-listBrian Waldon2012-07-132-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use a recursive generator function to iterate over the image container. The presence of next links are indicators to continue pagination while their value drives the location of the next page. * A user can pass in --page-size on the command line, or page_size when using the controller directly, to control how many images are requested with each subsequent paginated request. Default page size is 20. * Add a flag (strict_url_check) for the FakeAPI class to control whether it chops off query params when trying to match a request to a fixture. * Related to bp glance-client-v2. Change-Id: Ib98e912a7af0bb570b4fd738733edd9b837d1a12
* | Prevent links from being printed in v2 CLIBrian Waldon2012-07-131-0/+2
| | | | | | | | | | | | | | | | | | | | Nobody wants to see links in a human interface. This prevents the file, access, self and schema links from being printed when calling image-show or explain. Related to bp glance-client-v2 Change-Id: Ib98e912a7af0bb570b4fd738733edd9b837d1a11
* | Align print_dict to the leftBrian Waldon2012-07-131-1/+1
| | | | | | | | Change-Id: Ib98e912a7af0bb570b4fd738733edd9b837d1a10
* | Convert v2 images list method to generatorBrian Waldon2012-07-131-3/+5
| | | | | | | | | | | | | | | | | | We will want this to be a generator as soon as we implement pagination. Let's establish the interface now. Related to bp glance-client-v2 Change-Id: Ib98e912a7af0bb570b4fd738733edd9b837d1a07
* | Replace static v2 Image model with warlock modelBrian Waldon2012-07-133-13/+26
| | | | | | | | | | | | | | | | | | * Add warlock v0.1.0 as a dependency * Generate a pythonic, self-validating Image model using warlock * Add raw method to Schema model * Related to bp glance-client-v2 Change-Id: Ib98e912a7af0bb570b4fd738733edd9b837d1a04
* | Add support for viewing a single image through v2Brian Waldon2012-07-132-0/+15
| | | | | | | | | | | | | | | | * Add image-create command * Add tests for Image model, Controller.get, and Controller.list * Related to bp glance-client-v2 Change-Id: Ib98e912a7af0bb570b4fd738733edd9b837d1a06
* | Rewrite link parsing for finding v2 schemasBrian Waldon2012-07-133-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What we called 'links' are no longer returned in a container of objects, they are top-level entity attribtues. This fixes the parsing of the entities to look in the correct place when trying to locate a specific schema. Add a helper for printing to stderr and exiting with a non-zero exit code. Map 'name' to 'Attribute' when explaining a schema. Related to bp glance-client-v2 Change-Id: Ib98e912a7af0bb570b4fd738733edd9b837d1a05
* | Establish the supported importable interfaceBrian Waldon2012-07-137-149/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | * Consumers of this client should not depend on being able to import any module other than glanceclient and glanceclient * The only attributs of the glanceclient module are Client and __version__ * The attributes of the glanceclient.exc modules have yet to be locked down * glanceclient.common.exceptions was replaced with a placeholder module until consumers of it are updated Change-Id: Iea9648cd06906d65764987c1f2ee5a88ebeee748
* | Add --is-public to image-createBrian Waldon2012-07-131-1/+6
| | | | | | | | | | | | | | | | | | | | | | This moves image-create closer to image-update by adding --is-public and hiding the help output of --public. The --public option will be removed once devstack no longer depends on it. Fix bug 1023632 Change-Id: I2c58655ba56eef1fa486246618c4fb5bd3c6c8cf
* | Merge "Translate is_protected to protected"Jenkins2012-07-121-0/+6
|\ \
| * | Translate is_protected to protectedBrian Waldon2012-07-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | When creating or updating an image, translate the 'is_protected' argument into the proper 'protected' image attribute. Fix bug 1023653 Change-Id: Icfe6c38e4fda098ce3f90fd94c8fbbc18be2f4a8
* | | Merge changes I02ddeb59,Ife231377Jenkins2012-07-121-3/+3
|\ \ \ | |/ / | | | | | | | | | | | | * changes: Change --protected to --is-protected in create Properly map boolean-like arguments to True/False
| * | Change --protected to --is-protected in createBrian Waldon2012-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Make image-create match image-update when specifying a specific value for 'protected'. Fix bug 1023650 Change-Id: I02ddeb59c1f6882b206279a71f7af8889ce4602c
| * | Properly map boolean-like arguments to True/FalseBrian Waldon2012-07-111-2/+2
| |/ | | | | | | | | | | | | | | --is-public and --is-protected are now evaluated as True and False Fix bug 1023652 Change-Id: Ife2313770eebc176e7744711956aed20f16576a5
* | Merge "Remove AuthorizationFailure exception"Jenkins2012-07-122-6/+0
|\ \ | |/ |/|
| * Remove AuthorizationFailure exceptionBrian Waldon2012-07-102-6/+0
| | | | | | | | | | | | | | | | | | The AuthorizationFailure exception isn't used anywhere, so remove it. Fix bug 1015940. Change-Id: Ie6da74b63e3d1658c8ae26c272222f00f1209e38
* | Add ability to get version information in pythonMonty Taylor2012-07-113-0/+189
| | | | | | | | | | | | | | | | * A user can access glanceclient.__version__ to get a string representing the version of the installed library. * Add openstack-common's 'version' module. Change-Id: Ib14c561d8ac0b126617a20acfbd5fdb61c54f2c7
* | Latest setup goodness.Monty Taylor2012-07-111-20/+29
|/ | | | | | | Upgrade the common setup code to the latest versions, and use setuptools-git for sdist tarball generation. Change-Id: I81eca9199b7d330ef8ec80482565a75f8475a78c
* Preserve image properties on updateBrian Waldon2012-07-092-2/+15
| | | | | | | | | | * 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
* Add --file to image-update and correct bad nameBrian Waldon2012-07-091-3/+7
| | | | | | | | | * 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
* Merge "Allow image filtering by custom properties"Jenkins2012-07-092-0/+11
|\
| * Allow image filtering by custom propertiesBrian Waldon2012-07-042-0/+11
| | | | | | | | | | | | | | | | | | | | | | 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
* | Merge "Expand v1 image-list filters"Jenkins2012-07-091-5/+12
|\ \ | |/
| * Expand v1 image-list filtersBrian Waldon2012-07-041-5/+12
| | | | | | | | | | | | | | | | | | Add comparison filters for the v1 image-list command: --name, --status, --container-format, --disk-format. Related to bp glance-client-parity. Change-Id: I27377764ea5543a4bef593f0a731b09a914a9265
* | Merge "Add --timeout option to cli"Jenkins2012-07-091-3/+10
|\ \ | |/ |/|
| * Add --timeout option to cliBrian Waldon2012-07-041-3/+10
| | | | | | | | | | | | | | | | | | | | 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
* | Add size filtering to image-list actionBrian Waldon2012-07-041-1/+10
|/ | | | | | | | | | 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
* Allow image upload from local file to v1 APIAdam Gandelman2012-07-031-2/+12
| | | | | | | Allow an image to be read from a local file as an alternative to stdin (which remains the default). Change-Id: I81070ded9c505df7924c4efd5ae54cf3c0fa534d
* Switch CLI to support underscores and dashes.Dan Prince2012-06-291-0/+33
| | | | | | | | | | | | | | 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
* Split reading of versioninfo out into a method0.1.1Monty Taylor2012-06-261-4/+17
| | | | | | | | | | | | 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
* Merge "Add support for tag-based version numbers."Jenkins2012-06-261-24/+101
|\
| * Add support for tag-based version numbers.Monty Taylor2012-06-251-24/+101
| | | | | | | | Change-Id: I9b0e24f65e9b79c39bdf279b7af9c1040ded7952
* | Support --os-endpoint-type in glanceclient.Bhuvan Arumugam2012-06-231-2/+8
|/ | | | | | | | | | | | | | 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
* Hook up GET /v1/images/<id>Brian Waldon2012-06-211-0/+13
| | | | | | | This allows us to get raw image data out of the API! Related to bp glance-client-parity Change-Id: Id5f55553d2ff3b7bf58515062afdfd4b9b183a54
* Add initial docs.0.1.0Monty Taylor2012-06-141-0/+52
| | | | Change-Id: I1f8407597105a914945c932ff55945c8005e273c
* Add 'explain' command to v2 that describes schemasBrian Waldon2012-06-074-1/+74
| | | | | | | | | 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
* Stick prettytable at v0.6Brian Waldon2012-06-071-1/+1
| | | | | | Doing this so we can align columns reliably Change-Id: Ibdbc6f3df08d6f9c45b6e0a0f5a2440ba2637dbd
* Merge "Auto generate AUTHORS file for glanceclient component."Jenkins2012-06-061-2/+14
|\
| * Auto generate AUTHORS file for glanceclient component.Bhuvan Arumugam2012-06-022-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Add minimal support for the v2 APIBrian Waldon2012-06-048-7/+131
|/ | | | | | | | | 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
* Properly install from zipball.Monty Taylor2012-05-251-0/+5
| | | | Change-Id: I505a42ec11b388e3ee5c818a1aadf0f70d5565c5
* Adds support for --insecure.Michael Basnight2012-05-243-4/+12
| | | | | | fixes lp#1004281. Change-Id: I464e39515a7172bfb72921a92f46d31baac466d8