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
Provide service type management code structure

Reasons for refactoring:
- current code structure is orientied on mysql management implementation;
- there is no chanse to make new service types management
code fittable in current package/module structure;
- backuping process implementation is mysql/percona-orientied,
it should be renamed and should be configurable due to service type;
- "query" is abstract word for querying into database,
current query.py implementation is SQL orientied - it should be renamed;

Updates:
1.Providing new package hierarchy:
   guestagent/manager/service_type/service.py
   guestagent/manager/service_type/manager.py
   guestagent/manager/service_type/system.py
2.Renaming strategy implementations per each service_type
   guestagent/strategies/backup/mysql_impl.py
3.Externalizing operating system definer form system.py
 which used in pkg.py
4.Renaming query to sql_query.

Implement: blueprint refactor-ga-for-other-engines-support
Change-Id: I5fa5f037056bedf5464e99720cbe03b877c27fba
Moved create_instance DNS attempt to post-prepare

Moved the actual attempt to add DNS to after the prepare call because of
two issues 1) instances that have failures on DNS end up in a condition
in which the container is unusable - there is no support to send a
prepare call otherwise and 2) DNS isn't required for any operations
after it's addition thus making it a gating operation for prepare makes
no sense because if there is a failed DNS request, retrying that
operation is much less complex than re-issuing a prepare call and
support teams can handle this by hand.

blueprint trove-taskmanager-send-prepare-before-dns

Change-Id: I51fa2115e3d52a85aa87970903922f25bae3bf9f
Simulates events so run_tests.py executes 10x faster

This restores some functionality that had been removed earlier to use
a class from Oslo. It turns out making it work with the new Oslo RPC
manager code wasn't too hard, plus the new version is hopefully easier
to follow.

Change-Id: I18e4d06359f28605cd764a10ace791997f534ed7
Implements: blueprint bring-back-event-simulator
Merge "Fixes pagination with non-string markers types."
Fix service_type in instance creation using heat services

parameters supplied to heat template should use service_type instead of hard-coded mysql

Fixes: Bug 1241655

Change-Id: I3cce6b35fc40f4ff4cc45b04714067956fb1869c
Fix User ID in Context and Notifications

    Notifications should contain the User ID not the User Name
    This change replaces the deprecated X-User header with
    X-User-Id.  In most cases, the User ID is preferred over the
    name.

Fixes: Bug 1235145
Change-Id: I3cce6b35fc40f4ff4cc45b04714067956fb1864c
Merge "Fix User ID in Context and Notifications"
Security groups workflow update

Changes: Creating new Instance Task Status for Security groups
         Updating statuses if exception happend.

If security groups quota exceeded trove-api falls into exception
with updating instance task and service task statuses
to inform user that exception happend while security groups creation

Moving secgroup provision logic to the task manager

Author: Steve Leon <steve.leon@hp.com>
Co-Authored-By: Denis M <dmakogon@mirantis.com>

Change-Id: I74def4a4489951139ce8462104f1d7987c4f2fca
Implements: blueprint security-groups-workflow-update
Add tests for hosts mgmt commands

* moving the tests from trove-integration for host command

Implements: Blueprint host-mgmt-tests

Change-Id: I947ae348ebd0ff83625476f0b28180db8f50afdb
Fix white_box mode for integration tests.

* Removing outdated logic and old test paths that are
  hit when running instances tests in white_box mode.

Fixes: Bug #1243793
Change-Id: I944b63b9cf9ca0f5d8d2139cb2974f4c804ca30a
Merge "Provide service type management code structure"
Merge "Add tests for hosts mgmt commands"
Merge "Simulates events so run_tests.py executes 10x faster"
Add Backup/Restore Checksum Validation

Store the swift checksum for swift storage backups. The swift checksum is
the checksum of the concatenated segment checksums.  This is the checksum
that is stored with the DB backup record so we can verify that the checksum
on restore through a swift object HEAD call.

Adds restore from backup checksum validation at API and guestagent level.
* Integrate checksum verification with check object exists at API level.
* Verify checksum right before downloading swift file.
* Verify the current swift backup file checksum matches the original backup
  checksum to prevent loading and restoring a tampered backup file.

Add swift checksum storage unit tests

Also move backup verification logic outside quotas.

Implements: blueprint verify-backup-checksum-on-restore
Change-Id: I2844cfb8a8b31f6ea7622f99eff3bea9455161e1
Merge "Fix white_box mode for integration tests."
Merge "Fix service_type in instance creation using heat services"
Fix bug in Security Group association to Instance

* Refactor of security groups to TaskManager left out an assignment that
  is required for the security_group to be attached to an intance.

fixes bug 1245767

Change-Id: I161d50b2ddb50dbf25eb67e10414425f098b9979
Merge "Add Backup/Restore Checksum Validation"
Merge "Fix bug in Security Group association to Instance"