1. 21 2月, 2017 18 次提交
  2. 20 2月, 2017 12 次提交
  3. 19 2月, 2017 10 次提交
    • P
      165c76ac
    • J
      tests: Add createVHBAByNodeDevice-parent-fabric-wwn to fchosttest · f3b1b981
      John Ferlan 提交于
      Add a test that allows providing the parent fabric_wwn in the input XML
      in order to create the vHBA.
      
      This also fixes a mixed setting of the fabric_wwn field from the read
      test driver XML strings.
      f3b1b981
    • J
      tests: Add createVHBAByNodeDevice-parent-wwn to fchosttest · 19ff4361
      John Ferlan 提交于
      Add a test that allows providing the parent wwnn/wwpn in the input XML
      in order to create the vHBA.
      19ff4361
    • J
      tests: Add createVHBAByNodeDevice-no-parent to fchosttest · 5319c49c
      John Ferlan 提交于
      Add a test that allows not providing a parent in the input XML, but still
      being able to create finding a VPORT capable NPIV HBA.
      5319c49c
    • 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
    • J
      nodedev: Keep the node device lock longer in nodeDeviceDestroy · ccb0d6e3
      John Ferlan 提交于
      While perhaps improbable, it could be possible that after finding our
      object that another thread running essentially in parallel could attempt
      to delete the same vHBA.
      
      So rather than dropping the lock right after finding the object, keep
      the lock around while we drop the object lock and work on deleting the
      object. Once the delete occurs we can safely drop the driver lock again.
      
      Cleanup some of the usage of cleanup instead out for the goto label.
      ccb0d6e3
    • J
      tests: Add new fchosttest tests for management of a vHBA · 4b6ee784
      John Ferlan 提交于
      Add a test that will mimic creation and destruction of a vHBA
      by using node device XML. The design will allow for testing the
      multiple mechanisms.
      
      The first test uses just <parent> in the node device XML. This is
      somewhat similar to the existing objecteventtest, except that this
      test will not provide input wwnn/wwpn's (similar to how the process
      is described for the the libvirt wiki).
      
      This requires mocking the virRandomGenerateWWN since parsing the
      input XML (virNodeDevCapSCSIHostParseXML) requires either a provided
      wwnn/wwpn in the XML or the ability to randomly generate the wwnn/wwpn.
      4b6ee784
    • J
      util: Move scsi_host specific functions from virutil · 03346def
      John Ferlan 提交于
      Create a virscsihost.c and place the functions there. That removes the
      last #ifdef __linux__ from virutil.c.
      
      Take the opporunity to also change the function names and in one case
      the parameters slightly
      03346def
    • J
      util: Replace virStoragePoolGetVhbaSCSIHostParent · d2d74a98
      John Ferlan 提交于
      Use the new virNodeDeviceGetParentName instead. Modify the callers to
      build the node device scsi_host# name string in order to call the new
      function so that proper lookup occurs.
      d2d74a98
    • J
      nodedev: Introduce virNodeDeviceGetParentName · aa6aa624
      John Ferlan 提交于
      Create a function which takes a node device "name" entry to lookup
      and returns a string containing the parent name for the node device.
      aa6aa624