Comment 7 for bug 1830260

Reviewed: https://review.opendev.org/666042
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=ab7d923ae7ed4d7525649bc16ff012c1bedca0f5
Submitter: Zuul
Branch: master

commit ab7d923ae7ed4d7525649bc16ff012c1bedca0f5
Author: Matt Riedemann <email address hidden>
Date: Tue Jun 18 11:13:32 2019 -0400

    Fix GET /servers/detail host_status performance regression

    Change I82b11b8866ac82b05eae04351605d52fa8b91453 moved the
    host_status extended server attribute processing from an
    extension to the main servers view builder. This, however,
    caused a regression in the detailed listing of servers because
    it didn't incorporate the caching mechanism used previously
    by the extension so now for each server with details when
    microversion 2.16 or greater is used (and the request passes
    the policy check), we get the host status per server even if
    we have multiple servers on the same host.

    This moves the host_status processing out of the show() method
    when listing servers with details and processes them in aggregate
    similar to security groups and attached volumes.

    One catch is the show() method handles instances from down cells
    for us so we have to handle that separately in the new host_status
    processing, but it's trivial (just don't get host_status for
    instances without a host field set).

    This reverts commit 0cecd2ac324dc9a20e7d60987b9ef6e5082c426d.

    Change-Id: I8278d4ea993ed1600919e34c9759600c8c7dbb41
    Closes-Bug: #1830260