The ugettext_lazy method and the ungettext_lazy method are both
deprecated since Django 3.0[1].
These were already replaced in Horizon repo by [2].
[1] https://docs.djangoproject.com/en/3.0/releases/3.0/#id3
[2] cd7c1b5110fe1f64cd9dfbeb1072b37912d0efee
Change-Id: I4008e4439d568e0ffedd575870d4bc48c1cc62e5
This patch is a clean-up patch for refactor-error-messages bp
which remove the exception message from base message otherwise
the same exception message display twice like
this https://ibb.co/XyFWMdz .
Depends-On: https://review.opendev.org/#/c/708069/
Change-Id: I89df4b9681da759ba5a5b898f1de63e85351bbce
This repo does not support Python 2 anymore, so we don't need
six for compatibility between Python2 and 3, convert six usage to Python
3 code.
Change-Id: I3edab6e67ac79d14fe9d38f6f75abfd50030fa1e
Needed-By: https://review.opendev.org/701743
troveclient resources use the lazy-loading feature, which causes problems
for calling hasttr() on the object. copy.deepcopy() also use hasattr(),
and results in infinite loops. hasattr() will ignore any exceptions under
Python 2.x, but reraise them under Python 3, this is reason why the related
test cases passed under Python 2.x and keep failing under Python 3. This
patch fixes and should be the last one to fix the py35 gate jobs.
Partial-Bug: #1755413
Change-Id: I97492605047a986d3075a8b5f22ecbfdb3af8aca
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
- use six.text_type instead of unicode for assertion;
- use dict.items() instead of dict.iteritems() for dict iteration;
- use six.text_type to capture exception messages, the 'message' attribute
is no longer existing;
- dict.keys() returns a dict_keys object under Python3 which cannot be
reversed, explicitly convert it to a list.
Partial-Bug: #1755413
Change-Id: I5d31397b7bfe08b504ee5b9cd4ff894031f66c2b
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
Add wrapper functions for binascii hexlify/unhexlify to deal with the
conversion between bytes and str.
Partial-Bug: #1755413
Change-Id: I8351b30b62ba19290e05c30499c3588649f8f367
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
Trove dashboard is currently using python logging module to
implement logging functionality.
This patch made a switch to oslo.log(logging for openstack projects)
Reference:-
http://docs.openstack.org/developer/oslo.log
Change-Id: I92a417a7342f4f264e8a5ede52ba49f0b7475e6d
Closes-Bug: #1656167
The datastore flavor field was not properly implemented because
not every datastore flavor had it's own flavor pulldown.
Properly implemented a datastore pulldown for every flavor that
is only visible when the corresponding datastore value is selected.
Also added code to protect against uppercase letters in the
datastore or datastore version name.
Change-Id: I7a8083733a7d613c56652f3884d2682bb54379b3
Closes-Bug: #1614650
The django form field default is "required=True", so this patch
remove the redundant "required=True" in the form.
Change-Id: If0a5e6086a5898670643cc8f2cc0f97822ad063b
Added a locality pulldown to specify None/affinity/anti-affinity
in the launch cluster dialog.
Modified the horizon trove api to use the new locality parameter in
the launch cluster dialog.
Change-Id: Iac08b34958408d81aaf7bc0cd699bdafb7e7d3d7
Closes-Bug: #1611919
The cluster launch use the improper check for inactive datastore
versions.
Updated to use the proper check for inactive datastore
versions so that they are filtered from the datastore list.
Change-Id: Id095bbf049dd3065ecb7e05b9956f6a2bb2550b2
Closes-Bug: #1614589
Added nic field to grow add instance form, the summary added instance
table, cached object and the api.
Change-Id: I927b3a233f9e6a97535dd9882d23393e8197b75a
Closes-bug: #1613449
The form to add an instance to grow a cluster had a hidden cluster_id
field that was not being populated.
The cache uses this cluster_id to keep track of the instances which
are used to grow the cluster.
Properly added the code to correctly populate the field.
Change-Id: Ie9a1e481aeb4c1ae015ae66835392b9534fbee05
Closes-Bug: #1611468
The datastore version object only contains the active attribute
when the user is an admin user. The datastore version object for
non-admin users does not have the active attribute. The absence
of the active attribute should be considered active.
Fixed the active attribute check to account for the case when the
attribute is missing.
Also modified the test data to create a datastore version without
the active attribute to test this scenario.
Change-Id: Ie134a69f57b92bc5fab97860d2839bd9c7f496ec
Closes-Bug: #1573232
Add support for Trove commands cluster-grow and cluster-shrink.
Added the grow and shrink actions to the clusters list table. The
grow and shrink actions are only available for MongoDB and Redis
clusters.
Added the grow panel table to list the new instances to be added to
the cluster. There is a table action Add Instance where the instance
details are specified then added to the new instances table.
A Remove Instance table and row action is available to remove any
instances from the table. A Grow Cluster table action will add the
instances to the instances in the table to the cluster. Removed the
add shard action as it is now deprecated and is replaced by the
grow action.
Added a cluster manager helper to keep track of the newly added
instances in the grow panel.
Added the shrink panel table that lists the instances belonging to
the cluster in a table. The selected instance(s) can then be
removed from the cluster with the shrink command.
Added the cluster_grow and cluster_shrink commands to the api.
Change-Id: I05dbc73282b333e3ed8cfd4cdbda673ec86f57fd
Co-Authored-By: Duk Loi <duk@tesora.com>
Implements: blueprint trove-support-cluster-grow-shrink
Adding support for percona xtradb cluster server for trove.
Change-Id: Id7751f7f45817fe89ac454eb795967cb60a029c8
Co-Authored-By: Craig Vyvial <cp16net@gmail.com>
The Launch Cluster dialog only supports datastore clusters that
Trove can deploy. Redis clusters can now be deployed by Trove.
The Launch Cluster dialog requires the following changes for Redis.
- Customized the Launch Cluster dialog fields for Redis
- Added a new Redis specific cluster details panel.
- Modified the Trove api to specify the volume parameter in
cluster_create only if the value is greater than 0.
- Added Redis to the db_capability helper.
- Modified the Trove test data and added unit tests for the
customized fields depending on the datastore selected.
Change-Id: I902b09d9f8a60da6276acb810e2ce616484ea51c
Co-Authored-By: Duk Loi <duk@tesora.com>
Implements: blueprint trove-enable-redis-clustering-support
Cluster launch currently does not handle datastore versions containing
dashes. This is because it splits on all dashes in the full datastore
string ('name-version'). The fix is to only split on the first dash.
Change-Id: I1d3c7f1283e26ddca2a44f41a8464007fd278adb
Closes-Bug: #1536255