'Log the hypervisor\'s view of free resources.
This is just a snapshot of resource usage recorded by the
virt driver.
The following resources are logged:
- free memory
- free disk
- free CPUs
- assignable PCI devices'

def _report_hypervisor_resource_view(self, resources):

    nodename = resources['hypervisor_hostname']
    free_ram_mb = (resources['memory_mb'] - resources['memory_mb_used'])
    free_disk_gb = (resources['local_gb'] - resources['local_gb_used'])
    vcpus = resources['vcpus']
    if vcpus:
        free_vcpus = (vcpus - resources['vcpus_used'])
    else:
        free_vcpus = 'unknown'
    pci_devices = resources.get('pci_passthrough_devices')
    LOG.debug('Hypervisor/Node    resource    view:    name=%(node)s    free_ram=%(free_ram)sMB    free_disk=%(free_disk)sGB    free_vcpus=%(free_vcpus)s    pci_devices=%(pci_devices)s', {'node': nodename, 'free_ram': free_ram_mb, 'free_disk': free_disk_gb, 'free_vcpus': free_vcpus, 'pci_devices': pci_devices})
