summaryrefslogtreecommitdiff
path: root/openstackclient/common
Commit message (Collapse)AuthorAgeFilesLines
* Add Identity v2 role and service testsDean Troyer2013-09-041-1/+4
| | | | | | | | | * Add current auth info (auth_ref) to ClientManager * Fix identity.v2_0.role.ListUserRole to get default user/project from ClientManager.auth_ref * Fix identity.v2_0.role.AddRole call to roles.add_user_role() Change-Id: Ie8bf41c491d97b0292a2b86bdc9b7580989a7f97
* Object API commands using our REST API layerDean Troyer2013-08-281-0/+2
| | | | | | | | | | | | | * Add object-store API to ClientManager * Add object-store client * Add Object API library in openstackclient.object.v1.lib * Add Object API {container,object} list commands * Add library tests * Add command tests This should complete the Object v1 container and object list commands Change-Id: Ib1770d45efa8871959826b85faafa1e0bcef0a03
* Create a new base REST API interfaceDean Troyer2013-08-232-0/+212
| | | | | | | | | | | * restapi module provides basic REST API support * uses dicts rather than Resource classes * JSON serialization/deserialization * log requests in 'curl' format * basic API boilerplate for create/delete/list/set/show verbs * ignore H302 due to urllib import Change-Id: I3cb91e44e631ee19e9f5dea19b6bac5d599d19ce
* Merge "Remove tenant round 3 - other commands"0.2.alpha1Jenkins2013-07-311-1/+1
|\
| * Remove tenant round 3 - other commandsDean Troyer2013-07-311-1/+1
| | | | | | | | | | | | | | Mostly options and help strings: * image, server, project usage, volume Change-Id: I788b0660f8c2daacde53c20a72dd1afc60cf5159
* | Merge "Remove tenant round 1 - global options"Jenkins2013-07-311-4/+4
|\ \ | |/
| * Remove tenant round 1 - global optionsDean Troyer2013-07-311-4/+4
| | | | | | | | | | | | | | | | | | Change the global auth options to use 'project', leave the original tenant options in place but silent for compatability with the existing project CLI auth options. This is the only compatibility for tenant usage in this changeover. Change-Id: I3cce6e552f18822cc9f445ec5f301b0f5d9003f8
* | Add security group commandsDean Troyer2013-07-292-1/+28
|/ | | | | | | | | | | | | | * Add security group: create, delete, list, set, show * Add server: add secgroup, remove secgroup * Add security group rule: create, delete, list * Add Oslo's strutils and gettextutils * Adds parseractions.RangeAction() to handle option arguments of either a single number or a range of numbers: '--port 25' or '--port 1024:65535' Blueprint: nova-client Change-Id: Iad2de1b273ba29197709fc4c6a1036b4ae99725f
* Add server resize commandDean Troyer2013-07-291-0/+33
| | | | | | | | | | | | * add server resize * update --wait handling for server create, reboot, rebuild * move _wait_for_status to utils Blueprint: nova-client Rebased after https://review.openstack.org/38162 was committed Change-Id: I7a43b996feecadc7628fcfe20cd5b17333762739
* Merge "Clean up properties (metadata) formatting"Jenkins2013-07-231-7/+21
|\
| * Clean up properties (metadata) formattingDean Troyer2013-07-211-7/+21
| | | | | | | | | | | | | | | | | | | | * Reformat default dict output to key='value' using utils.format_dict() * Changes utils.get_item_properties() to pass the specific field to the formatter function rather than the entire resource object, this allows the formatter to handle multiple attributes. * Updates server, volume, volume type commands Change-Id: I90eebf6b84ae200532f09cd925f371598ea54a64
* | Add quota commandsDean Troyer2013-07-171-0/+192
|/ | | | | | | | | | | | | * Add quota set and quota show commands; these work on both the compute and volume APIs * Add the --class variation on the above commands Note: this replaces the existing volume-only quota commands and eliminates quota list Blueprint: cinder-client Bug: 1172064 Change-Id: I766d40e410e48f05e36e17e567a4f01a9411b40e
* Merge "Add show limits command"Jenkins2013-07-171-0/+79
|\
| * Add show limits commandDean Troyer2013-07-121-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | * This is a combination of the compute and volume API limits as they are very similar. As such, the command lives in a new command group 'openstack.common' that is unversioned. * Implements 'limits show [--absolute|--rate] Updated for https://review.openstack.org/#/c/36772/ Bug: 1172057 Change-Id: I2bd181cd0d098f7143360ae67944c2f221379af5
* | Remove api = apiName calls from each methodSteve Martinelli2013-07-121-29/+0
|/ | | | | | | | | | | As discussed in https://review.openstack.org/#/c/36352/ for each command, we were setting api = identity or volume... etc, this was for an old way of calling commands that are is no longer used. Also removed openstackclient/common/command.py Change-Id: I2705f35d343f2ae729dc22d6aed0b852b2f8ca19
* Finish up v3 role commandsSteve Martinelli2013-07-031-2/+9
| | | | | | | | | | | | * Add remove role * Add --role to group list * Add --role to user list * Fix groups in AddRole() * Remove the tweaks to utils.find_resource for domains; will address that across domains, projects, users and groups in another patch. I want to nail down the structure of these commands and get that into place Change-Id: I8673dd8221ef88978dada5a2833c187026bdb31a
* Tweak volume commands and add k=v argparse actionDean Troyer2013-05-241-0/+34
| | | | | | | | | | | Basic cleanups: * change metadata to property * add new KeyValueAction to parse the property options * multiple properties can be set using multiple --property args * consistent formatting * do lookups for volume args Change-Id: Ib6c43f01ad46b395aee8c61e886f42e2a5f5573e
* Fix flake8 errors in anticipation of flake8 patch.Monty Taylor2013-05-142-3/+3
| | | | Change-Id: Ifdc4322b699f2bd91a6900e55695acd3d736568e
* Add fixed-ip and floating-ip commandsDean Troyer2013-04-141-1/+8
| | | | | | | | | | | | Adds: * fixed-ip commands: add, remove * floating-ip commands: add, create, delete, list, remove * floating-ip-poo command: list Also uses NAME_ATTR in the Resource class if present to determine the attribute to be used for searching in utils.find_resource() Change-Id: Ifd8fa60f880fc4050dea182ac24553cc2c4bff15
* Add snapshot support for v1 volumeSteve Martinelli2013-03-081-0/+5
| | | | | | | | rebase again, and change util to look for display_name too minor changes and rebase add create/delete/list/set/show support for snapshot Change-Id: I80261653fa919555a44ddda07b0a827ccd16e5e0
* Add Cinder API V1 SupportSteve Martinelli2013-02-081-0/+2
| | | | | | | | | | | | | made the changes suggested by dtroyer added client modified setup.py entry points updated pip required added support for create/delete/list volume types openstack list type openstack create type typeName openstack delete type typeNameOrId Change-Id: I43655de151582e37f14dc9550151a66db7a009ab
* Multiple API version supportDean Troyer2013-02-061-0/+42
| | | | | | | | | | | | | | | | * Use multiple entry point groups to represent each API+version combination supported * Add some tests Try it out: * Right now only '* user' commands have multiple overlapping versions; you can see the selection between v2.0 and v3 by looking at the command help output for 'tenant' vs 'project': os --os-identity-api-version=2.0 help set user os --os-identity-api-version=3 help set user Change-Id: I7114fd246843df0243d354a7cce697810bb7de62
* Upgraded to PEP8 1.3.3 to stay aligned with Nova, etc.Josh Kearney2013-01-315-77/+43
| | | | | | | | Made all the necessary changes to pass new PEP8 standards. Also cleaned up docstrings to conform to the HACKING stanards. Change-Id: Ib8df3030da7a7885655689ab5da0717748c9edbe
* Standardize on a copyright header and ensure all files have them.Josh Kearney2013-01-246-60/+64
| | | | Change-Id: I64812bca01ca655c9cf9239a0daea84907082a29
* Clean up test environment and remove unused imports.Josh Kearney2013-01-223-4/+0
| | | | | | First round of adding more complete unit test coverage. Change-Id: Ic1979c499ca6fcb784892a95954a3527539c4e53
* Adds Glance API v2 support.Josh Kearney2013-01-162-2/+4
| | | | Change-Id: Ib0325e62a7e50aa94e852a73f9a2cb95daa8d5f6
* Keyring support for openstackclient.Bhuvan Arumugam2012-08-151-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 1030440 If password is defined in keyring, use it; otherwise, prompt for the password. Keying is configured using command line switch, --os-use-keyring or env(OS_USE_KEYRING). * openstackclient/common/openstackkeyring.py The abstract class for keyring, specifically for openstack. The class is used to store encrypted password in keyring, without prompting for keyring password. The encrypted password is stored in ~/.openstack-keyring.cfg file. * openstack-common.py Update openstackkeyring library from openstack.common. * openstackclient/shell.py OpenStackClient.build_option_parser(): New boolean argument, --os-use-keyring, default to env(OS_USE_KEYRING). OpenStackClient.authenticate_user(): Get password from keyring, if it is defined; otherwise, prompt for the password. If user enter a password and keyring is enabled, store it in keyring. OpenStackClient.init_keyring_backend(): New method to define openstack backend for keyring. OpenStackClient.get_password_from_keyring(): New method to get password from keyring. OpenStackClient.set_password_in_keyring(): New method go set password in keyring. * toos/pip-requires Define keyring and pycrypto as one of dependent. Change-Id: I36d3a63054658c0ef0553d68b38fefbc236930ef
* minor fixesMatt Joyce2012-05-291-1/+1
| | | | Change-Id: Ib5601e1a932e0bfaa0341909416415d1e81ee915
* Add endpoint CRUD commandsDean Troyer2012-05-181-1/+1
| | | | | | * add {create|delete|list|show} endpoint commands Change-Id: Ife9fa789d5818d63288b09687b43d802b1b97858
* Update service commandsDean Troyer2012-05-151-4/+11
| | | | | | | * add {create|delete} service * allow 'service' arg to also search type attribute in show command Change-Id: I992359dc95fab1fbdab0666d5cbb75e44ba6e0f3
* Move get_client_class() to common.utilsDean Troyer2012-05-111-1/+23
| | | | | | * add constants for API_NAME Change-Id: I8ccf72f032227e0a452d96303181549b1b11a5d1
* Add tenant CRUD commandsDean Troyer2012-05-111-0/+24
| | | | | | | | | * add {create|delete|set} tenant commands * move get_XXXX_properties() to common.utils.get_item_properties() add mixed_case_fields as an optional arg Change-Id: I7b3bd9cefb08e39730886b31213cbe422b5a8453
* Add API versioning supportDean Troyer2012-05-103-6/+16
| | | | | | | | | * Specific versions supported are managed in XXXXXX.client.py with a mapping from version to client class. This is based on the scheme that is included in novaclient; none of the other client libs have that capability. Change-Id: I930b197f1189e7f52c3b0096e73e0773cf925542
* look at the command the user is going to run before trying to authenticate themDoug Hellmann2012-05-101-3/+0
| | | | Change-Id: I4edc6a0f1e16be4cd80fe01f62869094b50ef120
* Add copyright notices and update datesDean Troyer2012-05-102-1/+18
| | | | Change-Id: I54a7d99328143205ab97ea930aeeeb69fe92c76c
* More identity client configDean Troyer2012-05-101-35/+8
| | | | | | | | | | | | | | * move auth option checking back to OpenStackShell() to keep the shell-level interaction at that level; add checking for token flow options * make identity.client.make_client() configure keystoneclient.v2_0.Client() properly for both password flow and token flow auth * eliminated ClientManager.init_token(), set _service_catalog in __init__() * compute client handles token flow Change-Id: I42481b5424489387798c4ec6d3e2a723ab1e6067
* Remove printtDean Troyer2012-05-071-54/+0
| | | | | | | | Remove unused common.utils functions prettyprint 0.6 removed printt at the last minute, our references to it turned out to be in unused code; remove it. Change-Id: I38a4d9a169beaecfd53eafc5b10f06201bac0c31
* Add Identity to ClientManagerDean Troyer2012-05-041-13/+11
| | | | | | | | * Make the Identity client in identity.client.make_client() * Auth via ClientManager.identity * Skip extra auth roundtrip in compute client Change-Id: I0190639e38f83997c233195f6cc27ff3afdfba10
* Fix "help" command and implement "list server" and "show server"Doug Hellmann2012-05-041-0/+107
| | | | | | | | | | | blueprint client-manager blueprint nova-client bug 992841 Move the authentication logic into a new ClientManager class so that only commands that need to authenticate will trigger that code. Implement "list server" and "show server" commands as examples of using the ClientManager, Lister, and ShowOne classes. Change-Id: I9845b70b33bae4b193dbe41871bf0ca8e286a727
* Add 'list service' command and common modulesDean Troyer2012-04-272-0/+182
|
* Set up common utilsDean Troyer2012-04-251-1/+7
|
* Add openstackclient bitsDean Troyer2012-04-192-0/+117