From: bugzilla-daemon@bugzilla.kernel.org
To: linux-scsi@vger.kernel.org
Subject: [Bug 188061] On quad port QLE2564 can't add in target only 2 ports
Date: Mon, 21 Nov 2016 17:38:04 +0000 [thread overview]
Message-ID: <bug-188061-11613-pdNgejUnD7@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-188061-11613@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=188061
--- Comment #4 from Anthony <anthony.bloodoff@gmail.com> ---
>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.
next prev parent reply other threads:[~2016-11-21 17:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-17 23:16 [Bug 188061] New: On quad port QLE2564 can't add in target only 2 ports bugzilla-daemon
2016-11-21 7:28 ` [Bug 188061] " bugzilla-daemon
2016-11-21 8:02 ` bugzilla-daemon
2016-11-21 17:27 ` bugzilla-daemon
2016-11-21 17:38 ` bugzilla-daemon [this message]
2017-03-03 7:37 ` bugzilla-daemon
2017-03-03 17:42 ` bugzilla-daemon
2017-03-04 3:53 ` bugzilla-daemon
2017-03-04 3:56 ` bugzilla-daemon
2017-03-15 21:15 ` bugzilla-daemon
2017-06-26 12:10 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-188061-11613-pdNgejUnD7@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).