mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 23:55:23 +00:00
7ad479d0bd
Rework the code to perform the various searches by parent, parent_wwnn/ parent_wwpn, parent_fabric_wwn, or vport capable in order to return the 'parent_host' number that is vHBA capable. The former virNodeDeviceGetParentHost is renamed to add the ByParent on it fixes an issue where if no parent was supplied in the XML to create the vHBA, then virNodeDeviceFindByName was called with a NULL second parameter which had bad results. The reworked code will make the various calls to fetch the NPIV host by the passed parameter options or if none are provided find a vport capable NPIV HBA to perform the create. If the call is from the delete path, then this option won't be allowed. Each of virNodeDeviceGetParentHostBy* functions is now static, so remove them external definitions. A secondary benefit of this is the test_driver now can make use of the new API to add some new tests to test the various creation options. |
||
---|---|---|
.. | ||
test_driver.c | ||
test_driver.h | ||
test-screenshot.png |