def METHOD_NAME(test, scsi_host="", wwnn="", wwpn="", parent_scsi_host="",
                method="virsh", fc_host_dir="/sys/class/fc_host"):
    """
    Delete a vhba, can use 'virsh nodedev-destroy' or echo wwpn:wwnn to
    a hba's vport_delete.
    """
    if method == "virsh":
        logging.debug("using *virsh nodedev-destroy*")
        if not scsi_host:
            test.fail("A scsi host must be provided for "
                      "'virsh' command to delete vhba.")
        npiv.nodedev_destroy(scsi_host)
    elif method == "echo":
        logging.debug("using *echo*")
        if (not wwnn) or (not wwpn) or (not parent_scsi_host):
            test.fail("wwnn, wwpn and parent scsi must be "
                      "provided for 'echo' command to delete "
                      "vhba.")
        parent_host = parent_scsi_host.split("_")[1]
        cmd = "echo '%s:%s' > %s/%s/vport_delete"\
              % (wwpn, wwnn, fc_host_dir, parent_host)
        cmd_result = process.run(cmd, shell=True)
        if cmd_result.exit_status:
            test.fail("Failed to use echo to delete vhba.")
    else:
        test.fail("method must be 'virsh' or 'echo'")