Complete mocking for test_extensions

The current implementation of trove.tests.unittests.api.
common.test_extensions does not fully mock the
test_default_extensions method. As a result trove UTs run without
trove being installed fail in this method as it assumes the
entry points have been installed into the egg for trove.

This patch completes mocking of that method so that the
test_extensions class can be run in a UT environment in
which trove is not installed and thus may not have the entry
points installed to the egg.

Change-Id: I2543f17fe087cf98d1a11ef47a07b4addfd32cd4
Closes-Bug: 1372950
Merge tag '2014.2'

Trove 2014.2

Change-Id: I7ea34a1c14af8f6cb067b212df823a4984fd9f0b
Update some log calls for translation and lazyness

Update log calls to use _LI and friends.
Follow oslo.i18n recommendation to use "," instead of % so that
lazy evaluation of debug messages is possible.

For details about tagging, see http://docs.openstack.org/developer/oslo.i18n/guidelines.html#log-translation

Partial-Bug: #1379001

Change-Id: I4aff674555945e6097283770fe77abecfebd740e
Validate backup size during restore

Reasons:
 - A user is able to pass a backup that is larger
   than the volume/disk of the instance can handle.

Changes:
 - Add validation to backup size according to volume
   or flavor size of the disk;
 - Add tests.

Change-Id: Id549cff2e572a0ada632759bd9fcbbb67edf6ae0
Closes-Bug: #1304603
Check for server attributes before using them

Sets server attributes only after verifying that
they exist.

Risk of fix: With this fix the server.host, server.local_id,
server.deleted, server.deleted_at values could get set with
values from information loaded per
client.servers.get(instance.server_id). See bug notes for
more details

Change-Id: I6d8303fee0ab685bdbe66b044174a7bd9f0807a4
Closes-Bug:1376525
Updated from global requirements

Change-Id: Id3543e912346b5a6113f631770515fa2fd1080fe
Added Replication templates for Percona

There are no templates for Percona replication, so any attempt to create
a replica using the Percona datastore will fail.

The relevant templates have been added.

Change-Id: Ide52bbb3f918caabe7b0a32adaf0ed50e49202be
Closes-Bug: #1386887
Merge "Update some log calls for translation and lazyness"
Couchbase backup failing

Executing a backup on Couchbase doesn't finish. Examining the log in
the Guest Agent revealed the following error:
'OSError: [Errno 2] No such file or directory'

This occurred because a list was being passed to 'execute' instead of
*args. These instances have been fixed.

Change-Id: I4616437909a31818faf082f0c272de9415219acd
Closes-Bug: #1387721
Imported Translations from Transifex

For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I13a2397c9bc38e73149a40be06485ae5911d54f1
Added regression test for config with long value

This bug is fixed by changes from
https://review.openstack.org/#/c/79850

The bug was originally caused by ConfigurationsController._find_type()
only returning an int as the type even for long values.  With the
changes from the above review _find_type() now returns valid types of
int and long.

Added a regression test to validate the scenario described in the bug.

Change-Id: I6df4c919ccccad7481197b8feddaf6f27a5e4e42
Closes-Bug: #1308665
Merge "Couchbase backup failing"
making service catalog for endpoints more configurable

When creating a client you may need the client to be something other
than the endpoint type of 'publicURL'. This will allow you to
overwrite the endpoint type of each service client.

Closes-Bug: #1389885
Change-Id: I117b2ec9397f5bdbc0861902e7e502a86a7b3c9e
Eliminate use of sudo for two things that don't need it

The MySQL restore strategy used exec_with_root_helper() which was a
skinny wrapper on execute with sudo to find out whether MySQL was up
and running or not. This is unnecessary as any user can run mysqladmin
(by default) and similarly, any user can run ps (not only root).

Since these two code paths were the only ones that used
exec_with_root_helper() I've eliminated that as well. It didn't do
something so profound that its loss will be missed anyway.

Change-Id: Ia0452417b88416b0289f894b99a8632ab0328539
Closes-Bug: #1350075
configuration parameters payload changed

the configuration parameters payload was originally just 'max'
and 'min' for the range and was changed to 'max_value' and
'min_value' in the output. Reverting this back to the original
v1 spec of 'max' and 'min'.

Closes-Bug: #1390317
Change-Id: I9628313e4154048a6aa9a089a6e3ec18f9af1d33
Merge "configuration parameters payload changed"
Updated from global requirements

Change-Id: I00ff8b1b482abd8f94aba4a579eda532a471bba8
Update and correct documentation snippets

Partially implements: blueprint example-snippet-generator
Change-Id: I26f63bd9ef4a1ec5559d41bda7c476ba829b1729
Merge "Merge tag '2014.2'"
Fix exception handling in get_replication_snapshot

Unexpected errors that occur while generating the replication snapshot
(for example, TemplatesNotFound) are not logged. This can lead to
accidental hiding of the root cause of a problem.

All exceptions are now written to the log and then re-thrown.

Change-Id: I48de0e099494b204a8b109caedb4b86a616024f1
Closes-Bug: #1386875