'Shows the physical/usage resource given by hosts.
:param id: hostname
:returns: expected to use HostShowTemplate.
ex.::
{\'host\': {\'resource\':D},..}
D: {\'host\': \'hostname\',\'project\': \'admin\',
\'cpu\': 1, \'memory_mb\': 2048, \'disk_gb\': 30}'

@wsgi.Controller.api_version('2.1', '2.42')
@extensions.expected_errors(404)
def show(self, req, id):

    context = req.environ['nova.context']
    context.can(hosts_policies.BASE_POLICY_NAME)
    host_name = id
    try:
        mapping = objects.HostMapping.get_by_host(context, host_name)
        nova_context.set_target_cell(context, mapping.cell_mapping)
        compute_node = objects.ComputeNode.get_first_node_by_host_for_old_compat(context, host_name)
        instances = self.api.instance_get_all_by_host(context, host_name)
    except (exception.ComputeHostNotFound, exception.HostMappingNotFound) as e:
        raise webob.exc.HTTPNotFound(explanation=e.format_message())
    resources = [self._get_total_resources(host_name, compute_node)]
    resources.append(self._get_used_now_resources(host_name, compute_node))
    resources.append(self._get_resource_totals_from_instances(host_name, instances))
    by_proj_resources = self._get_resources_by_project(host_name, instances)
    for resource in six.itervalues(by_proj_resources):
        resources.append({'resource': resource})
    return {'host': resources}
