Skip to content

Commit

Permalink
Merge pull request #191 from maurizio-lombardi/max_luns_rm
Browse files Browse the repository at this point in the history
rtslib: remove the limit of 255 max mapped LUNs
  • Loading branch information
maurizio-lombardi authored Dec 14, 2022
2 parents fd14cd7 + bdea9d0 commit 32bcb43
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions rtslib/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,8 +1060,6 @@ class MappedLUN(CFSNode):
the initiator node as the MappedLUN.
'''

MAX_LUN = 255

# MappedLUN private stuff

def __repr__(self):
Expand Down Expand Up @@ -1108,9 +1106,8 @@ def __init__(self, parent_nodeacl, mapped_lun,
except ValueError:
raise RTSLibError("The mapped_lun parameter must be an " \
+ "integer value")

if self._mapped_lun < 0 or self._mapped_lun > self.MAX_LUN:
raise RTSLibError("Mapped LUN must be 0 to %d" % self.MAX_LUN)
if self._mapped_lun < 0:
raise RTSLibError("Mapped LUN must be >= 0")

self._path = "%s/lun_%d" % (self.parent_nodeacl.path, self.mapped_lun)

Expand Down

0 comments on commit 32bcb43

Please sign in to comment.