Add heat.template for Redis datastore

Reasons:
- common policy for datastores:
       each datastore should be able to
       be provisioned as part of heat stack.

Changes:
- adding heat.template

Change-Id: I3b44c75b80da7b7b2a296259fbf925d5ec9d71a6
Closes-Bug: #1285157
Bind to all interfaces for MongoDB

The existing config.template binds to 127.0.0.1 but the status check
uses operating_system.get_ip_address(). It works now because during
prepare the bind_ip is substituted. However, during operations like
start_db_with_conf_changes and reset_configuration, the substitution
does not occur causing the guest agent to show the service as SHUTDOWN.

Change-Id: I137471c6ee2652eac8a0e787098e04fb468f9828
Closes-Bug: #1312346
Moved the apidocs from openstack/database-api

By hosting the docs here we'll be able to better maintain that
developers are being mindful of changes or even occassionally writing
documentation for new API features. This should also allow us to
autogenerate the snippets.

Change-Id: I0111bcd38341b1736a47b0a3d3e6ff96d2ca1c58
Make sure eventlet starts correctly

This commit prevents a bug where eventlet was not being monkey patched
correctly. It also puts some code common to most of the scripts into
a common module to prevent some of the confusion surrounding
this and other initialization issues.

Closes-Bug: #1310785

Change-Id: I433dde896d7384e577e60ac3dd795a9c5c97d689
Check that all po/pot files are valid

Perform minimal checks on po and pot files so that no broken files can
get imported.

Change-Id: I5466178f713bfea3c4a674e1b408a060b3a526c5
Co-Authored-By: Clark Boylan <clark.boylan@gmail.com>
Related-Bug: #1299349
Remove usages of deprecated name LoopingCall in rpc

LoopingCall has been renamed to FixedIntervalLoopingCall
(no functional changes, so a 1:1 replace is just fine)

Closes-Bug: #1307560

Change-Id: Ic8ecf0b57b659446966d7501b8bc49316ff462b0
Corrected the assert message in test_dbaas.py

Change-Id: Id0a6a9b3b674bfe724bcb83764a628388cfd38f6
Closes-Bug: #1311621
Unmounting ephemeral if it has already been mounted

Creating an instance from a backup fails when using
ephemeral storage (trove_volume_support = False).
When using ephemeral, nova automatically mounts the ephemeral
drive /dev/vdb into /mnt. This causes issues during the restore
from backup when the restore method tries to delete all files from
the mounted device. It gets an error complaining about the
"Device or resource busy".

To solve the problem, we should unmount the ephemeral storage
if it's been already mounted.

Change-Id: I007c1e11274f1f497d26bd9b1be1fc5b0830f84b
Closes-Bug: #1294369
Imported Translations from Transifex

Change-Id: I01e0d1165c6ea5f35c6daf7ba0c94b1b16ef96d1
Updated from global requirements

Change-Id: Iab7b6ed1890b7da98f4916dc90b523b52674f59c
Improve help for backup_incremental_strategy

Improve wording of the text.

Change-Id: Id1fe79e74094d6fce4a6db3bb5fa99ab46b42223
Merge "Corrected the assert message in test_dbaas.py"
Merge "Moved the apidocs from openstack/database-api"
Fail a test if time.sleep called for no reason

If a mild error screws something up in task manager, an entire class
of tests will continue polling using GET requests until they hit their
rate limit, destroying any attempt to parse the test output to see
what is wrong. This pull request fixes that.

Change-Id: I7c00a174dfb7970357ee2bd71550983d68e0e8ae
Closes-Bug: 1315518
Merge "Updated from global requirements"
Resolves volume resize issue

Reasons:
- Cinder APIs are not able to complete the detach/attach properly with
  nova instance.
- resize2fs is not proceeding with e2fsck having "-f" and "-n" options.

Changes:
- Used nova-volume attach-detach APIs instead of cinder APIs.
- Updated e2fsck to use -p option to complete the e2fsck action so that
  resize2fs could proceed.
- Updated tests as per replaced Nova APIs instead of Cinder APIs.

Change-Id: I40f1dc8ca04b3bfcc4eae910515fcedf922c1a9e
Closes-Bug: #1291896
Use six.StringIO/BytesIO instead of StringIO.StringIO

to keep Python 3.x compatibility, use six.StringIO/BytesIO to
replace StringIO.StringIO

StringIO works for unicode
BytesIO works for bytes

Change-Id: Icffbbc8b1fcbf2003f7206530c4cd13fd376a59a
Closes-Bug: #1280100
Fix missing use of test config datastore version in tests

Change-Id: I7ae9037fbe1fb1ac634afc51a7bd8e9a6bf65797
Closes-Bug: 1316321
Add support for 'trove root-enable' in Couchbase

Currently, trove api call 'root-enable' is not implemented by Couchbase
guest agent. This fix adds the required support for the api call.

Root-enable api call is being handled by the root controller in mysql
extensions module. The controller makes a sync call to the guestagent to
enable the root. The guest agent handles the actual implementation. This
being true, the api call should be generic for datastores and not a
part of mysql extension module. If a particular datastore does not
support root-enable, the guest agent returns an appropriate message. The
abstractions in the extension module are not clear and blueprint should
be filed to generalize the extension module.

Closes-Bug: #1294821

Change-Id: I3f098032333cda70f4181e5688514cbda6730a45
Merge "Unmounting ephemeral if it has already been mounted"