Replace assertTrue(not *) with assertFalse(*)

Replacements were done in tests to have
clearer messages in case of failure

Change-Id: I7eedc62e0d570ee5818c4aa9b28ad8163c63b775
Replace assertTrue/False with assertIn/NotIn

The following replacements were done in tests to have
clearer messages in case of failure:
- assertTrue(* in *) with assertIn
- assertTrue(* not in *) with assertNotIn
- assertFalse(* in *) with assertNotIn

assertTrue/False with custom error messages weren't
replaced because assertIn/NotIn doesn't have argument
'message' and we'll lose error messages if we replace it.

Also assertTrue/False with operator 'any' were
replaced with more simpler asserts assertIn/NotIn.

Change-Id: If5e78db21d5302259a4d69fd82c62baf39a5d8f8
Add API schema for v2.1/v3 flavors_extraspecs API

By defining the API schema, it is possible to separate the validation
code from the API method. The API method can be more simple.
In addition, a response of API validation error can be consistent for
the whole Nova API.

Partially implements blueprint v3-api-schema

Change-Id: I71f89b59dd4e542d2befa971182cc587b6fec269
Mask node.session.auth.password in volume.py _run_iscsiadm debug logs

The iscsi_command object passed to _run_iscsiadm can contain passwords
that get logged at debug level, so we need to sanitize the message
getting logged.

Adds a test to ensure the logged message is properly sanitized.

Closes-Bug: #1320028

Change-Id: I33f1a5b698368504721b41e56266162a713b3ce6
Change compute updates from periodic to on demand

Currently, all compute nodes update status info in the DB on a periodic
basis (the period is currently 60 seconds). Given that the status of
the node only changes at specific points (mainly image
creation/destruction) this leads to significant DB overhead on a large
system. This BP changes the update mechanism to only update the DB when
a node state changes by keeping an old copy of the state info and
only updating the DB if the new state info is different.

Docimpact - check to see if there's a documentation impact to this change.

Change-Id: I19c174488b61977358a4d617cc4b590e317e665a
Implements: blueprint on-demand-compute-update
VMware: validate the network_info is defined

Ensure that the network info is defined correctly prior to allocating
networks.

Commit 6fb9cc8b278ceab05e65e1c5145141203211d246 caused a degradation.

Change-Id: I74eddc0ff744ee5d80df825a52527c67583bacea
Fixes Hyper-V SCSI slot selection

Currently, when attaching volumes, the Hyper-V driver selects the
slot on the SCSI controller by using the number of drives
attached to that controller.

This leads to exceptions when detaching volumes having lower
numbered slots and then attaching a new volume, as Hyper-V will
then try to use an occupied slot.

This patch fixes the issue by simply getting a list of used slots
and getting a slot that it's not among those. It also checks
for the slot number to be smaller than the maximum number of slots
per SCSI controller.

Fixes bug: #1329764

Change-Id: Id0c09c4debc848004a78971670cc3caef2f77ce3
Use oslo.i18n

oslo.i18n provides the i18n functions that were provided by
oslo-incubator's gettextutils module. Some tests that were
using internal details of the library were removed.

Change-Id: I44cfd5552e0dd86af21073419d31622f5fdb28e0
Merge "Add API schema for v2.1/v3 flavors_extraspecs API"
Merge "Change compute updates from periodic to on demand"
Merge "Use oslo.i18n"
Merge "Mask node.session.auth.password in volume.py _run_iscsiadm debug logs"
Merge "Replace assertTrue/False with assertIn/NotIn"
Merge "Fixes Hyper-V SCSI slot selection"
Merge "VMware: validate the network_info is defined"
Merge "Replace assertTrue(not *) with assertFalse(*)"