summaryrefslogtreecommitdiff
path: root/troveclient/tests/test_instances.py
Commit message (Collapse)AuthorAgeFilesLines
* Support getting and updating instance access infoLingxian Kong2020-08-111-23/+2
| | | | | | | * Added "public" and "allowed_cidrs" fields for getting instance. * Added '--is-public/--is-private' and '--allowed-cidr' for updating. Change-Id: Ifc919667e83573bd6c3b7aff205fe08e82667457
* Use unittest.mock instead of third party mockSean McGinnis2020-04-181-1/+1
| | | | | | | | Now that we no longer support py27, we can use the standard library unittest.mock module instead of the third party mock lib. Change-Id: Ib83e626f51e6e01898bb7931c1660a1a548500f3 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* 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
* Add detailed list for instancesBartosz Zurkowski2018-10-121-0/+10
| | | | | | | | | | | | | | | | | | | 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>
* Add module-instance-count commandPeter Stachowski2017-01-051-0/+50
| | | | | | | | | | | | | | | | | | | | Added a --count_only flag to the call for module instances to return a summary of the applied instances based on the MD5 of the module (this is most useful for live_update modules, to see which ones haven't been updated). Added a new module-instance-count command. This was done to facilitate getting the summary, since it returns a different result set. It basically calls the same python interface as module-instances, but adds the --count_only flag. Also added some missing tests. Change-Id: Iea661166bf3a4f3520a590da5954aedcd0036243 Partial-Bug: #1554900 Depends-On: I4caf4a57226dd711575cde766076fa25d16792e2
* Time to get rid of slave_ofjiansong2016-12-231-7/+2
| | | | | | Now liberty is end of life,so we can get rid of slave_of Change-Id: I429a95018a58a92576c52e0a9bc6b1b817c408ea
* Implement Instance UpgradeMorgan Jones2016-08-161-0/+10
| | | | | | | | | This change includes a new "trove upgrade" CLI command and a new "Instances.upgrade" python API method to implement the new Instance Upgrade feature. Change-Id: I6ec2ebb78019c014f87ba5d8cbfd284686c64f30 Implements: blueprint image-upgrade
* Merge "Locality support for replication"Jenkins2016-06-241-1/+5
|\
| * Locality support for replicationPeter Stachowski2016-05-021-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to allow replication sets to be all on the same hypervisor (affinity) or all on different hypervisors (anti-affinity) a new argument (locality) needed to be added to the Trove create API. This changeset addresses the Trove client part of this feature. A --locality flag is now available on the 'create' command and is passed to the server for processing. The --replica_count argument was also cleaned up in that it's not passed on unless it is set. If --replica_of is specified, the default is set to '1.' DocImpact: New functionality Partially implements: blueprint replication-cluster-locality Change-Id: I18f242983775526a7f1e2644302ebdc0dac025cf
* | Fix troveclient to support MistralMorgan Jones2016-05-261-4/+0
|/ | | | | | | | | | | | | | | 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
* Client support for instance module feature2.2.0Peter Stachowski2016-03-111-1/+3
| | | | | | | | | | | | | | | | | This adds support in the python API and Trove CLI for instance module commands. These commands include: - module-apply - module-remove - module-query - module-retrieve - module-list-instance The parsing of --instance was modified to allow multiple modules to be specified. This was extended to 'nics' as well. Partially Implements: blueprint module-management Change-Id: If62f5e51d4628cc6a8b10303d5c3893b3bd5057e
* Revert "Time to get rid of any last vestiges of slave_of"2.1.1Matt Riedemann2016-03-081-4/+16
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit a5234f0a07230e0d8195687e033adfe4cc0ad522 The change broke trove on stable/liberty since it's a backward incompatible change. To avoid capping python-troveclient<2.1.0 in stable/liberty global-requirements, we have to revert this change, blacklist the 2.1.0 version in g-r master and stable/liberty, and then release 2.2.0. And the slave_of code can't be removed until the last supported stable branch that uses it is end of life, which is liberty-eol. For now we keep the slave_of argument in the instance.create method, but emit a deprecation warning if it's specified, and we never pass it to the trove API for the create or edit operations since the API removed slave_of in 0c94a5bae0aacff7fde9a9742b7d526096e51767. Change-Id: I9b3ec6c101a89f30e61fc683808506c404e5474f Partial-Bug: #1538506
* Add instance name as parameter to CLIDoug Shelley2014-12-081-17/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow CLI to take instance name as well as instance id for sub-commands where instance can be specified. This commit does not include the metadata-* commands as the backend for that feature isn't merged. The spec will be adjusted to reflect that they commands will be out of scope. Affected sub-commands are: backup-create backup-list-instance configuration-attach configuration-default configuration-detach create (just for --replica_of) database-create database-delete database-list detach-replica delete resize-flavor resize-instance resize-volume restart root-enable root-show update user-create user-delete user-grant-access user-list user-revoke-access user-show user-show-access user-update-attributes Unit tests were added to test passing in an instance object for the affected sub-commands. A new set of unit tests were added for databases.py (doesn't look like any existed before). Change-Id: I5554a7d423990ff9cb24437a893d90d212b022b1 blueprint: add-instance-name-to-cli
* Clusters troveclient Implementationamcrn2014-09-021-1/+3
| | | | | | | | | | | | adds clusters support to the troveclient. Co-Authored-By: Ranjitha Vemula <rvemula@ebaysf.com> Co-Authored-By: Michael Yu <michayu@ebaysf.com> Co-Authored-By: Mat Lowery <mlowery@ebaysf.com> Partially implements: blueprint clustering Change-Id: I6ed2c4c79a17fcf8f14c587cab6a8ec3acaf319f
* Add new command: detach-replicaGreg Lucas2014-08-261-0/+8
| | | | | | | | | Add new command to detach a replica from its replication source. Partially Implements: blueprint replication-v1 Co-Authored-By: Nikhil Manchanda <SlickNik@gmail.com> Change-Id: Ieca67f042c6bcb33f2a4de1acbb330d3eefc0600
* Merge "Allow users the ability to update the instance name"Jenkins2014-05-271-0/+11
|\
| * Allow users the ability to update the instance nameIccha Sethi2014-05-081-0/+11
| | | | | | | | | | | | | | | | | | Implements: blueprint update-instance-name This review provides the user the ability to update the instance name or/and configuration using the trove client. Change-Id: If404d4d47c83ca36d7a08ed2a8f1f8dddb7ed677
* | Enabled F821, H306, H402, and H404 flake8 ruleSushil Kumar2014-05-091-2/+2
|/ | | | | | | | | | | | | | Reasons: - F821 is disabled. - H306 is disabled. - H402 is disabled. - H404 is disabled. Changes: - Updates tox.ini to enable F821, H306, H402 and H404 rules. - Updates code for F821, H306, H402 and H404 violation. Change-Id: I772270bb833ac774e080fc63e330d6b333f23de2
* Merge "Replace assertEqual(None, *) with assertIsNone in tests"Jenkins2014-03-031-1/+1
|\
| * Replace assertEqual(None, *) with assertIsNone in testsllg82122014-02-151-1/+1
| | | | | | | | | | | | | | | | Replace assertEqual(None, *) with assertIsNone in tests to have more clear messages in case of failure. Change-Id: Ifbb144e26b62790d8b8ba9b5c3eea7d04844ee19 Closes-Bug:#1280522
* | 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
* adds support for configurations managementCraig Vyvial2014-02-051-0/+20
| | | | | | | | | | | | | | | | Reason: Adding configuration group support for the python-troveclient Changes: adding configuration api calls adding the compat client for tests and xml added the shell cmds for the configurations in the client made the path to datastore/version/parameters added unit tests partially implements blueprint configuration-management Change-Id: Ifc0b4077c93a805898b4cd157e33172f64e85b55
* Add Neutron supportAndrey Shestakov2014-01-291-1/+4
| | | | | | | | | | | | | | | | Currently create instance doesnt work in OS installation with Neutron. To get it work, additional parameter 'nics' should be specified in Nova 'create' call. This change allows user to pass 'nics' parameter when create instance. Syntax to specify '--nic' parameter is same as in novaclient. --nic <net-id=net-uuid,v4-fixed-ip=ip-addr,port-id=port-uuid> This parameter can be specified multiple times, to attach multiple network interfaces to instance. Closes-Bug: #1257838 Change-Id: I76fb0d99512b1ee70441c924835a900ba0b7acd1
* Adding pagination support for backupsRobert Myers2013-12-111-21/+4
| | | | | | | | | | * add a _pagination method to base Manager * switched existing paginated list to use the new method * removed description from backup list and added updated Implements: blueprint paginate-backup-list Change-Id: If33c55a35bae8ebd6ed654af5ce6dfd7f9e40096
* Ignore fewer PEP8/flake8 rulesDenis Makogon2013-12-101-33/+35
| | | | | | | | | | | | Reasons: - code should be pythonicaly clean, that is why number of ignored rules should reduced Changes: - E125, F811, H102, H103, F201, H23, H302, F841, H301, H702, H703 rules are now enabled Change-Id: Ibf4025162244d3c2f1278b49a76ec1527a729042
* Support datastore typesAndrey Shestakov2013-10-311-1/+6
| | | | | | implements blueprint db-type-version Change-Id: I5dec99c44393c04d86c1a8e19c0b3ca59329fd87
* Fixing copyright and license headersMichael Basnight2013-10-221-0/+19
| | | | | | * Added HP copyrights as appropriate Change-Id: If4f30b0caf03b16f5fb4f54185ba80d9fa41d0b0
* Removed underscores from the end of some variablesAndrey Shestakov2013-10-151-4/+4
| | | | Change-Id: Iff664cef5ec580de6a33db1503a6e567701418a3
* Massive refactoring to the troveclientMichael Basnight2013-10-091-4/+4
| | | | | | | | | | | | | | | | 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
* Removed instance reset_password from python-troveclientNikhil Manchanda2013-08-201-6/+0
| | | | | | | | The reset_password operation no longer exists and needs to be removed from python-troveclient. Change-Id: Ic162ef6deb86716fa12fa5541699f602c246563e Fixes: bug 1199507
* Rename from reddwarf to trove.0.1.3Michael Basnight2013-06-211-0/+176
Implements Blueprint reddwarf-trove-rename Change-Id: Ib2d694c7466887ca297bea4250eca17cdc06b7bf