def _get_guest_cpu_config(self, flavor, image):
    cpu = self._get_guest_cpu_model_config()
    if (cpu is None):
        return None
    topology = hardware.VirtCPUTopology.get_best_config(flavor, image)
    cpu.sockets = topology.sockets
    cpu.cores = topology.cores
    cpu.threads = topology.threads
    return cpu
def _get_guest_cpu_config(self, flavor, image):
    cpu = self._get_guest_cpu_model_config()
    if (cpu is None):
        return None
    topology = hardware.VirtCPUTopology.get_best_config(flavor, image)
    cpu.sockets = topology.sockets
    cpu.cores = topology.cores
    cpu.threads = topology.threads
    return cpu