v2:
https://www.redhat.com/archives/libvir-list/2017-July/msg00661.html
Changes since v2:
* Patch 1 - make the requested logic adjustment
* Patch 2 - no change
* Patch 3 - make this *just* the check that the provided @parent_name
is a valid fc_host (whether it's vHBA or HBA).
* Patch 4 - Alter the checkParent logic to cause a failure if the
passed @name (from the wwnn/wwpn's provided) are for an
HBA instead of a vHBA. Make this an invalid configuration.
Modify the docs to describe that the provided wwnn/wwpn
must be for an existing vHBA, are to be used to create a
vHBA, but cannot be from an existing HBA.
NB: No change to the Destroy code since it's possible one
of these exists and there needs to be a way to shut it down.
The failure could turn into a "conversion" of sorts as well
by changing the type to 'scsi_host', saving the generated
scsi_host name, removing the parent and wwnn & wwpn fields.
Tested using my vHBA system with various valid and invalid configurations.
John Ferlan (4):
storage: Fix existing parent check for vHBA creation
storage: Remove @conn from virNodeDeviceCreateVport
storage: Check if provided parent is vHBA capable
storage: Disallow usage of the HBA for a fc_host backing
docs/formatstorage.html.in | 27 ++++++-----
src/conf/node_device_conf.c | 63 ++-----------------------
src/conf/node_device_conf.h | 3 +-
src/storage/storage_backend_scsi.c | 94 +++++++++++++++++++++++++++++++++++++-
4 files changed, 112 insertions(+), 75 deletions(-)
--
2.9.4