Fixes insecure update of /etc/fstab file

Reasons:
- While updating /etc/fstab in write_to_fstab in
  trove/guestagent/volume.py, the temporary file-name was easy to
  guess and had a permanent name making it prone to unwanted access.
- The temporary file-permission was set to 666, making it insecure.

Changes:
- Uses NamedTemporaryFile for temporary file creation.
- Used file reading instead of copying the file.
- These changes eliminate the chances of guessing the file-name,
  as well as updating the same.

Change-Id: I07c3980e40fe218d35605a851a17535cd3972c11
Closes-Bug: #1267991
Remove IDENTIFIED BY clause for MySQL REVOKE

IDENTIFIED BY is not documented for REVOKE in MySQL 5.5 and 5.6 and
furthermore produces a syntax error on MySQL 5.6.

Change-Id: Ib7bf1ba0ce049c1ed8a90292064a1e05724170e0
Closes-Bug: #1292690
Update sqlalchemy migrate scripts for postgres

pgsql <= 8.3 was lax about char->other casting but this was tightened
up in 8.4+. We must now specify the USING clause for such a cast to
succeed. The SQL queries generated by sqlalchemy for pgsql don't
support this, so an override is needed to support pgsql for the trove
migrate scripts.

Closes-bug: 1293465
Change-Id: I217fc861036911e61bafe706e338bb3b8f49e708
Fixed unit test to not actually run backup command

One unit tests is still trying to execute the actual backup command
instead of the mocked backup command. This is causing an issue on
the Jenkins slave where it is trying to run as sudo (and failing).
Fixed the test to use a mock runner, and not try to run innobackupex.

Change-Id: Ifff7945be158a08167cdd282ed8eb18952224eee
Closes-bug: 1291516
Merge "Fixes insecure update of /etc/fstab file"
Setup trove for translation

The upstream-translation-job exists already but fails since trove
is not setup properly for translation.

Add the usual babel.cfg file, update setup.cfg for translation and
create initial trove.pot file.

Change-Id: I65ca2c974fc54e005ba8887dceb66ac08432c6d1
Merge "Remove IDENTIFIED BY clause for MySQL REVOKE"
Merge "Update sqlalchemy migrate scripts for postgres"
Merge "Setup trove for translation"
Imported Translations from Transifex

Change-Id: Ib11144ccb6d567f820db7adae0a9ae7bde32f511
Merge "Fixed unit test to not actually run backup command"
Tox tests should not require errors in rigid order

Fix the tox tests to not require Validation Error messages to be returned
in a specific order. Since the order of validation errors can be
non-deterministic, the tests should merely check for existence of the error.

Change-Id: I615359cfb7129b2af9f22c43ad4475b53f7acab3
Closes-bug: 1294850
Remove mockito, and replace with mock

There are unit tests in trove which are dependent on mockito.
This fixes them to use the standard mock library which is a part
of global_requirements.

Co-Authored-By: Justin Hopper <justin.hopper@hp.com>
Implements-bp: remove-mockito
Change-Id: Ic030cc846d9e7d0c9077240b0fac90f4f66a5a42
Updated from global requirements

Change-Id: Ie9d3fc8dd87474814c4684998f8003e7a216e9d9
Fix create call for security group rules

We need to fix the create security group call to
correctly use the per-datastore configs to set the
port, and protocol values for the security group rule.

The only parameter that the trove user should be able to
specify for the rule is the CIDR.

Changes:
- Use the datastore specific ports and protocol for creating
  the new security group rule.

Changes:
- using datastore-specific ports for building new rules, based upon income CIDR;

Change-Id: Ic1440f735b6cf2b8b4f29c5ab9f48bcb427ca9e6
Closes-Bug: #1298749
Fixed unit test to not actually run backup command

One unit tests is still trying to execute the actual backup command
instead of the mocked backup command. This is causing an issue on
the Jenkins slave where it is trying to run as sudo (and failing).
Fixed the test to use a mock runner, and not try to run innobackupex.

This had been previously fixed by commit 19d940516e, but that fix was
clobbered by the move from mockito to mock.

Change-Id: Ib63187d4414a3ef7b7f664e076bb4d92a40c2214
Closes-bug: 1291516
Merge "Updated from global requirements"
Merge "Fix create call for security group rules"