[Engine-devel] Vms search issue

Moti Asayag masayag at redhat.com
Tue Mar 18 08:35:38 UTC 2014


Hi,

As a result of patch "core : Search VMs based on MAC address" [1]
The same vm is returned by the search query as the number of its nics.

I'd suggest to revert this patch and not introduce a join between
vnics to vm_static vms: first, it won't return the expected result when
a vm has more than a signle nic, second due to adding great impact on that view.

As an alternative, I'd suggest utilizing the join in the search-engine
with vm_interface_view. See SearchObjectAutoCompleter:

// vms - vm network interface
addJoin(SearchObjects.VM_OBJ_NAME, "vm_guid", SearchObjects.VM_NETWORK_INTERFACE_OBJ_NAME, "vm_guid");

So the query will look like: "vms: vnic.MAC = 'xx:xx:xx:xx:xx:xx'"

[1] http://gerrit.ovirt.org/#/c/25805

Regards,
Moti



More information about the Devel mailing list