Alon Bar-Lev has posted comments on this change.

Change subject: WIP: packaging: setup: host rename
......................................................................


Patch Set 11: (7 inline comments)

....................................................
File packaging/setup/plugins/ovirt-engine-rename/core/postinstall.py
Line 50:     def _setup(self):
Line 51:         self.environment[
Line 52:             osetupcons.CoreEnv.FILES_TO_BE_MODIFIED
Line 53:         ].append(osetupcons.FileLocations.
Line 54:             OVIRT_SETUP_POST_INSTALL_CONFIG)
) is out of place.
Line 55: 
Line 56:     @plugin.event(
Line 57:         stage=plugin.Stages.STAGE_MISC,
Line 58:         priority=plugin.Stages.PRIORITY_LAST,


Line 64:             )
Line 65:         )
Line 66:         self.environment[osetupcons.ConfigEnv.FQDN] = self.environment[
Line 67:             osetupcons.RenameEnv.FQDN
Line 68:         ]
I think this^ should be done at customization or validation.
Line 69:         content = ['[environment:default]']
Line 70:         for c in osetupcons.__dict__['__osetup_attrs__']:
Line 71:             for k in c.__dict__.values():
Line 72:                 if hasattr(k, '__osetup_attrs__'):


Line 89:                 modifiedList=self.environment[
Line 90:                     otopicons.CoreEnv.MODIFIED_FILES
Line 91:                 ],
Line 92:             )
Line 93:         )
I do not follow... what are you exactly do here?

for me it looks like we save the same file... isn't it easier to read it, 
modify the fqdn and write it back?
Line 94: 
Line 95: 


....................................................
File packaging/setup/plugins/ovirt-engine-rename/core/uninstall.py
Line 104:                 )
Line 105: 
Line 106:         all_modified_files = self.environment[
Line 107:                 osetupcons.CoreEnv.FILES_TO_BE_MODIFIED
Line 108:             ]
alignment is wrong.
Line 109: 
Line 110:         externally_modified_files = []
Line 111: 
Line 112:         for f in all_modified_files:


Line 112:         for f in all_modified_files:
Line 113:             if (
Line 114:                     f in self._existing_conf_files and
Line 115:                     self._digestFile(f) != 
self._existing_conf_files[f]
Line 116:                 ):
alignment is wrong
Line 117:                 externally_modified_files.append(f)
Line 118: 
Line 119:         self.logger.info(_('The following files will be updated:'))
Line 120:         for f in sorted(all_modified_files):


Line 122: 
Line 123:         if (externally_modified_files and
Line 124:                 self.environment[
Line 125:                     osetupcons.RenameEnv.CONFIRM_FORCE_OVERWRITE]
Line 126:                 ):
should be:

 if (
    bla and
    bla
 ):
Line 127:             self.logger.warn(
Line 128:                 _(
Line 129:                     'The following files were externally modified - 
outside '
Line 130:                     'of package management and/or engine-setup - 
perhaps by '


Line 133:             )
Line 134:             for f in sorted(externally_modified_files):
Line 135:                 self.dialog.note(text=f)
Line 136: 
Line 137:             if not dialog.queryBoolean(
for every dialog, please have environment variable to allow override.
Line 138:                 dialog=self.dialog,
Line 139:                 name='FORCE_OVERWRITE_FILES',
Line 140:                 note=_(
Line 141:                     'Do you want to overwrite all of the above files '


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I28cb0285424236fd3e6907694f6bf1ce6ce3367f
Gerrit-PatchSet: 11
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yedidyah Bar David <[email protected]>
Gerrit-Reviewer: Alex Lourie <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Moran Goldboim <[email protected]>
Gerrit-Reviewer: Ofer Schreiber <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
Gerrit-Reviewer: Yedidyah Bar David <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to