1. 19 2月, 2017 6 次提交
    • J
      util: Create a new virvhba module and move/rename API's · 16416816
      John Ferlan 提交于
      Rather than have them mixed in with the virutil apis, create a separate
      virvhba.c module and move the vHBA related calls into there. Soon there
      will be more added.
      
      Also modify the names of the functions and some arguments to be more
      indicative of what is really happening. Adjust the callers respectively.
      
      While I was changing fchosttest, rather than the non-descriptive names
      test1...test6, rename them to match what the test is doing.
      16416816
    • J
      test: Fix fchosttest resource leak · 9588a21b
      John Ferlan 提交于
      Commit id '666bee39' made fabric_name optional; however, if fabric name
      was present, then a leak would occur.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      9588a21b
    • J
      tests: Create a more realistic vHBA · 8729ce56
      John Ferlan 提交于
      Modify the code to react more like a real HBA -> vHBA creation.
      
      Currently the code would just modify the input XML definition to
      set the name to a wwpn and then modify the scsi_host capability
      entry for the defintion to change the scsi_host# and unique_id
      before adding that into the node device.
      
      This patch does things a bit better. It finds and copies a known
      existing vHBA (scsi_host11) in the node_device database and modifies
      that definition to change the name to scsi_host12 and set the wwnn/
      wwpn to what the input XML would expect before adding the def to the
      node device object list.
      
      Then rather than create a returned "dev" using the (poorly) mocked
      name - perform the lookup using the new device name.
      8729ce56
    • J
      test: Add helper to create vHBA for testNodeDeviceCreateXML · 0869d9b3
      John Ferlan 提交于
      Rather than inline the dummy creation of a vHBA to add to the node
      devices - create a helper to do that work.
      
      Also just tidy up a couple of things while at it...
      0869d9b3
    • J
      test: Add new NPIV capable HBA and a vHBA · 5c2ff641
      John Ferlan 提交于
      Predefine a second NPIV capable HBA as well as a vHBA using the first
      NPIV capable HBA. This will allow for a mechanism to perform more
      realistic create vHBA testing.
      5c2ff641
    • J
      tests: Alter test_driver HBA name/data to be closer to reality · 779e4905
      John Ferlan 提交于
      Alter "test-scsi-host-vport" to be "scsi_host1" to match the real
      environment. This is the vport capable HBA - IOW the NPIV device.
      Add more fields to scsi_host1 as well.
      
      Alter the XML being used by the objecttest to create a vHBA in order
      to match the scsi_host1 parent name and to use validateable wwnn/wwpn.
      This will allow for realistic testing.
      779e4905
  2. 18 2月, 2017 1 次提交
    • R
      nodedev: fix build with clang · d3ffa0ec
      Roman Bogorodskiy 提交于
      Build fails with:
      
      conf/node_device_conf.c:825:62: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-compare]
          if ((data->drm.type = virNodeDevDRMTypeFromString(type)) < 0) {
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
      conf/node_device_conf.c:1801:59: error: comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-compare]
              if ((type = virNodeDevDevnodeTypeFromString(tmp)) < 0) {
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
      2 errors generated.
      
      Fix by using intermediate variable to store the result similarly
      to how it's done for other FromString* calls.
      d3ffa0ec
  3. 17 2月, 2017 10 次提交
  4. 16 2月, 2017 8 次提交
  5. 15 2月, 2017 8 次提交
  6. 14 2月, 2017 2 次提交
  7. 13 2月, 2017 5 次提交