Reports enabled-root for restored instance

Reasons:
- This condition got missed in one of the earlier patchsets.
- When a root-enabled instance's backup is restored, it does not
  reports to service database that root was enabled for
  restored instance.

Changes:
- report_root method added in conductor.
- Reports, if root is enabled for restored instance, through conductor.

Change-Id: I186398e6651421cecb7169e4eec1d6a8a166ee97
Closes-Bug: #1277745
Ensure routing key is specified in the address for a direct producer

This change is already merged in oslo-incubator.  Note that this is
not a clean merge of the fix, as Trove's copy of rpc from
oslo-incubator is *VERY* far out of date.  However, the bug still
existed in the code.  The fix just looks slightly different.

Original commit message body includes:

    Porting this fix from oslo.messaging.  This fixes the impl_qpid.py
    driver to allow it to work with the latest stable upstream QPID broker
    (version 0.28).  See the Apache Qpid Jira bug
    https://issues.apache.org/jira/browse/QPID-5557

Change-Id: If71f78e50f8a9b3acfd1e9d02c8271f17c4ebee7
Related-Bug: #1300318
Logging audit for trove/configuration module

Adjust log messages to conform to logging standards.

Change-Id: I16e48928d7a710e2ba31524be02d358b4e1dd713
Partial-Bug: #1324206
Fix tracking of SG's provisioned by Heat

Reasons:
 - Trove doesn't track security group that was created as
   a part of stack.
 - Trove should create two records for security group tracking:
   - security group;
   - security group association with an actual instance;

Changes:
 - Adding security groups registration right after stack creation.

Change-Id: I1f55c27ecbd5ad76c869eae7197b8c24720fc1e6
Closes-Bug: #1276228
Enable usage of config-drive for file injection

* Some nova deployments allow the use of config-drive to do file
  injection.  Trove, when booting an instance, needs to send this
  to Nova when config-drive is to be used.

Closes-Bug: #1329535

Change-Id: I950b93a32f6c7224f30cf930e5f95710c07cbc26
Add datatore/version name into configurations response

Reasons:
 - Both ConfigurationView and DetailedConfigurationView
   for configuration-groups return only the Datastore
   Version ID and not human the readable Datastore Name / Version

Changes:
 - adding datastore version name to:
   - configuration-create;
   - configuration-list;
   - configuration show responses.
 - tests;

Change-Id: I8fbefd57d40838dafcead0077bfbc6b49c27a8eb
Closes-Bug: #1326584
Fix backup execution workflow

This patch ensures that _run_post_backup() always runs after
the backup operation has completed (post-backup). Fixes issue
wherein any cleanup occuring in _run_post_backup would race
with commands running during backup (potentially unpredictable
dangerous situation).

Change-Id: I279c9a85415ac6ec2ddf8e564a056a3415690f68
Closes-Bug: #1340864
Fixes redundant get call in a few places

partially implements: blueprint refactoring-datastore-options-in-cfg

Change-Id: Ib4257abc44f7166b014c9963995ff0741758e723
Imported Translations from Transifex

Change-Id: I46ee927c685218dfc40fe2134de884ead452e32a
Merge "Fixes redundant get call in a few places"
Merge "Imported Translations from Transifex"
Merge "Enable usage of config-drive for file injection"
Enhance trove-manage help

The automated tools for CLI reference document creation have been
enhanced to support *-manage utilities. Since these tools run the CLI
and extract the help from it, they are only as good as the help of the
utility in question.

The help for trove-manage has been enhanced so that the CLI reference
documentation will have useful information in it.

Change-Id: I2560e668cf52bb81b9561abc7747db2155921721
Closes-Bug: #1339840
Merge "Fix backup execution workflow"
Restrict backup-list on instance to tenant

Fixed backup-list on an instance, so that we show all available backups for
the instance iff the user making the request is an admin. For a non-admin
user, we return only the backups in his particular tenant.

Change-Id: I2aff6dca053d8261bb70083bf52dac46806faabe
Closes-bug: 1295325
Merge "Fix tracking of SG's provisioned by Heat"
Manual install page needed swift info

The "manual install" developer doc located here:

http://docs.openstack.org/developer/trove/dev/manual_install.html

did not indicate that you need swift for backups.

I added the swift info.

Change-Id: I23e8565aee7e7036e4e6065e2c22f568e65ca7a7
Closes-Bug: #1342273
Merge "Ensure routing key is specified in the address for a direct producer"
Add Backup/Restore support for Couchbase

Backup strategy:
- Save bucket metadata config (as json file) to /tmp/backups
- This is needed on restore to create the destination buckets
- Handles root enabled case by also saving /etc/couchbase/secret_key to /tmp/backups
- Use cbbackup to do the backup
- /tmp/backups will be zipped up, encrypted, and sent to Swift

Restore strategy:
- If /tmp/backups/secret_key exists, set root password
- Iterate through bucket metadata config (json file) and use Couchbase
  REST API to create each bucket
- Wait until bucket finishes creating
- Use cbrestore (which requires destination buckets to be manually
  created first) to do the restore
- cbrestore can only restore one bucket at a time

DocImpact
backup_namespace and restore_namespace were in the default conf group, now they are per datastore

Change-Id: Iaf4370dcc978df68e7d01c6f63795eaf50aac89d
Implements: blueprint backups-single-instance-couchbase
Handle exception from pexpect child.close

When pexpect child.close(force=True) is called to close a sudo process, an
exception may be raised on certain operating systems. Terminating a sudo
process as a non-root user succeeds on Ubuntu 12.04 but fails on 14.04.

Handle this exception and try to kill the child process using 'sudo kill'.

See related change https://review.openstack.org/#/c/100353 that addresses
another instance of the same issue.

Change-Id: I4bd9e4b98479e33604545713337440ce81ca64ee
Partial-Bug: 1343344