Yedidyah Bar David has posted comments on this change.

Change subject: packaging: setup: config broker notifications
......................................................................


Patch Set 6:

(3 comments)

Thanks for all the bugfixes!

....................................................
File src/plugins/ovirt-hosted-engine-setup/ha/ha_notifications.py
Line 122:         self._cfg.read(self._conffile)
Line 123:         if self._cfg.has_section('email'):
Line 124:             for name, value in dict(self._cfg.items('email')).items():
Line 125:                 if name in smtp_config:
Line 126:                     smtp_config[name] = value
else:
     add_section('email')
Line 127: 
Line 128:         interactions = (
Line 129:             {
Line 130:                 'name': ohostedcons.Const.HA_NOTIF_SMTP_SERVER,


Line 165:                 'validation': lambda value: (
Line 166:                     None not in [
Line 167:                         self._RE_EMAIL_ADDRESS.match(addr)
Line 168:                         for addr in value.split(',')
Line 169:                         if addr is not ''
Is this really needed? I think it means we'll accept '[email protected],,[email protected]'.
Line 170:                     ]
Line 171:                 ),
Line 172:             },
Line 173:         )


Line 181:                         name='DIALOG' + item['envkey'],
Line 182:                         note=item['note'],
Line 183:                         prompt=True,
Line 184:                         caseSensitive=True,
Line 185:                         default=smtp_config[item['name']]
I wrote the code setting smtp_config before the code with self._cfg, but did 
not really use it eventually...
I intended to edit it later but eventually only edited self._cfg.

You might better rename smtp_config to default_smtp_config. Might as well put 
it entirely in constants.
Line 186:                     )
Line 187:                 if 
item['validation'](self.environment[item['envkey']]):
Line 188:                     valid = True
Line 189:                 else:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib49f0534b5f8a9918558a82d40cc9828ccf87868
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-hosted-engine-setup
Gerrit-Branch: master
Gerrit-Owner: Yedidyah Bar David <[email protected]>
Gerrit-Reviewer: Greg Padgett <[email protected]>
Gerrit-Reviewer: Martin Sivák <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Yedidyah Bar David <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to