Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions rtslib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ def validate_val(self, value, val_type, parent=None):
elif val_type == 'naa':
if is_valid_wwn('naa', value):
valid_value = value
elif val_type == 'qla2xxx_wwn':
if is_valid_wwn('qla2xxx_wwn', value):
valid_value = value
elif val_type == 'backend':
if is_valid_backend(value, parent):
valid_value = value
Expand Down
4 changes: 4 additions & 0 deletions rtslib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,10 @@ def is_valid_wwn(wwn_type, wwn, wwn_list=None):
and re.match(
"[0-9A-Fa-f]{8}(-[0-9A-Fa-f]{4}){3}-[0-9A-Fa-f]{12}$", wwn):
return True
elif wwn_type == 'qla2xxx_wwn' \
and re.match(
"[0-9A-Fa-f]{2}(:[0-9A-Fa-f]{2}){7}$", wwn):
return True
else:
return False

Expand Down