Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:Update
python-rtslib
rtslib-add-srpt_wwn-wwn-type.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File rtslib-add-srpt_wwn-wwn-type.patch of Package python-rtslib
From b39b05fa6d67b7f892aea2e73e70f1c7ee2b7d41 Mon Sep 17 00:00:00 2001 From: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com> Date: Tue, 30 Oct 2018 14:18:29 +0100 Subject: [PATCH] add srpt_wwn wwn type Add validation for srpt_wwn type. Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com> --- rtslib/config.py | 3 +++ rtslib/utils.py | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/rtslib/config.py b/rtslib/config.py index 39e88835a7d2..608b2226cb3d 100644 --- a/rtslib/config.py +++ b/rtslib/config.py @@ -341,6 +341,9 @@ class Config(object): elif val_type == 'qla2xxx_wwn' or val_type == 'fc_wwn': if is_valid_wwn('qla2xxx_wwn', value): valid_value = value + elif val_type == 'srpt_wwn': + if is_valid_wwn('srpt_wwn', value): + valid_value = value elif val_type == 'backend': if is_valid_backend(value, parent): valid_value = value diff --git a/rtslib/utils.py b/rtslib/utils.py index adc3433e70f5..55fd2fee7e72 100644 --- a/rtslib/utils.py +++ b/rtslib/utils.py @@ -565,6 +565,10 @@ def is_valid_wwn(wwn_type, wwn, wwn_list=None): and re.match( "[0-9A-Fa-f]{2}(:[0-9A-Fa-f]{2}){7}$", wwn): return True + elif wwn_type == 'srpt_wwn' \ + and re.match( + "0x[0-9A-Fa-f]{32}$", wwn): + return True else: return False -- 2.18.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor