changing the routes for the api to be clear

The map.resource creates a ton of excess routes that are not necessary
for our service. This will make things more explicit and we will know
which routes are being used from viewing api routes.

Implements blueprint clean-up-trove-api-routes

Change-Id: I149642188f42ffdbf8ff11b3acc79daf76dcb2b0
Mask database user's password in trove logs

Currently passwords are logged in plaintext in trove-api and
trove-taskmanager logs. This fix will mask the passwords in the logs.
Syncing modules log, common.py from rpc  and versionutils from oslo.
common.py requires versionutils.py.

Change-Id:I50deb003d866e85e7c7ec8ab3ce7248d1c005e57
Closes-Bug: #1254914
make datastore_version_id required

The datastore addition didn't migrate existing instances,
which causes existing installations to blow up after upgrading.
This commit addresses that by inserting best-guess dummy data
into the db.  Operators will need to clean up the values to match
their actual usage.

Change-Id: I7ae064cea9b654a4501b91877b779fb4073623af
Closes-Bug: #1259642
Adds exception handling to heat code

Reasons:
- In absence of exception handling code, instance status used to be
  always in BUILD state, even if heat code has error'd out.
- status "CREATE_FAILED" of heat stack should also be candidate
  of code failure and instead of executing next code,
  exception should be raised for this status.
- Resource state should also be verified before keeping their IDs.

Changes:
- Exception handling code added, which would set instance status
  to ERROR for any failures.
- Added HEAT_STACK_SUCCESSFUL_STATUSES & HEAT_RESOURCE_SUCCESSFUL_STATES
- Heat Stack status is verified with HEAT_STACK_SUCCESSFUL_STATUSES,
  and raises exception on failure.
- Heat Resource state is verified with HEAT_RESOURCE_SUCCESSFUL_STATES,
  and raises exception on failure.

Change-Id: I307d3d6bbdcd9a46b6ea94e9673ee8d1d97e50bd
Closes-Bug: #1263496
Changes encoding from 'ascii' to 'utf-8'

Reasons:
- Heat code, while encoding the template encodes it with 'ascii'
  encoding, which should be 'utf-8' instead.

Changes:
- Encoding format changed from 'ascii' to 'utf-8'.

Closes-Bug: #1272053
Change-Id: I66a7c20716899144653b7dbc6811c268caaf7c2c
Merge "make datastore_version_id required"
RootReport through Taskmanager

Reason:
- guestagent should be free from direct Trove back-end DB connection.
Changes:
- extending taskmanager provisioning flow;
- taskmanager reports about root creation;
- tests.

Closes-bug: #1257489
Change-Id: I5f2502d8b61542658682a5ff74735749e5a1ca2b
Disable redundant DB initialization on guesagent's start

Reasons:
 - Guestagent uses conductor to communicate with database.
 - No direct connection to DB is required.
   But GA still initializes DB connection on start.
   This prevent running guestagent without MySQL installed in guest,
   which could be useful for datastores other then MySQL.

Changes:
 - This patch disables DB initialization on GA start.

Closes-bug: #1256046
Change-Id: I23dafdfbc7b04c24f1b4ddd714005eb615641cd6
Replaces local generate_uuid with common.utils

Reasons:
- generate_uuid is defined locally to use truncated uuid,
  without any specific need.
- This may result in similar UUIDs.
- Since tests work fine with usual common.utils.generate_uuid.

Reasons:
- Replaces local generate_uuid with generate_uuid from common.utils.

Change-Id: I5d46ba78169ce26c18c05160f02a8b01f88aca40
Closes-Bug: #1272685
Fix Occasional test_one_network_label_exact Fail

fixes the occasional tox failure for test_one_network_label_exact by
saving and restoring the original conf values before every test.

see bug details for more information.

Closes-Bug: #1272806

Change-Id: Ib051b5325c0914f2ab3bc293b0052abe8257996d
Corrects help messages in cfg.py

Reasons:
- Few typos.
- Help message sentences not ending with a full-stop(.).

Changes:
- Typos corrected.
- . added to end-of-sentences in help messages.

Change-Id: I29f0d266c9b87d9bf90cd15084ef02699532d79e
Closes-Bug: #1272020
Makes the backup tests less onerous

The backups test code was looking for an exact number of elements to
be returned from the backups list calls. This made running the tests
kind of a pain, so this commit counts the number of backups before a
backup is created and uses this for the later assertions.

Change-Id: I186c9e04a91e86fca612078415413468757297ca
Simplify swift storage load logic

* Use the swift connect to download files.
* Consolidate fake swift objects.

Closes-Bug: #1253752

Change-Id: Ieb1ec1c468e863109e71fe5a0277834cbc692169
Merge "Mask database user's password in trove logs"
Merge "RootReport through Taskmanager"
Add Neutron support

Currently create instance doesnt work in OS installation with Neutron.
To get it work, additional parameter 'nics' should be specified
in Nova 'create' call.
This change allows user to pass 'nics' parameter when create instance.
Also possible to specify list of network IDs which should be attached
to instance if networks are not specified by user.

Closes-Bug: #1257838

Change-Id: Ifd98a880dfa22e9677e802bcd779acd9146ec671
Fix default_datastore migration script

Fixes the migration script introduced earlier to remove
dependencies on the Trove database model classes.

Change-Id: I71762baa095039f65e97b3413a7ff0fc3e0014ec
Closes-Bug: 1259642
Merge "changing the routes for the api to be clear"
Merge "Fix Occasional test_one_network_label_exact Fail"
Merge "Makes the backup tests less onerous"