summaryrefslogtreecommitdiff
path: root/trove/common/server_group.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove six usage and basestring checkwangzihao2020-10-161-3/+1
| | | | | | | | | | | | | | | | | | Remove basestring check. Remove six Replace the following items with Python 3 style code. - six.string_types - six.int2byte - six.indexbytes - six.add_metaclass - six.StringIO - six.text_type - six.integer_types - six.binary_type - six.BytesIO - six.reraise Change-Id: I4fb9033d152963c504ceb4d5c4d08f934ee4accb
* Use dedicated service credential configLingxian Kong2019-10-101-1/+1
| | | | | | The current admin credential config options are confusing Change-Id: I92c15c065edf364b955f2243b3599e0b8cae8b4f
* Support to create public trove instanceLingxian Kong2019-09-111-5/+10
| | | | | | | | | | | | | | | | | | | | - The users need to specify the network to create Trove instance, but trove-taskmanager will create port in that network for Nova instance creation. Using port gives Trove more capabilities to define how the database service is exposed. - Deprecate ICMP protocol for the instance. - Restrict 'nics' parameter for creating instance. - Add 'access' parameter for creating instance. - Add 'public_network_id' option in order to create floating IP for the instance. - Do not create records for security groups, but Trove can still delete existing instances for backward compatibility. - Delete unreasonable Host, Account, Storage API. Story: 2006500 Task: 36468 Task: 36466 Change-Id: I80827e1ad5e6b130cbf94c2bb7a909c44d5cf1e5
* Remove log translationsZhao Chao2018-01-241-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to discussions on the ML, log messages should not be translated any more. This patch also: * removes all usage of _LI, _LW, _LE, _LC; * updates log translation hacking rule. ML discussions: http://lists.openstack.org/pipermail/openstack-i18n/2016-November/002574.html http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html The original commit messages are kept as following to make a historic note: remove unwanted log translations recent discussions on the ML have led to the decision to eliminate all translations for messages that are destined for log files but retain them for messages that are going to be returned as exceptions and potentially shown to end users via an API. see [1], [2]. This change does that as follows. 1. If a string is being used to generate an exception, it will still be translated. Still Trove used both _LE and _ for these translations, there are some cases where _LE has been simply changed to _, and not removed. 2. If a string is used for a logging message, remove the use of _, _LE, _LW, _LI. Also, I have long felt that we have had a creep of checks in the pep8 tests that apparently make the code easier to read. I strongly believe that these kinds of "easier to read" things make sense if they are followed across all projects and not just gratuitously added one project at a time. I've taken this opportunity to reduce the merge mess caused by this change, to sync up our ignore flags with a long list of ignores from Nova. When they made the change for removing log translation, they could do it in an automated-way like I have because they didn't have to deal with under and overindented lines for visual edit (E127). Same for Cinder. Changes 448443 [3] and 447839 [4] were inadequate because they only addressed a little part of the problem, namely removing the use of _LE, _LI, and _LW, and I think this is a change we don't need to dribble in a few files at a time. The changes are straightforward and should be taken in a single lump to make it easy to deal with the merges coming. [1] http://lists.openstack.org/pipermail/openstack-operators/2017-March/012887.html [2] http://lists.openstack.org/pipermail/openstack-dev/2017-March/113365.html [3] https://review.openstack.org/448443 [4] https://review.openstack.org/447839 Co-Authored-By: Amrith Kumar <amrith@amrith.org> Co-Authored-By: Valencia Serrao <vserrao@us.ibm.com> Change-Id: I5f86c982469e625997fc8bd15c6fae0fc77a8c64
* Handle log message interpolation by the logger in common/Gábor Antal2017-05-311-6/+10
| | | | | | | | | | According to OpenStack Guideline[1], logged string message should be interpolated by the logger. [1]: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages Change-Id: I946422e662b5efc453bfe76f3631ece1716dbb4c Related-Bug: #1642552
* Remove cfg and logging import unusedCao Xuan Hoang2016-09-231-2/+0
| | | | | | | | This patch removes cfg and logging import unused in trove Change-Id: Ic50a58123481faa37b8898565a597dcdb1f1fa46 Closes-Bug: #1618281 Closes-Bug: #1618347
* Locality support for replicationPeter Stachowski2016-06-201-0/+96
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 server part of this feature. 'locality' can now be added to the ReST payload for a create command and it is passed along as a scheduler hint to Nova. The replication scenario tests were enhanced to test that 'affinity' works and 'anti-affinity' fails (since devstack sets up a single hypervisor by default). A check for the existance (and lack of) server-groups was added. This is to ensure that not only is the server-group created properly, but also that it has been deleted after all the related instances are gone. DocImpact: New functionality Partially implements: blueprint replication-cluster-locality Depends-On: I18f242983775526a7f1e2644302ebdc0dac025cf Change-Id: I7d924c25d832f9ff4386e9497bfd214f1b2b3503