Use six.moves.urllib.parse instead of urlparse

To keep Python 3.x compatibility, use six.moves.urllib.parse to
replace urlparse.

Closes-Bug: #1279611
Change-Id: I1867ef3ab0fd13cc7fd0875b419e06c2d96963c2
Remove unused variables

o trove/backup/models.py:SWIFT_CONTAINER = CONF.backup_swift_container

  This variable was added in the following commit.

    commit ce208d6cabba227576f492e7647d9da5a89e7c25
    Author: ruiyuan-shen <ruiyuan.shen@hp.com>
    Date:   Mon Mar 18 14:07:37 2013 -0700

        Add snapshot ORM to reddwarf

  But there is no evidence that was used.

o trove/dns/rsdns/driver.py:DNS_HOSTNAME = CONF.dns_hostname

  This variable was added in the following commit.

    commit 0c34c75dc44876245709987a18ea004607fca815
    Author: Sudarshan Acharya <sudarshan.acharya@rackspace.com>
    Date:   Fri May 18 15:49:12 2012 -0500

        DNS Support for Instance IP.

  But there is no evidence that was used.

o trove/instance/models.py:SERVER_INVALID_ACTION_STATUSES
   = ["BUILD", "REBOOT", "REBUILD", "RESIZE"]

  This variable was removed in the following commit.

    commit 54a4ada785fd90af5134e7f38360938e0b435696
    Author: Ed Cranford <ed.cranford@rackspace.com>
    Date:   Thu Jul 12 15:01:01 2012 -0500

        Delete can now delete errored instances.

o trove/instance/models.py:VALID_ACTION_STATUSES = ["ACTIVE"]

  This variable was removed in the following commit.

    commit 9ccef6fea42454bb22c0d67bd4d2a0765f13d370
    Author: Tim Simpson <tim.simpson@rackspace.com>
    Date:   Wed Jun 27 11:12:28 2012 -0500

        Allowing resizes to be performed when MySQL is down.

Closes-Bug: #1286990
Change-Id: I79f5bb124f2702317d8d337c969c9ff8ea69a769
Removes XML api from trove

The XML api is no longer a requirement, as dictated by the TC.

implements blueprint destroy-xml-api

Change-Id: Ib4669155c19562ae1dda75cd30ad1a8f92b6be6a
Test restore full and restore incremental

Closes-Bug: #1280487
Change-Id: I29ce959d595a604b2df1adf7beec6ade5030105e
Fixes insecure update of /etc/fstab file

Reasons:
- While updating /etc/fstab in write_to_fstab in
  trove/guestagent/volume.py, the temporary file-name was easy to
  guess and had a permanent name making it prone to unwanted access.
- The temporary file-permission was set to 666, making it insecure.

Changes:
- Uses NamedTemporaryFile for temporary file creation.
- Used file reading instead of copying the file.
- These changes eliminate the chances of guessing the file-name,
  as well as updating the same.

Change-Id: I07c3980e40fe218d35605a851a17535cd3972c11
Closes-Bug: #1267991
Fixed Instance Status usage

    Instance Status in Instance Service Status were inconsistently
    used in the code base.  Sometime strings were used in places of
    object. Sometimes the wrong object type was used in place of
    another.  Sometimes lower-case strings were compared to
    upper-case string
    Added comments and type hints in various classes
    to prevent further issues and to aid in troubleshooting
    Changed usage of mysql to datastore in instance and task
    functions

Partially Implements: blueprint improve-instance-status
Change-Id: I3e36d4ab879073b685a0585d02a62dfe157a5b3c
Make hostnames in designate driver all lower case

Currently hostnames are uppercase, this enforces lower case which
is the norm when specifying hostnames.

Closes-bug: 1291189
Change-Id: Ief92bc1aeffddd5dee99cd19d703c8a75bc50845
Parses default configuration of an instance

The call to get the default configuration of an instance failed if the
my.cnf template has a key with no value.

Change-Id: Ib0ea6166b25ccd0e230cd97c22c419b432484c92
Closes-Bug: #1291158
Add timeout on prepare call per datastore

Reasons:
 - each datastore requires its own timeout due to amount of
   time that needed for packages to be installed and time
   that needed for start scripts.

Changes:
 - timeout option per datastore proposed.

Change-Id: I111e4d9384668ed341dab2d27f7795979dc2ceba
Implements: blueprint timeout-per-datastore
Merge "Add timeout on prepare call per datastore"
Merge "Fixed Instance Status usage"
Merge "Parses default configuration of an instance"
Removes volumes redefinition in fake nova_client

Reasons:
- The redefinition of nova_client.volumes was making it,
  nova_client.volumes.volumes, if we needed to call the volume APIs
  from nova_client.
- nova_client.volumes is already defined when defining "class FakeClient".

Changes:
- Removes redefinition of nova_client.volumes.

Change-Id: I5981d461e5a0fd000214c35d5d0be58d86d6d368
Closes-Bug: #1292457
Hide Datastores In List With No Active Versions

in a datastore-list operation, for non-admin, filters out
datastores that either have no versions or have no active
versions for non-admin users. admins continue to see all
datastores, active or inactive, in a datastore-list
operation.

Change-Id: Iccaf9ae59469fd0f4cb346ee258d3132eed83660
Co-Authored-By: Andrey Shestakov <ashestakov@mirantis.com>
Closes-Bug: #1290617
Improve Datastore Not Implemented exceptions

Added exception for not implemented exceptions
that indicates the operation name.
Added missing un-implemented methods to redis.
Change handling of remote errors from guest agent
api to only pass along the root exception message
rather than the full traceback

Change-Id: I0d4fdc5340bfb40370595636cc57cc5c87889507
Closes-Bug: #1276860
Fix Timestamp diff in Instance and Notification

    Code is updating timestamp to clear out task status after it
    has already completed the task and updated the instance db
    info.  Made this an single transaction so that the timestamp
    in the db matches the actual action and the notification

Closes-Bug: 1236620

Change-Id: Iaa59f6e6d0b958e79b0491bfa2a838f5896d9705
Merge "Make hostnames in designate driver all lower case"
Merge "Improve Datastore Not Implemented exceptions"
Merge "Removes XML api from trove"
Merge "Fix Timestamp diff in Instance and Notification"