Don't mask out HostState details in WeighedHost

WeighedHost's __repr__ was poking under the HostState hood to use
.host in its own __repr__ but this hides some important details.
Specifically it hides the hypervisor_hostname, which is important for
Ironic as one 'node' can have thousands of hostnames. The other
details such as available RAM and so on are also useful for ops trying
to debug scheduling issues, so rather than add hypervisor_hostname, I
am just delegating to the underlying __repr__.

Change-Id: I79e55c32b3d0768430132275ebe050f38c63bc87
servers list API support specify multi-status

Currently the service list API allows the user to specify an optional status
value to use as a filter - for example to limit the list to only servers with
a status of Active.

However often the user wants to filter the list by a set of status values,
for example list servers with a status of Active or Error,
which requires two separate API calls.

Allowing the API to accept a list of status values would reduce this to a
single API call.
Allow to specify status value for many times in a request.
For example::
    GET /v2/{tenant_id}/servers?status=ACTIVE&status=ERROR
    GET /v3/servers?status=ACTIVE&status=ERROR
V2 API extension::
    {
        "alias": "os-server-list-multi-status",
        "description": "Allow to filter the
            servers by a set of status values.",
        "links": [],
        "name": "ServerListMultiStatus",
        "namespace": "http://docs.openstack.org/compute/ext/
            os-server-list-multi-status/api/v2",
        "updated": "2014-05-11T00:00:00Z"
    }

DocImpact: Adds os-server-list-multi-status extension.

blueprint servers-list-support-multi-status

Change-Id: Id0109c56070e2f920be0f95738749aa969258bc1
Fix duplicated images in test_block_device_mapping

In test_block_device_mapping, each test can select to specify
image_ref, block_device_mapping or both. The "both" should be
negative tests because nova API gets image_id from either image_ref
or block_device_mapping.
However, there are some "both" tests which are not their purposes.
This patch fixes these tests for their purposes by passing True as
no_image.

These bugs were found through jsonschema validation framework
development, because the schema could detect "both" cases fastly
and these tests could not get their purposes.

Change-Id: I73f1a15d8e08a3eda3190e660338e274358ddd33
Remove ESXDriver from Juno.

1. Removes the VMwareESXDriver code in nova/virt/vmwareapi/driver.py
by either deleting the redundant methods or moving them to
VMwareVCDriver.
2. Changes the test cases to use VMwareVCDriver and also removes
duplicate test cases which were previously being testing both
VMwareESXDriver and VMwareVCDriver to just the latter.

DocImpact
Closes-Bug: #1346637
Change-Id: I718fc0ee67dbd625af00c20fa4e34b8a35015437
Make network/api.py use Network object for associations

This makes the network/api.py module use the Network object for
network host and project associate/disassociate operations. There
was very little testing of this, so this patch adds/corrects tests
to verify object behavior.

Related to blueprint compute-manager-objects-juno

Change-Id: I5c0d61be35fc4edf647e572c746515988651bcc0
Fixes wrong usage of mock.assert_not_called()

There is no method assert_not_called in mock, use
assertFalse(mock.called) instead of that.

Change-Id: I846c37fe79931c85384950f6ad6ecd79d4071fec
Optimize db.floating_ip_deallocate

'select for update' and 'update' operations
were combined into a single 'update' operation

problems with 'select for update' relate to
spec https://review.openstack.org/#/c/97310/1

now 'floating_ip_deallocate' function returns
number of updated rows in db

Partial-Bug: #1343613

Change-Id: I60f5a8f3e1541983dea1589783927107c00c5fa4
Catch NeutronClientException when showing a network

When a network id can't be found, neutronclient raise
NetworkNotFoundClient exception, but this exception is not
handled by nova. This will cause a 500 error.
This patch fixes this bug.

Closes-Bug: #1286969
Change-Id: Ia96c9668c74374476d4dccdbdb281e99d91b0088
Merge "servers list API support specify multi-status"
Merge "Remove ESXDriver from Juno."
Merge "Catch NeutronClientException when showing a network"
Merge "Fix duplicated images in test_block_device_mapping"
Merge "Make network/api.py use Network object for associations"
Merge "Don't mask out HostState details in WeighedHost"
Merge "Fixes wrong usage of mock.assert_not_called()"
Merge "Optimize db.floating_ip_deallocate"