summaryrefslogtreecommitdiff
path: root/troveclient
Commit message (Collapse)AuthorAgeFilesLines
* Support region in CLItrain-em3.0.1stable/trainLingxian Kong2020-09-151-1/+2
| | | | Change-Id: Ia0580a599fc2385d54def4e18e0780209b82eff7
* Support to create public instanceLingxian Kong2019-09-114-43/+63
| | | | | | | | | Add two params for creating instance: '--is-public' and '--allowed-cidr' Change-Id: I3bc69e3d56d250b562543f0de2c78c05fcaefead Story: 2006500 Task: 36469
* Support backup filteringLingxian Kong2019-08-254-15/+88
| | | | | | | | | | | | | | 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-062-1/+14
| | | | Change-Id: If48449acf7037ffb04e1b5b9d1c4b059ea629055
* Merge "Restore the index method for Management class"2.18.0Zuul2019-06-061-0/+4
|\
| * Restore the index method for Management classLingxian Kong2019-06-061-0/+4
| | | | | | | | Change-Id: Id9c9e6352742c672ae3f2764c42dd984c8202544
* | Support to batch delete database instancesLingxian Kong2019-06-064-22/+97
|/ | | | | | | | Allow users to delete database instances in batch, usage: usage: openstack database instance delete [-h] instance [instance ...] Change-Id: I88a15ba1910f7b3294067b54ae4a7a9b4c4a17a5
* Get all the database instances by adminLingxian Kong2019-05-219-73/+124
| | | | | | | | | | | | | | 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-026-25/+23
| | | | | | | 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-122-2/+15
| | | | | | | | | | | | | | | | | | | 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>
* Fix wrong keyword argumentsYotaro Konishi2018-10-022-2/+16
| | | | | | | | | | | | Currently 'openstack database flavor list' command fails when using '--datastore-type' and '--datastore-version-id' options. This change fixes the issue by correcting keyword arguments. This change also adds a test case of listing flavors with the optional arguments. Change-Id: I37be4911d4dda1529e2550344a912e0aa3c50558 Closes-Bug: #1794663
* Merge "Replace assertRaisesRegexp with assertRaisesRegex"Zuul2018-09-262-13/+13
|\
| * Replace assertRaisesRegexp with assertRaisesRegexChuck Short2018-08-272-13/+13
| | | | | | | | | | | | | | | | This replaces the deprecated (in python 3.2) unittest.TestCase method assertRaisesRegexp() with assertRaisesRegex(). Change-Id: Ib260a6549a7a957fc1b91b89156a676922142b04 Signed-off-by: Chuck Short <chucks@redhat.com>
* | Merge "Fix python3 compatibility issues"Zuul2018-09-093-3/+5
|\ \
| * | Fix python3 compatibility issuesMarcin Piwowarczyk2018-08-313-3/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While executing functional tests in trove project, with baseptyhon python3 in change [1], there appears few incompatibilities in troveclient. All of them are directly related to differences in PY3 version. This change removes these issues and will allow to execute functional tests seamlessly. Change details: * troveclient/compat/base.py - dict.iteritems was removed in PY3 because dict.items now does the thing dict.iteritems did in PY2 * troveclient/compat/client.py - json.loads expects string, and PY3 doesnt convert bytes to string. We have to use explicity call decode() which will decode given bytes to string * troveclient/apiclient/base.py - to avoid infinite recursion exception raised when pickling class attributes [1] I9ee34642c700d1e6ba9c2f3891b7fa1f7f7e1e1d Change-Id: I8989fd4798e80eae27408017e1543819a68b4ab1 Signed-off-by: Marcin Piwowarczyk <m.piwowarczy@samsung.com>
* | Sync two parameters of cluster-create to OSCzhanggang2018-08-213-10/+46
|/ | | | | | | | | | | | | 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-074-3/+36
| | | | | | | | | | | | | | | | | 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-064-3/+58
|\
| * Add extended properties support for mongo cluster.zhanggang2018-07-314-3/+58
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge "Add promote-to-replica-source to OSC"rocky-em2.16.0Zuul2018-07-182-0/+41
|\ \
| * | Add promote-to-replica-source to OSCwangyao2018-07-172-0/+41
| |/ | | | | | | | | | | | | | | | | | | | | This change adds database support to the python-openstackclient project for the promote-to-replica-source command. The trove command promote-to-replica-source is now: openstack database instance promote to replica source Change-Id: I0009b3e1074ddabaed6b02f5578f28cffc995b30 Partially-Implements: blueprint trove-support-in-python-openstackclient
* | Merge "Add execution-delete to OSC"Zuul2018-07-182-0/+34
|\ \
| * | Add execution-delete to OSCwangyao2018-07-172-0/+34
| |/ | | | | | | | | | | | | | | | | | | | | This change adds database support to the python-openstackclient project for the execution-delete command. The trove command execution-delete is now: openstack database backup execution delete Change-Id: I9934a047d48daed53567b59bb51a2eab4d6e37b5 Partially-Implements: blueprint trove-support-in-python-openstackclient
* | Merge "Add configuration-default to OSC"Zuul2018-07-173-0/+56
|\ \
| * | Add configuration-default to OSCwangyao2018-07-173-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds database support to the python-openstackclient project for the configuration-default command. The trove command configuration-default is now: openstack database configuration default Change-Id: I9403df629e893bb1c4d75566cffd3d49697a543d Partially-Implements: blueprint trove-support-in-python-openstackclient
* | | Add detach-replica to OSCwangyao2018-07-172-0/+41
|/ / | | | | | | | | | | | | | | | | | | | | This change adds database support to the python-openstackclient project for the detach-replica command. The trove command detach-replica is now: openstack database instance detach replica Change-Id: Ia6034eccbd3490696270d44d00966c3da94b3999 Partially-Implements: blueprint trove-support-in-python-openstackclient
* | Merge "Add log-list to OSC"Zuul2018-07-174-0/+122
|\ \
| * | Add log-list to OSCwangyao2018-07-174-0/+122
| |/ | | | | | | | | | | | | | | | | | | | | This change adds database support to the python-openstackclient project for the log-list command. The trove command log-list is now: openstack database log list Change-Id: If048a653df01244882a451e3fddf28a8faac59f6 Partially-Implements: blueprint trove-support-in-python-openstackclient
* | Merge "Add configuration-instances to OSC"Zuul2018-07-174-1/+87
|\ \
| * | Add configuration-instances to OSCwangyao2018-07-124-1/+87
| |/ | | | | | | | | | | | | | | | | | | | | This change adds database support to the python-openstackclient project for the configuration-instances command. The trove command configuration-instances is now: openstack database configuration instances Change-Id: I4ad52cc8772534c95b708b49d018f4b2e35d6f86 Partially-Implements: blueprint trove-support-in-python-openstackclient
* | Merge "Add eject-replica-source to OSC"Zuul2018-07-172-0/+40
|\ \
| * | Add eject-replica-source to OSCwangyao2018-07-132-0/+40
| |/ | | | | | | | | | | | | | | | | | | | | This change adds database support to the python-openstackclient project for the eject-replica-source command. The trove command eject-replica-source is now: openstack database instance eject replica source Change-Id: I674e78e310b2953b28d0829cbe6fda62c00b6ea8 Partially-Implements: blueprint trove-support-in-python-openstackclient
* | Merge "Replace 'raise StopIteration' with 'return'"Zuul2018-07-161-2/+2
|\ \ | |/ |/|
| * 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
* | Correctly mocking builtin open in test_v1_shellZhao Chao2018-07-101-9/+2
|/ | | | | | | | | | | | There's now a seperate module 'builtins' from python-future(this package is now installed by stestr, and stestr in required by oslotest-3.6.0), so under Python 2.x 'builtins' is also imported as a module and 'bultins.open' is mocked instead of '__builtin__.open'. And according to the Mock document, we should always patch the object where it's looked up, so only necessary mocking is made in this patch. Change-Id: I57ea61cefd3b01b19475b0fa7e16f716eaaa14e6 Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
* Add cluster-modules to OSCwangyao2018-06-204-0/+109
| | | | | | | | | | | This change adds database support to the python-openstackclient project for the cluster-modules command. The trove command cluster-modules is now: openstack database cluster modules Change-Id: Ib16578de1520163e9b9bc6894a079e8f0fcef37b Partially-Implements: blueprint trove-support-in-python-openstackclient
* Merge "Fix invalid mock in OSC cluster creating unittest"Zuul2018-03-011-7/+15
|\
| * Fix invalid mock in OSC cluster creating unittestZhao Chao2018-02-131-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As '_parse_instance_options' is imported into database_clusters, mocking destination should be the database_clusters module, not the original troveclient.v1.shell. The reason this test passed before this patch is, the return value of '_parse_instance_options' is not checked, i.e. the mock object is also useless. This patch also checks how troveclient.v1.clusters.create is called to ensure '_parse_instance_options' is correctly mocked. Change-Id: I903a3b9565e4044c33401a6abcc47d50a5a2567f Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
* | Merge "Add cluster-grow and cluster-shrink to OSC"Zuul2018-02-213-12/+127
|\ \
| * | Add cluster-grow and cluster-shrink to OSCZhao Chao2018-02-133-12/+127
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds database support to python-openstackclient project for the cluster-grow and cluster-shrink commands. The trove command cluster-grow is now: openstack database cluster grow The trove command cluster-shrink is now: openstack database cluster shrink Change-Id: I449e7f7d841ea266611ff79f8a41f6e730fced3c Partially-Implements: blueprint trove-support-in-python-openstackclient Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
* | 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
* Handle error response for webob>=1.6.0Zhao Chao2018-02-063-4/+75
| | | | | | | | | | | | | | | | | | | WebOb change https://github.com/Pylons/webob/pull/230 changed the way in which the error response body is formatted such that it's no longer a nested dict. So we have to handle both the old convention of an error message key to the response body error dict and the new way with just the error body dict. This was reported upstream: https://github.com/Pylons/webob/issues/235 But given this was apparently implemented as a long-overdue change in WebOb the behavior is not likely to change. Change-Id: Id8bfde6277640de48768bbe5a5e4252b97253ed2 Closes-Bug: #1559072 Co-Authored-By: Matt Riedemann <mriedem@us.ibm.com> Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
* Merge "Fix log-enable high priority error"Zuul2018-01-232-4/+5
|\
| * Fix log-enable high priority errorqueens-em2.14.0caishan2018-01-222-4/+5
| | | | | | | | | | | | | | | | | | | | | | 1. Modify setup.cfg to make command openstack database log enable run correctlly. class EnableDatabaseInstanceLog should be in database_instances, not in database_limits. This is a HIGH priority error. 2. Originally, trove log-enable will return a log info when execute successfully. This change makes OSC log_enable acts like the origin troveclient enable_log. Change-Id: I68c5ef451c8e6c7fb189d6270bad002da7ffc9a6
* | Add 'update' command to OSCZhao Chao2018-01-222-0/+78
|/ | | | | | | | | | | | This change adds database support to the python-openstackclient project for the 'update' command. The trove command update is now: openstack database instance update Change-Id: I426c892540f82bc19b7b28d7845a2f6699c3f526 Partially-Implements: blueprint trove-support-in-python-openstackclient Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
* Add restart to OSCcaishan2018-01-212-0/+40
| | | | | | | | | | | This change adds database support to the python-openstackclient project for the restart command The trove command restart is now: openstack database instance restart Change-Id: I24eeb001d27eae39be5c33650e9bc04287053c8c Partially-Implements: blueprint trove-support-in-python-openstackclient
* Add log-enable to OSCcaishan2018-01-212-0/+45
| | | | | | | | | | | This change adds database support to the python-openstackclient project for the log-enable command The trove command log-enable is now: openstack database log enable Change-Id: Ia5bb395264946f79673970336e4c1f23857bb77d Partially-Implements: blueprint trove-support-in-python-openstackclient
* Merge "Add force-delete to OSC"Zuul2018-01-214-0/+110
|\