Jiří Moskovčák has posted comments on this change.

Change subject: packaging: setup: iSCSI support
......................................................................


Patch Set 10: Verified-1

(4 comments)

I'm not able to get pass creating the VM. Sent the logs to Sandro for further 
analysis.

http://gerrit.ovirt.org/#/c/26501/10/src/plugins/ovirt-hosted-engine-setup/storage/iscsi.py
File src/plugins/ovirt-hosted-engine-setup/storage/iscsi.py:

Line 77:                     if match:
Line 78:                         valid = True
Line 79:                         for i in match.groups():
Line 80:                             valid &= int(i) >= 0
Line 81:                             valid &= int(i) < 255
you can avoid this for and if branch if you use a better regexp which will 
match only valid IP
Line 82:                 if not valid:
Line 83:                     raise ValueError(_('Address must be a valid IP 
address'))
Line 84:             except ValueError as e:
Line 85:                 if self.environment[


Line 109:                 )
Line 110:             try:
Line 111:                 int_port = int(port)
Line 112:                 if int_port > 0 and int_port < 65536:
Line 113:                     valid = True
minor: if you just break here, you can get rid of the valid variable
Line 114:                 else:
Line 115:                     raise ValueError(_('Port must be a valid port 
number'))
Line 116:             except ValueError as e:
Line 117:                 if 
self.environment[ohostedcons.StorageEnv.ISCSI_PORT] is None:


Line 171:                     default=default,
Line 172:                     validValues=values,
Line 173:                 )
Line 174:             self._validate_domain(target)
Line 175:             valid = True
again, you can just break here and get rid of the valid variable
Line 176:         self.environment[ohostedcons.StorageEnv.ISCSI_TARGET] = target
Line 177: 
Line 178:     def _iscsi_discovery(self, address, port, user, password):
Line 179:         targets = self.serv.s.discoverSendTargets(


Line 361:                     port,
Line 362:                     user,
Line 363:                     password,
Line 364:                 )
Line 365:                 valid_access = True
again, a break can save you a variable
Line 366:             except RuntimeError as e:
Line 367:                 self.logger.debug('exception', exc_info=True)
Line 368:                 self.logger.error(e)
Line 369:                 if not self._interactive:


-- 
To view, visit http://gerrit.ovirt.org/26501
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ide79a130b730d95d3545dcfb80b1b01dfeaf2b12
Gerrit-PatchSet: 10
Gerrit-Project: ovirt-hosted-engine-setup
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadg...@redhat.com>
Gerrit-Reviewer: Jiří Moskovčák <jmosk...@redhat.com>
Gerrit-Reviewer: Lev Veyde <lve...@gmail.com>
Gerrit-Reviewer: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-Reviewer: Simone Tiraboschi <stira...@redhat.com>
Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to