Support Optional Super User in Instance Create

The creation of initial users and/or databases is supported in an
instance-create request, but the creation of a super/root user is
not. Granted, it's possible to create or reset the root user, but it
must be done as a separate request, after the instance has completely
initialized.

Changeset: If CONF.root_on_create == True, a UUID is generated for
the root user's password and is returned in the instance-create
response as the "password" property/field.

Change-Id: I300d3f019766445b90411d5ab8651b1aa34a77e9
Implements: blueprint instance-initial-super-user
Closes-Bug: #1219624
Extract generic part of GA code from MySQL specific modules

Extract common part of MySqlAppStatus to superclass
in order to provide easier implementation of
other DB engines support

Blueprint: refactor-ga-for-other-engines-support

Change-Id: Id101cccb0181055153ad817c12b1056e989b598d
Fix quota issue where usages can drop to negative value

This is caused by an exception occuring in the model when creating
and instance. When this happens, the quota rolls back but the DB
record, created for that instance, does not. This issue is NOT fixed
in this patch but depends on
BP https://blueprints.launchpad.net/trove/+spec/security-groups-workflow-update

What this fix does is adds a check that prevents quota usages drop below 0.

Also it fixes a bug where the reserve quota was being set and not added.
This causes problem when multiple requests are sent at the same time
and causes race condition issues.

Fixes bug 1178333

Change-Id: I1c64941815b91e58d79b17d7a6e69c15c1daaf36
Merge "Support Optional Super User in Instance Create"
Merge "Extract generic part of GA code from MySQL specific modules"
Task manager refactoring done

Manager API class removed and rpc fake impl used now for integration
testing

Change-Id: If20004f1b69e41e8243a3f58eec184f1f457affe
Implements: blueprit trove-task-manager-client-refactoring
Modifying tests to use the compat client

Modifies tests so they use the old style client code.
This is still exercising the actual v1.* code, it is
just accessing it via the compat module.

partially implements blueprint cli-compliance-upgrade

Change-Id: I5578525325416a28d7ab772ad0817f49ff6c6611
Add GA related parameters to trove-taskmanager.conf.sample

Adds placeholders for 'guest_config' and 'cloudinit_location'
to trove-taskmanager.conf.sample

Fixes bug: 1237395

Change-Id: I5214f5fcc785d94b5b2b60dead316768980d7909
Update trove-guestagent.conf.sample

Add missing 'service_registry_ext' parameter
Remove obsolete 'guestagent_manager' parameter

Fixes bug: 1237910

Change-Id: I66606672bd5bdad21c00ce2ad8d7a8eb62cff8cc
Fixing restart tests

* Remove rax specific tests
* Fix delete test grouping
* Fix the mess up mysql logic
* Fix ovz command if CONF.use_local_ovz
* Fix logic in Checker that was masking errors in tests

Fixes: Bug #1204233

Change-Id: I6ac8abb47d4cff0ae20432f059686e4f1dd55a7e
Update statuses on GA timeout

Updates instance status if GA stacks at BUILD status
after poll_until
Change-Id: I581f67d1be9f8e9b2080daa86d51d89326840c5c
Implements: blueprint update-instance-task-status-if-instance-stucks-at-build-status-to-error
Quote and escape pagination markers

urlparse.parse_qsl urldecodes fields in URLs, but
the next URL and the next marker are then out of sync.
This change reverses that behavior, and also makes sure
that dots in markers are also escaped as %2e as they should be.

fixes bug #1188352

Change-Id: Idfb7b4cbd3c14bb0d34c506d7d3d5d3683735e7d
Merge "Update trove-guestagent.conf.sample"
Merge "Fix quota issue where usages can drop to negative value"
Merge "Quote and escape pagination markers"
Replace deprecated method aliases in tests

Some of the TestCase methods have been deprecated since python 2.7.
We need use correct names.

http://docs.python.org/2/library/unittest.html#deprecated-aliases

* replace 'assertEquals' with 'assertEqual'
* replace 'failUnlessAlmostEqual' with 'assertAlmostEqual'

Change-Id: I90da87723e3e36767946d276301b75af801b952d
Merge "Fixing restart tests"
Fixes pagination with non-string markers types.

This allows the pagination code to work even if the next marker is
not a string but a different type such as a date time.

Fixes bug 1240275

Change-Id: Iee7223a8b6907254b9ab345c592bff208885a36e
Merge "Add GA related parameters to trove-taskmanager.conf.sample"
Merge "Replace deprecated method aliases in tests"