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>
- 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>
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
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
Added nic field to grow add instance form, the summary added instance
table, cached object and the api.
Change-Id: I927b3a233f9e6a97535dd9882d23393e8197b75a
Closes-bug: #1613449
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
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
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