Commit Graph

15 Commits

Author SHA1 Message Date
Lingxian Kong 509edaf6a4 Remove clusters panel from trove dashboard
Change-Id: I95157ff4a9c07d171c3dda50f19bb3fa1bdd7ef8
2020-08-19 22:13:36 +12:00
Sean McGinnis 8b72e8bd5e
Use unittest.mock instead of third party mock
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: I798eb2f2581cfca60c8c59fb35eb69f82cc963c4
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-20 16:05:50 -05:00
Zhao Chao 03c97ade7e Mox removal for ClustersTests
Change-Id: Ie93990b03a4bd85efafe64f6cef0ff75b174f905
Signed-off-by: Zhao Chao <zhaochao1984@gmail.com>
2018-06-19 23:06:31 +08:00
Akihiro Motoki ddaf10204a Django 2.0 support
Replace django.core.urlresolves with django.urls

(In Django 2.0) The django.core.urlresolvers module is removed
in favor of its new location, django.urls.
It was deprecated in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3

The arguments of include() has been changed in Django 1.9
and the older style was dropped in Django 2.0.
https://docs.djangoproject.com/en/2.0/releases/1.9/#passing-a-3-tuple-or-an-app-name-to-include

Add py35dj20 job to test Django 2.0 integration.
Also drops older Django unit tests from tox.ini
as horizon dropped Django <=1.10 support in Rocky.

Depends-On: https://review.openstack.org/#/c/571061/
Change-Id: I122f8ad81807386517149f37aa8d63c76daac533
2018-06-08 13:27:11 +09:00
Zhao Chao 996e134a1c Fix str and dict usages in unittests for Python3
- 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>
2018-03-15 21:23:05 +08:00
Zhao Chao a5cc40f488 Fix binascii hexlify under Python 3
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>
2018-03-14 17:37:04 +08:00
Duk Loi f7d0b9f771 Add support for uppercase fieldname to cluster
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
2017-06-16 01:37:36 +00:00
Jenkins ce995f514a Merge "Add cluster support for affinity/anti-affinity" 2016-09-14 15:12:31 +00:00
Ali Adil 9e89be3f2b Add cluster support for affinity/anti-affinity
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
2016-09-13 20:52:48 +00:00
Ali Adil d53d2efbc6 Add nic to cluster grow
Added nic field to grow add instance form, the summary added instance
table, cached object and the api.

Change-Id: I927b3a233f9e6a97535dd9882d23393e8197b75a
Closes-bug: #1613449
2016-08-16 16:35:57 -04:00
Duk Loi 43602654eb Use new style form templates
This patch addresses two bugs by updating to the new style form
template.

By using the new style form the standard horizon common form is
used for the footer and fixes the issue where the cancel button
has the wrong font size.

It also fixes the gate issue where there was a failing test due
to the url not being accessible.  Updating to the new style form
with the url as a view attribute fixes that issue.

Added code in the views to populate the new standard form
attributes.

Removed the code in the old style form templates
and used the new style.

Removed some unneeded icon attributes in the grow/shrink
table actions.

Added some code to suppress the output of expected exceptions in
the tests.

Change-Id: If04f24d46c251079bcbe232b94eaee4f30c73ed3
Closes-Bug: #1566506
Closes-Bug: #1568876
2016-04-14 15:09:59 -04:00
Matt Van Dijk 3ea4a7ca62 Trove add cluster grow and shrink support
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
2016-02-25 16:54:41 -05:00
Matt Van Dijk d09319b786 Enable Redis database cluster support
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
2016-02-18 15:36:12 -05:00
David Lyle bac61fbfd2 Completing the plugin
Change-Id: I410aaac24b76e63a82d6c50364e46d54ead03b05
2015-12-18 15:53:31 -07:00
David Lyle 9f35f7774b Restructuring tree to be plugin 2015-12-18 15:28:23 -07:00