https://bugzilla.kernel.org/show_bug.cgi?id=188061 --- Comment #4 from Anthony <anthony.bloodoff@xxxxxxxxx> --- >From rtslib (naa wwn must start with 1 or 2 or 5): def normalize_wwn(wwn_types, wwn): ''' Take a WWN as given by the user and convert it to a standard text representation. Returns (normalized_wwn, wwn_type), or exception if invalid wwn. ''' wwn_test = { 'free': lambda wwn: True, 'iqn': lambda wwn: \ re.match("iqn\.[0-9]{4}-[0-1][0-9]\..*\..*", wwn) \ and not re.search(' ', wwn) \ and not re.search('_', wwn), 'naa': lambda wwn: re.match("naa\.[125][0-9a-fA-F]{15}$", wwn), 'eui': lambda wwn: re.match("eui\.[0-9a-f]{16}$", wwn), 'ib': lambda wwn: re.match("ib\.[0-9a-f]{32}$", wwn), 'unit_serial': lambda wwn: \ re.match("[0-9A-Fa-f]{8}(-[0-9A-Fa-f]{4}){3}-[0-9A-Fa-f]{12}$", wwn), } for wwn_type in wwn_types: clean_wwn = _cleanse_wwn(wwn_type, wwn) found_type = wwn_test[wwn_type](clean_wwn) if found_type: break else: raise RTSLibError("WWN not valid as: %s" % ", ".join(wwn_types)) return (clean_wwn, wwn_type) -- You are receiving this mail because: You are watching the assignee of the bug. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html