Codebase list python-rtslib-fb / 02e66cf
Relax restrictions on TPG Tag range Currently rtslib forbids TPG Tag 0. According to https://tools.ietf.org/html/rfc7143#section-13.9 this is perfectly legal value, and I've tested it with Linux, Windows, ESXi and AIX initiators. This commit relaxes the restriction and allows TPG Tag to be 0. I've kept current behavior in automatic tags assignment so nothing changes there (e.g. the first TPG will be 1 unless the user explicitly tells otherwise). Consus 3 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
158158 @param parent_target: The parent Target object of the TPG.
159159 @type parent_target: Target
160160 @param tag: The TPG Tag (TPGT).
161 @type tag: int > 0
161 @type tag: positive int
162162 @param mode:An optionnal string containing the object creation mode:
163163 - I{'any'} means the configFS object will be either looked up or
164164 created.
180180 raise RTSLibError("Cannot find an available TPG Tag")
181181 else:
182182 tag = int(tag)
183 if not tag > 0:
184 raise RTSLibError("The TPG Tag must be >0")
183 if tag < 0:
184 raise RTSLibError("The TPG Tag must be >=0")
185185 self._tag = tag
186186
187187 if isinstance(parent_target, Target):