'Associate VM' works but 'Associate VMs' does not
Description of problem:
It is possible to associate certain VM from a CR by going to VMS, opening VM details and clicking 'Associate VM'. However, clicking 'Associate VMs' on a VM list doesn't associate anything and says 'No VMs matched any host.' even when there is a matching Foreman host.
Version-Release number of selected component (if applicable):
Tested with Sat 6.4 snap 18 with RHEV CR.
Steps to Reproduce:
1. Have a VM on CR
2. Create a Host in Foreman with MAC == VM_mac
3. Infrastructure -> Compute Resources -> <CR> -> Virtual Machines -> Associate VMs
4. "No VMs matched any host." green pop-up
5. Open the VM and click 'Associate VM', it gets associated
VM only gets associated when attempting to associate that certain VM as opposed to trying all the VMs
The VM should have been associated at step 3
In /usr/share/foreman/app/services/compute_resource_host_associator.rb , line 13, compute_resource.vms(:eager_loading => true) returns