Remove stubs in favor of mock in test_policy

This patch converts tests_policy to use mock instead of stubs. I was
stealing some tests from nova to another openstack project and made this
change there so I figured nova would benefit from it too.

Change-Id: I6d086795c559ac8f04028d820e8e88bfd5305426
Cleanup and gate on hacking E711 and E712 rule

Fix the offending instances of the rule
and removes it from the ignore list in tox.ini
so that we can gate on E711 and E712 rules.

Most violations were in DB queries. Replace as follows:
  False -> sqlalchemy.sql.false()
  None  -> sqlalchemy.sql.null()
  True  -> sqlalchemy.sql.true()

Change-Id: Id84aa04697d1b3c23dc03195113e296c6715379d
Add APIv2 support to make host optional on evacuate

In the event of an unrecoverable hardware failure, support needs to
relocate an instance to another compute so it can be rebuilt.

The changes involved in this patch are:
  [*] Add a new v2 extension to determine that the host argument
      on evacuate is now optional.(Extended_evacuate_find_host)
  [*] Doc regeneration.

DocImpact: The evacuate target host is now optional.
If 'host' field is not sent in the request, the scheduler will
determine the target host.
This will include nova client changes ( on the proper commit ) to support
this new optional parameter.

Implements: blueprint find-host-and-evacuate-instance

Change-Id: Ib34fb3120263b746ad2f8fe89c14137e36a07a53
Co-Authored-By: Juan M. Olle <juan.m.olle@intel.com>
Co-Authored-By: Andres Buraschi <andres.buraschi@intel.com>
Co-Authored-By: Anuj Mathur <anujm@thoughtworks.com>
Co-Authored-By: Navneet Kumar <navneetk@thoughtworks.com>
Co-Authored-By: Claxton Correya <claxton@gmail.com>
Merge "Cleanup and gate on hacking E711 and E712 rule"
Gate on F402/pep8

rename instances of loop variables to prevent them from shadowing
imports. This strict check was added in hacking 0.9

Change-Id: Ib5e162b85e3c6931f213731c3febd3dd8ba0b4b1
Merge "Remove stubs in favor of mock in test_policy"
Merge "Add APIv2 support to make host optional on evacuate"
Merge "Gate on F402/pep8"