'Retrieve resource info.
This method is called when nova-compute launches, and
as part of a periodic task.
:returns: dictionary describing resources'

def get_available_resource(self):

    LOG.debug('get_available_resource    called')
    (total_mem_mb, free_mem_mb, used_mem_mb) = self._get_memory_info()
    (total_hdd_gb, free_hdd_gb, used_hdd_gb) = self._get_storage_info_gb()
    cpu_info = self._get_cpu_info()
    cpu_topology = cpu_info['topology']
    vcpus = ((cpu_topology['sockets'] * cpu_topology['cores']) * cpu_topology['threads'])
    dic = {'vcpus': vcpus, 'memory_mb': total_mem_mb, 'memory_mb_used': used_mem_mb, 'local_gb': total_hdd_gb, 'local_gb_used': used_hdd_gb, 'hypervisor_type': 'hyperv', 'hypervisor_version': self._get_hypervisor_version(), 'hypervisor_hostname': platform.node(), 'vcpus_used': 0, 'cpu_info': jsonutils.dumps(cpu_info), 'supported_instances': [(obj_fields.Architecture.I686, obj_fields.HVType.HYPERV, obj_fields.VMMode.HVM), (obj_fields.Architecture.X86_64, obj_fields.HVType.HYPERV, obj_fields.VMMode.HVM)], 'numa_topology': self._get_host_numa_topology()._to_json(), 'pci_passthrough_devices': self._get_pci_passthrough_devices()}
    gpu_info = self._get_remotefx_gpu_info()
    dic.update(gpu_info)
    return dic
