• J
    nodedev: Rework virNodeDeviceGetParentHost · 7ad479d0
    John Ferlan 提交于
    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.
    7ad479d0
test_driver.c 203.1 KB