summaryrefslogtreecommitdiff
path: root/troveclient/v1
Commit message (Collapse)AuthorAgeFilesLines
* Support backup strategyLingxian Kong2020-07-163-1/+66
| | | | Change-Id: Ic8c20109b287f2f9220379cb249669d18b52893d
* Stop to use the __future__ module.Hervé Beraud2020-06-021-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The __future__ module [1] was used in this context to ensure compatibility between python 2 and python 3. We previously dropped the support of python 2.7 [2] and now we only support python 3 so we don't need to continue to use this module and the imports listed below. Imports commonly used and their related PEPs: - `division` is related to PEP 238 [3] - `print_function` is related to PEP 3105 [4] - `unicode_literals` is related to PEP 3112 [5] - `with_statement` is related to PEP 343 [6] - `absolute_import` is related to PEP 328 [7] [1] https://docs.python.org/3/library/__future__.html [2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html [3] https://www.python.org/dev/peps/pep-0238 [4] https://www.python.org/dev/peps/pep-3105 [5] https://www.python.org/dev/peps/pep-3112 [6] https://www.python.org/dev/peps/pep-0343 [7] https://www.python.org/dev/peps/pep-0328 Change-Id: I73b532283079d346b75a925e2aee707c4de8fa9e
* Remove flavor APILingxian Kong2020-05-084-150/+5
| | | | Change-Id: I5a35911b5658fdf6bc08844b31cc1325b749526a
* Update hacking for Python33.3.1Andreas Jaeger2020-03-311-1/+1
| | | | | | | | | The repo is Python 3 now, so update hacking to version 3.0 which supports Python 3. Fix problems found. Change-Id: I5da442bb2f1e634e6b3fe37a6ea3820cea1db96f
* Support to delete datastoreLingxian Kong2020-01-121-0/+4
| | | | Change-Id: Id0fe73eef95bb57ecee706b9eb9b7aae53236e3b
* Support to delete datastore versionLingxian Kong2020-01-071-12/+3
| | | | | | usage: openstack datastore version delete <datastore_version_id> Change-Id: I4b781e68b81a3888d15d002fcf488a1f765c9f6a
* Support log tail/save for instanceLingxian Kong2019-12-162-20/+18
| | | | | | | | | Support to show log content and save instance log files: openstack database log tail [--lines LINES] <instance> <log_name> openstack database log save [--file FILE] <instance> <log_name> Change-Id: I2a4eecca663f9126f770fae4c4be28b3667f91c4
* Support log actions in osc pluginLingxian Kong2019-12-162-26/+15
| | | | | | | | - openstack database log show <instance_id> <log_name> - openstack database log set <instance_id> <log_name> [OPTIONS] Change-Id: I86f414a53e6f6416f96e0040635bb010aa49cf41
* Support to create public instanceLingxian Kong2019-09-111-1/+3
| | | | | | | | | Add two params for creating instance: '--is-public' and '--allowed-cidr' Change-Id: I3bc69e3d56d250b562543f0de2c78c05fcaefead Story: 2006500 Task: 36469
* Support backup filteringLingxian Kong2019-08-251-6/+8
| | | | | | | | | | | | | | To get all the backups of an instance: openstack database backup list --instance-id <instance-id> Admin user gets backups of all the projects: openstack database backup list --all-projects Story: #2006433 Task: #36346 Change-Id: I871d1ffa27805158024e8ecbe1dceae725c4deac
* Add Python 3 Train unit testsCorey Bryant2019-08-231-7/+12
| | | | | | | | | | | | | | | This is a mechanically generated patch to ensure unit testing is in place for all of the Tested Runtimes for Train. See the Train python3-updates goal document for details: https://governance.openstack.org/tc/goals/train/python3-updates.html Also fix the CI failure due to: https://docs.python.org/3/whatsnew/3.5.html#pep-479-change-stopiteration-handling-inside-generators Change-Id: Ica582f99730c5019a1212d4f58d7d854ad2996fd Story: #2005924 Task: #34254
* Add unit test for Management indexLingxian Kong2019-06-061-1/+1
| | | | Change-Id: If48449acf7037ffb04e1b5b9d1c4b059ea629055
* Restore the index method for Management classLingxian Kong2019-06-061-0/+4
| | | | Change-Id: Id9c9e6352742c672ae3f2764c42dd984c8202544
* Get all the database instances by adminLingxian Kong2019-05-212-22/+9
| | | | | | | | | | | | | | 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
* Update hacking versionZhijunWei2019-01-022-13/+13
| | | | | | | 1. update hacking version to latest 2. fix pep8 failed Change-Id: I49a6d46466b06bd56bed1f15632c9c80ef539b38
* Add python3 compatibility for guest logs featuresMarcin Piwowarczyk2018-10-301-2/+2
| | | | | | | | | | | | | | During working with python3-first goals, I have notticed the log_generator and log_save methods was non compliance with python3. This is what doesn't appears in integration tests because we execute only trove-functional-mysql job which doesn't covers guest-log tests. In separate change I will extend zull definition by scenario tests to avoid similar issues in future. Change-Id: If85dff57afe110991553d510c6af4468a6781f64 Signed-off-by: Marcin Piwowarczyk <m.piwowarczy@samsung.com>
* Add detailed list for instancesBartosz Zurkowski2018-10-121-2/+5
| | | | | | | | | | | | | | | | | | | Currently, listing instances only allows to get basic information about entities. To get the details, one need to query instance "show" endpoint for each instance separately. This is inefficient and exposes API to a heavier load. There are use cases in which we want to obtain detailed information about all instances. In particular, in services integrating with Trove. For example, Vitrage project requires this information to build vertices and edges in the resource graph for RCA analysis. This change extends Trove client by optional parameter allowing user to specify whether API should include more instance details in the response. Change-Id: Iecea2f711a3e23fd63167beb6cab4cecc63bcabe Signed-off-by: Bartosz Zurkowski <b.zurkowski@samsung.com>
* Sync two parameters of cluster-create to OSCzhanggang2018-08-211-3/+7
| | | | | | | | | | | | | The previous patches have add configuration and extended_properties to "trove cluster-create"[1][2], this commit add the two paramenters to OSC, user can pass configuration and extended_properties during "openstack database cluster create". [1] https://review.openstack.org/#/c/583125/ [2] https://review.openstack.org/#/c/589047/ Change-Id: Ic8e3ba4e92d3b65fa65875675f58eead5827976a Signed-off-by: zhanggang <zhanggang@cmss.chinamobile.com>
* Support configuration groups for clustersMarcin Piwowarczyk2018-08-072-2/+10
| | | | | | | | | | | | | | | | | Handles API part implemented in change: I7c0a22c6a0287128d0c37e100589c78173fd9c1a So far passing configuration group was possible only for single instance deployment. As the trove api now already supports configuration attach and detach for clusters, we are able to handle it in client. Configuration will be applied to each cluster instance. Partially implements: blueprint cluster-configuration-groups Change-Id: Ic0840c995cbc34203c76494d7ba522f3e17141a7 Signed-off-by: Marcin Piwowarczyk <m.piwowarczy@samsung.com>
* Merge "Add extended properties support for mongo cluster."Zuul2018-08-062-2/+25
|\
| * Add extended properties support for mongo cluster.zhanggang2018-07-312-2/+25
| | | | | | | | | | | | | | | | | | | | | | User can specify the number and volume of mongos/configserver with extended_properties argument when creating mongodb. Currently, the supported parameters are, num_configsvr, num_mongos, configsvr_volume_size, configsvr_volume_type, mongos_volume_size and mongos_volume_type. Change-Id: I35406f9967ce00a51b320eda37572e96228b209d Signed-off-by: zhanggang <zhanggang@cmss.chinamobile.com>
* | Replace 'raise StopIteration' with 'return'Dougal Matthews2018-06-291-2/+2
|/ | | | | | | | | | With PEP 479, the behaviour of StopIteration is changing. Raising it to stop a generator is considered incorrect and from Python 3.7 this will cause a RuntimeError. The PEP recommends using the return statement. More details: https://www.python.org/dev/peps/pep-0479/#examples-of-breakage Change-Id: If53f0f4c313a699a4036838ab6035fffa931931b
* Clean imports in codeNguyen Hung Phuong2018-02-211-3/+3
| | | | | | | | | In some part in the code we import objects. In the Openstack style guidelines they recommend to import only modules. [1]: "Do not import objects, only modules". [1] https://docs.openstack.org/hacking/0.10.3/ Change-Id: I8dd5396ab604013639a0b626ce3ecd3e3fad12e8
* Merge "Fix error with configuration-parameter-show"Zuul2017-12-251-0/+5
|\
| * Fix error with configuration-parameter-showwangyao2017-12-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | According bug description, there will be an error when use configuration-parameter-show without version_id and datastore. To fix this problem, I add an judgement for use the cmd without parameter datstore and datastore_version not like an uuid. Now in such a case, the cmd will has an exception info. Change-Id: I01fd56bad80f389da369be90dff5c89b05e6a8dc Closes-Bug: #1363065
* | Merge "Use ID instead of Name in secgroup_delete_rule"Zuul2017-12-211-1/+1
|\ \ | |/ |/|
| * Use ID instead of Name in secgroup_delete_rulezhanggang2017-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | In trove secgroup_delete_rule help message, the parameters <security_group_rule> is described "Name of security group rule". In fact, security group rule has not attribute 'name', it only has 'id'. Users could use trove secgroup-list-rules to get all ID of rules. Change-Id: If5b97f744b24838e6aa61f4c96608da569886dd2
* | Merge "Support delete and cluster_delete with many resources"Zuul2017-12-211-14/+16
|\ \ | |/ |/|
| * Support delete and cluster_delete with many resourceswangyao2017-12-211-14/+16
| | | | | | | | | | | | | | | | | | Not like nova-delete when use trove-delete there is only support delete an instance everytime. With this patch, we can delete many instances or clusters in the same call, like trove delete instance1 instance2. Change-Id: I6bb0c406ba7f4c0e43cddfdff1d156b7e82ffa7a
* | Merge "Fix datastore abnormal display with trove list"Zuul2017-12-201-2/+2
|\ \
| * | Fix datastore abnormal display with trove listwangyao2017-11-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | According bug description, the datastore display abnormal when use trove list. Change-Id: Ia1dda1c2fb6822ea991afbdf3a67819c262e49a8 Closes-Bug: #1734846
* | | Fix datastore abnormal display with trove backup-showwangyao2017-11-291-0/+6
|/ / | | | | | | | | | | | | | | | | | | | | According bug description, the datastore display abnormal when use trove backup-show. The cause of the problem is method _print_object unformatted datastore from result. Fix by formatted datastore where necessary. Change-Id: Ifbcc8312e52eb3d052f5d24645d4d243ec50aed7 Closes-Bug: #1735157
* | Merge "Fix networks abnormal display with trove show"Zuul2017-11-271-0/+3
|\ \ | |/ |/|
| * Fix networks abnormal display with trove showwangyao2017-11-271-0/+3
| | | | | | | | | | | | | | | | | | According bug description, the networks display abnormal when use trove show. The cause of the problem is method _print_instance unformatted networks from result. Change-Id: I30e27b731f67ab7c31e30af8ab9bb3e499e27dfa Closes-Bug: #1734710
* | Merge "Add proper message when delete instance or cluster"Zuul2017-11-171-4/+12
|\ \ | |/ |/|
| * Add proper message when delete instance or clusterwangyao2017-11-101-4/+12
| | | | | | | | | | | | | | | | | | According bug description, not like nova-delete when use trove-delete there is no message or alert is generated. To solve this problem, I added some message when normally execute deleting instance or cluster. Change-Id: I572a24116fd1abec220f49a3f9705a5c071155bf Closes-Bug: #1569669
* | Merge "Remove extra parameter 'backup' in backup-create"Zuul2017-11-112-28/+2
|\ \
| * | Remove extra parameter 'backup' in backup-createint32bit2017-08-222-28/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parameter 'backup' in backup-create is never read by our Trove API[1], so I guess it's a extra key argument for history reason. In addition, the 'backup-copy' subcommand should be removed as well because it does not support in current Trove API. [1] https://github.com/openstack/trove/blob/master/trove/backup/service.py#L61-L77 Change-Id: I33d439e0037efd4573eeae186758fd778ba5c514
* | | Merge "ESFIX:Fix troveclient error with Chinese character"Zuul2017-11-081-1/+2
|\ \ \ | |_|/ |/| |
| * | ESFIX:Fix troveclient error with Chinese characterjiansong2017-11-031-1/+2
| |/ | | | | | | | | | | | | | | | | Now troveclient does not support returning Chinese characters, so to make changes.This should also avoid other unicode output problems Change-Id: Ie948cff4e81806f17c697f50271992cc492c48f4 Closes-Bug: #1720490
* | Fix "trove module-instances" command which don't work.wlhc2017-11-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "trove module-instances" command don't work. cat <<EOF>> myping.data message=Module.V1 EOF trove module-create myping ping myping.data trove module-apply \ 7d95769f-1912-4e77-8b86-d9a4eb48cd2e myping trove module-instances myping ERROR: Module with ID 7d95769f-1912-4e77-8b86-d9a4eb48cd2e \ could not be found. Change-Id: I30c2e698bd1ea90cc8fdf0dc5e3a5b087ca2bec2 Closes-Bug: #1664472
* | Fix trove schedule-list errorwangyao2017-10-021-2/+2
|/ | | | | | | | | | When I set parameter TROVE_BYPASS_URL in admin_openrc.sh,the cmd schedule-list return error message. Debug detail as follow: [root@trove ~]# trove --debug schedule-list rds-120 DEBUG (shell:754) HTTPClient object has no attribute username Change-Id: I09d1d65683409da38a299675d88b90b29e34ea78 Closes-Bug: #1677438
* turn on warning-is-error for documentation buildsDoug Hellmann2017-07-132-8/+8
| | | | | | | | | Fix a bunch of formatting issues with docstrings to allow us to turn on the flag that treats warnings as errors to avoid mal-formed documentation in the future. Change-Id: Ic6fb73031e37314c49c41e4621dfd92b9c3f59d5 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
* Merge "Add related_to help message for instance help"Jenkins2017-06-151-1/+2
|\
| * Add related_to help message for instance helpjiansong2017-06-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | We have been change the mongodb cluster scaling related changes in the Liberty version[1], as mongodb cluster grow the necessary variables,we should displayed in the help message to expose it, rather than hide it. So made this change. [1]:https://specs.openstack.org/openstack/trove-specs/specs/liberty/cluster-scaling.html#cluster-grow Change-Id: I45f5702f7645aa7855f8140bcd5ec83e2c76eeae
* | Merge "Update reset-status docstring"Jenkins2017-06-111-1/+4
|\ \
| * | Update reset-status docstringAli Adil2017-01-161-1/+4
| | | | | | | | | | | | | | | | | | Added more information for reset-status docstring. Change-Id: I4ab194029e5bfbca990984be707f727081bf5907
* | | Enable user/db operations on clustersPetr Malik2017-04-181-11/+11
| |/ |/| | | | | | | | | | | | | Accept cluster ids in user and database API and route the requests on the single instance interface. Implements blueprint: datastore-specific-api-extensions Change-Id: I9cfa048cdee7c9eb18787957fb69e14e05dd4128
* | Merge "Client changes for datastore-version volume-types"Jenkins2017-04-113-0/+96
|\ \ | |/ |/|
| * Client changes for datastore-version volume-typesMatt Van Dijk2016-11-293-0/+96
| | | | | | | | | | | | | | | | | | Add trove client support for new volume-types listing and datastore version association listing. Co-Authored-By: amrith <amrith@tesora.com> Change-Id: Iafcd8d068b85c1993fac0471c04e57478c122bfe Depends-on: I790751ade042e271ba1cc902a8ef4d3c3a8dc557