Alon Bar-Lev has posted comments on this change.

Change subject: packaging: setup: added upgrade from legacy plugins
......................................................................


Patch Set 14: (8 inline comments)

Nice!!!

....................................................
File packaging/setup/ovirt_engine_setup/constants.py
Line 924:     MINIMUM_SPACE_STORAGEDOMAIN_MB = 10240
Line 925: 
Line 926: 
Line 927: @util.export
Line 928: class StorageDomainType(object):
we can either move this to the plugin or have a new python module, it does not 
belong to the global constants, which are environment, locations etc...
Line 929:     #See: 
org.ovirt.engine.core.common.businessentities.StorageDomainType
Line 930:     MASTER = 0
Line 931:     DATA = 1
Line 932:     ISO = 2


....................................................
File packaging/setup/plugins/ovirt-engine-setup/legacy/apache.py
Line 47:         ],
Line 48:     )
Line 49:     def _misc(self):
Line 50:         if (
Line 51:             not self.environment[osetupcons.CoreEnv.DEVELOPER_MODE] and
you can remove this from both functions and just disable your-self in 
development mode.
Line 52:             os.path.exists(
Line 53:                 osetupcons.FileLocations.HTTPD_CONF_OVIRT_ENGINE_LEGACY
Line 54:             )
Line 55:         ):


....................................................
File packaging/setup/plugins/ovirt-engine-setup/legacy/config.py
Line 44:     @plugin.event(
Line 45:         stage=plugin.Stages.STAGE_INIT,
Line 46:     )
Line 47:     def _init(self):
Line 48:         self.environment[osetupcons.CoreEnv.UPGRADE_FROM_LEGACY] = (
please move this check to own plugin to make it clear.
Line 49:             os.path.exists(
Line 50:                 
osetupcons.FileLocations.OVIRT_ENGINE_PKI_ENGINE_CA_CERT
Line 51:             ) and
Line 52:             not os.path.exists(


Line 62:         priority=plugin.Stages.PRIORITY_FIRST,
Line 63:         name=osetupcons.Stages.UPGRADE_FROM_LEGACY_CONFIG
Line 64:     )
Line 65:     def _customization(self):
Line 66:         legacy = osetupcons.FileLocations.LEGACY_OVIRT_ENGINE_SYSCONFIG
problem: downstream does use /etc/ovirt-engine/engine.conf.d so I guess we need 
to make sure we do not overwrite newer file... somehow, or we can relay that 
upgrade to downstream 3.2 remove the sysconfig file?
Line 67:         config = None
Line 68:         for filename in (
Line 69:             legacy,
Line 70:             legacy + '.rpmsave',


....................................................
File packaging/setup/plugins/ovirt-engine-setup/legacy/datadomain.py
Line 65:                 storage_name
Line 66:                 from storage_domain_static
Line 67:                 where
Line 68:                 storage_type=%(storage_type)s and
Line 69:                 storage_domain_type=%(storage_domain_type)s
please align:

 select
     f1,
     f2,
     f3
 from xxx 
 where
     condition and
     condition
Line 70:             """,
Line 71:             args=dict(
Line 72:                 storage_type=osetupcons.StorageType.LOCALFS,
Line 73:                 
storage_domain_type=osetupcons.StorageDomainType.MASTER,


Line 80:                     select
Line 81:                     connection
Line 82:                     from storage_server_connections
Line 83:                     where
Line 84:                     id=%(storage)s
align
Line 85:                 """,
Line 86:                 args=dict(
Line 87:                     storage=domain['storage']
Line 88:                 ),


....................................................
File packaging/setup/plugins/ovirt-engine-setup/legacy/isodomain.py
Line 64:                 storage_name
Line 65:                 from storage_domain_static
Line 66:                 where
Line 67:                 storage_type=%(storage_type)s and
Line 68:                 storage_domain_type=%(storage_domain_type)s
align
Line 69:             """,
Line 70:             args=dict(
Line 71:                 storage_type=osetupcons.StorageType.NFS,
Line 72:                 storage_domain_type=osetupcons.StorageDomainType.ISO,


Line 79:                     select
Line 80:                     connection
Line 81:                     from storage_server_connections
Line 82:                     where
Line 83:                     id=%(storage)s
align
Line 84:                 """,
Line 85:                 args=dict(
Line 86:                     storage=domain['storage']
Line 87:                 ),


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4ee25f561218d83c5a4bd821c2d89587df5bc47a
Gerrit-PatchSet: 14
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-Reviewer: Alex Lourie <alou...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Moran Goldboim <mgold...@redhat.com>
Gerrit-Reviewer: Ofer Schreiber <oschr...@redhat.com>
Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com>
Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to