summaryrefslogtreecommitdiff
path: root/troveclient/common.py
Commit message (Collapse)AuthorAgeFilesLines
* Get all the database instances by adminLingxian Kong2019-05-211-1/+1
| | | | | | | | | | | | | | Currently, there is no way for the admin user to get databases of all the projects, which is very important for auditing or billing purpose. With this change, admin user can get all the database instances by running: $ openstack database instances list --all-projects Change-Id: I318907b1d4a63017f4a6f7967312770f8784c1f4 Story: #2005735 Task: #33393
* move old apiclient code out of openstack/commonSteve Martinelli2016-11-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | As part of the first community-wide goal [1], teams were asked to remove the openstack/common package of their projects if one existed. This was a byproduct of the old oslo-incubator form of syncing common functionality. The package, apiclient, was moved to a top level location and cliutils was moved to the common module. There are no oslo specific libraries, the recommended solution is to move it in tree and maintain it there. Specifically in this patch, I also rearranged some of the imports to make them match up with the hacking guidelines while I was re-ordering them for the refactor anyway. Lastly, the apiclient/fake_client.py was deleted since it was not used. [1] http://governance.openstack.org/goals/ocata/remove-incubated-oslo-code.html Change-Id: Ib7b691240b819c9c91b100ca47ffaba75b281c78
* Avoid use xx=[] for parameter in functionjiansong2016-10-191-1/+3
| | | | | | | | | | | Use xx = [] for the parameter for function, this parameter will only be initialized at the first call, this is should be avoided. Better choice is to set the initial value to None, then the initialization time use xx= xx or [] more information:http://effbot.org/zone/default-values.htm Change-Id: Icbade7dd4c7d231ae65fd4f8de673b484bab721c
* Fix troveclient to support MistralMorgan Jones2016-05-261-26/+2
| | | | | | | | | | | | | | | Mistral gets confused by Trove's (aguably wrong) inclusion of a member called 'items' in the Pagenated object that Trove returns as the result of 'list' client methods. This change changes Pagenated to inherit from the 'list' class so that the items method is not required (and has the additional benefit of just generally being a better implementation of a list type result). Change-Id: I683120451f69f07f131e6fa422c082f85735b196 Closes-bug: 1585705 Depends-On: Id674ae57bfcdc5e09bde1e323a614b3a03a7cad3
* Add datastore filter to backup-listSteve Leon2014-06-031-9/+5
| | | | | | | | | | | | | | | This fix enhances the backup-list command to optionally receive a datastore name or ID to filter the backup list by. The filter is sent as a query string. To attach the query string to the URL and have it still work with the URL for pagination, i have made some changes in the way url with query strings are constructed. This includes the pagination URL. partially implements: blueprint backup-metadata Change-Id: I0b9ef3ec7f51ed76517a22f9c0edfdce3694a36f
* Merge "Remove dependent module py3kcompat"Jenkins2014-04-251-4/+3
|\
| * Remove dependent module py3kcompatllg82122014-02-181-4/+3
| | | | | | | | | | | | | | | | | | | | | | Module py3kcompat was removed from oslo-incubator, we can use six directly. * Sync commit of removing py3kcompat from oslo * use six replace usage of py3kcompat Change-Id: I15b9ffb10e2d5765a1ed07dd5fd4e2bf7b21ec49 Closes-Bug: #1280033
* | Remove vim headerHe Yongli2014-02-161-2/+0
|/ | | | | | | | | | | No need to set tabstop tons of times, this can be set in your vimrc file instead. More disucssion: http://openstack.10931.n7.nabble.com/Remove-vim-modelines-td21780.html Change-Id: I45766d91f0c0b3622bbdc7dc5517497c87ebee8c Closes-Bug: #1229324
* Updates common.check_for_exceptions and its callsSushil Kumar2014-01-231-3/+3
| | | | | | | | | | | | | | | Reasons: - exceptions.from_response has 3 arguments but is being called with one argument less, which is url. Changes: - Updated common.check_for_exceptions to support urls as needed by troveclient.openstack.common.apiclient.exceptions.from_response. - Adds url to exceptions.from_response calls in troveclient. Closes-Bug: #1266239 Change-Id: Ie18c90349479f740369f63c48a8d9b463641f84d
* Tighten flake8 checks in GatingDirk Mueller2013-12-181-2/+3
| | | | | | | | | | | There are a few checks that already pass: - F401 - unused imports of modules - F403 - ‘from module import *’ used; unable to detect undefined names And there are two (H401 and H403) that can be made passing easily. Enable gating on all of them. Change-Id: I9d3c49ecea1b2171d194ab6cc751316c252081e8
* Removes unused import statementsDebasish Chowdhury2013-11-301-8/+0
| | | | | Change-Id: If229aa3f6e1009e1abfba13aba3970bdf2dd3761 closes-bug: #1255885
* Merge "Replace urllib.quote with urlutils.quote"Jenkins2013-10-231-3/+3
|\
| * Replace urllib.quote with urlutils.quoteKui Shi2013-10-231-3/+3
| | | | | | | | | | | | | | | | quote is defined in urlutils for Python2&3 compatability. Partial implements: blueprint py33-support Change-Id: I81e667c76544b6bafd81d51d788158f6a062a90c
* | Fixing copyright and license headersMichael Basnight2013-10-221-1/+5
|/ | | | | | * Added HP copyrights as appropriate Change-Id: If4f30b0caf03b16f5fb4f54185ba80d9fa41d0b0
* Removing lxml/httplib2 dependsMichael Basnight2013-10-101-1/+0
| | | | | | These depends are compat only. They dont need to be listed as deps. Change-Id: Ia5718865100148d149e9c7657ace78cb08cacbac
* Massive refactoring to the troveclientMichael Basnight2013-10-091-348/+2
| | | | | | | | | | | | | | | | The new client adheres to the standards of the other clients now. It prints out tables, uses ENVVAR's for auth, no longer stores pickled json in a login token, uses openstack common, and moves the cli operations into a v1 module for the future of trove when it has a v2 api. Please note for compatibility, the troveclient.compat module has the old cli. In order to deploy it, amend the setup.cfg to include the compat module. implements blueprint cli-compliance-upgrade Change-Id: Ie69d9dbc75ce90496da316244c97acca1877a327
* Remove trove as default value for Service NameVipul Sabhaya2013-09-231-1/+1
| | | | | | | | | * This causes service catalog lookup issues when the Catalog contains service_type = database, but service_name = somethine_else fixes bug 1228372 Change-Id: I1f7eebb06d7f57c0ecc95d8c05104f43e803c406
* Replace OpenStack LLC with OpenStack FoundationZhiQiang Fan2013-09-201-1/+1
| | | | | | | | Some files still use trademark OpenStack LLC in header, which should be changed to OpenStack Foundation. Change-Id: Ib30cd06cdd13b9f949e028753716aa55736f4a40 Fixes-Bug: #1214176
* PEP8 with tox -epep8 check failsDenis M2013-08-301-31/+33
| | | | | Change-Id: Ife06919f321ab4ad73bece2e6080fbd7d947eeef Fixes: bug #1219014
* API for Modify User Attributes - username, host, passwordRiddhi Shah2013-07-251-0/+21
| | | | | | | | | | | At present, when a Cloud Database user creates a username, password and hostname for a database user, he does not have the ability to modify these user attributes. This API enables the Cloud DB user to make changes to one or more of these user attributes (username,hostname,password). These changes are in the troveclient to enable simple command line requests Implements: blueprint modify-userattributes Change-Id: I0887f2d927eec8c77c0f562c9d855a370591231a
* Rename from reddwarf to trove.0.1.3Michael Basnight2013-06-211-0/+406
Implements Blueprint reddwarf-trove-rename Change-Id: Ib2d694c7466887ca297bea4250eca17cdc06b7bf