summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Allow CLI opts to override auth token and endpoint"0.3.0Jenkins2012-08-031-15/+19
|\
| * Allow CLI opts to override auth token and endpointBrian Waldon2012-08-011-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | Previously, both --os-auth-token and --os-image-url had to be provided in order for either of them to be used in any API requests. This breaks the tie between them and allows a user to override either the auth token or the endpoint returned by Keystone independently of one another. Fixes bug 1029586 Change-Id: I8b81be723286c546d9cbd97c8b7d7aa89c03b2d4
* | Merge "Update python-keystoneclient version dependency"Jenkins2012-08-021-1/+1
|\ \ | |/
| * Update python-keystoneclient version dependencyBrian Waldon2012-08-011-1/+1
| | | | | | | | | | | | | | We need version v0.1.2 for the 'insecure' keyword to work in keystoneclient.v2_0.client.Client Change-Id: I0f8564d5e9067f8e7fcc2f3fb48cd09757977f38
* | Add legacy compat layer to v1 shellBrian Waldon2012-08-014-5/+622
|/ | | | | | | | | | | | | | | All legacy CLI commands should work as expected with a few minor exceptions: - no upload animation - no interactive pagination - help/usage output has changed Deprecated options are indicated as such in their usage info. Deprecated commands have descriptions that label them as such. Related to bp glance-client-parity Change-Id: I584b2447361967228bea332e14880e18db12fca8
* Merge "Refactor http request/response logging"Jenkins2012-08-023-35/+40
|\
| * Refactor http request/response loggingBrian Waldon2012-07-293-35/+40
| | | | | | | | | | | | | | | | | | | | Using the --debug flag or the GLANCECLIENT_DEBUG env var, a user will see http requests and responses in great detail. Requests are formed into proper curl commands while responses are printed just as they would as if the curl request provided were executed. Response bodies will not be printed if they are application/octet-stream. Change-Id: I9c9c5d6ec9f481091c944e596d073da3739795b6
* | Merge "Add exceptions for 500 and 503 HTTP status codes"Jenkins2012-08-011-2/+19
|\ \
| * | Add exceptions for 500 and 503 HTTP status codesBrian Waldon2012-07-291-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add glance.exc.InternalServerError and .ServiceUnavailable to represent HTTP statuses 500 and 503. Users will definitely see these from Glance, so let's be nice and map them to handy exception classes. Change-Id: I8e8fcda532455793ea4d0f08a23f7c92b68c186c
* | | Stop looking for v2 image in containerBrian Waldon2012-07-302-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The v2 API no longer returns images in JSON containers like '{"image": {...}}', so stop trying to decode the responses as if it does. Fix bug 1031185 Change-Id: I5209fe76445d4195b12944146a0ef190883f363f
* | | Merge "Fix coverage reporting test."0.2.0Jenkins2012-07-311-1/+1
|\ \ \
| * | | Fix coverage reporting test.Clark Boylan2012-07-271-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | A change was committed that modified the glanceclient.common.__init__.py file that seems to conflict with the NOSE_WITH_COVERAGE environment variable. Run the coverage tests like novaclient and swiftclient to get around this problem. Change-Id: Id9a655a0207d3b16a619972ebaecc87387cf784e
* | | 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-236-60/+55
| | | | | | | | * 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
* Merge "Relax prettytable dependency to v0.6.X from v0.6"Jenkins2012-07-191-1/+1
|\
| * Relax prettytable dependency to v0.6.X from v0.6Brian Waldon2012-07-171-1/+1
| | | | | | | | Change-Id: Ide7247ba444b60179d9c76c43dfaa43c025b69c9
* | Add pagination to v1 image-listBrian Waldon2012-07-195-38/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-193-6/+34
|\ \
| * | Wrap image data in iteratorBrian Waldon2012-07-113-6/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge changes Ib98e912a,Ib98e912aJenkins2012-07-184-9/+67
|\ \ \ | | | | | | | | | | | | | | | | | | | | * changes: Add pagination to v2 image-list Prevent links from being printed in v2 CLI
| * | | Add pagination to v2 image-listBrian Waldon2012-07-134-9/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | | | Merge changes Ib98e912a,Ib98e912a,Ib98e912a,Ib98e912a,Ib98e912aJenkins2012-07-188-23/+147
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: Align print_dict to the left Convert v2 images list method to generator Replace static v2 Image model with warlock model Add support for viewing a single image through v2 Rewrite link parsing for finding v2 schemas
| * | | Align print_dict to the leftBrian Waldon2012-07-131-1/+1
| | | | | | | | | | | | | | | | Change-Id: Ib98e912a7af0bb570b4fd738733edd9b837d1a10
| * | | Convert v2 images list method to generatorBrian Waldon2012-07-132-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-136-23/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-133-0/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-134-13/+26
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Update README usage examplesBrian Waldon2012-07-171-49/+12
|/ / | | | | | | | | | | | | | | * Update the python snippet to reflect reality * Fix broken links * Remove superfluous text Change-Id: I4b7e9aae35cc49e5fa89ca33d2399784c2afd029
* | 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-115-1/+191
| | | | | | | | | | | | | | | | * 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-115-30/+34
|/ | | | | | | 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-093-2/+21
| | | | | | | | | | * 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-093-0/+16
|\
| * Allow image filtering by custom propertiesBrian Waldon2012-07-043-0/+16
| | | | | | | | | | | | | | | | | | | | | | 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
|\ \