Alon Bar-Lev has uploaded a new change for review. Change subject: packaging: setup: move jboss and java setups to common ......................................................................
packaging: setup: move jboss and java setups to common useful for satellite packages. Change-Id: I8a0114f9bd3abc06b6f1e8e87153cb5ae19950e0 Signed-off-by: Alon Bar-Lev <alo...@redhat.com> --- A packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-common/config/__init__.py R packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-common/config/java.py A packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-common/config/jboss.py M packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/config/__init__.py M packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/config/jboss.py 5 files changed, 103 insertions(+), 29 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/97/22897/1 diff --git a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-common/config/__init__.py b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-common/config/__init__.py new file mode 100644 index 0000000..fbb1549 --- /dev/null +++ b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-common/config/__init__.py @@ -0,0 +1,35 @@ +# +# ovirt-engine-setup -- ovirt engine setup +# Copyright (C) 2013 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + +"""ovirt-host-setup config plugin.""" + + +from otopi import util + + +from . import java +from . import jboss + + +@util.export +def createPlugins(context): + java.Plugin(context=context) + jboss.Plugin(context=context) + + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/config/java.py b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-common/config/java.py similarity index 100% rename from packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/config/java.py rename to packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-common/config/java.py diff --git a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-common/config/jboss.py b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-common/config/jboss.py new file mode 100644 index 0000000..6737da2 --- /dev/null +++ b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-common/config/jboss.py @@ -0,0 +1,68 @@ +# +# ovirt-engine-setup -- ovirt engine setup +# Copyright (C) 2013 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + +"""Jboss plugin.""" + + +import os +import gettext +_ = lambda m: gettext.dgettext(message=m, domain='ovirt-engine-setup') + + +from otopi import util +from otopi import plugin + + +from ovirt_engine_setup import constants as osetupcons + + +@util.export +class Plugin(plugin.PluginBase): + """JBoss plugin.""" + + def __init__(self, context): + super(Plugin, self).__init__(context=context) + + @plugin.event( + stage=plugin.Stages.STAGE_INIT, + ) + def _init(self): + self.environment.setdefault( + osetupcons.ConfigEnv.JBOSS_HOME, + osetupcons.FileLocations.JBOSS_HOME + ) + + @plugin.event( + stage=plugin.Stages.STAGE_VALIDATION, + ) + def _validation(self): + if not os.path.exists( + self.environment[ + osetupcons.ConfigEnv.JBOSS_HOME + ] + ): + raise RuntimeError( + _('Cannot find Jboss at {jbossHome}').format( + jbossHome=self.environment[ + osetupcons.ConfigEnv.JBOSS_HOME + ], + ) + ) + + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/config/__init__.py b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/config/__init__.py index bf999b1..d0e61f3 100644 --- a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/config/__init__.py +++ b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/config/__init__.py @@ -22,7 +22,6 @@ from otopi import util -from . import java from . import jboss from . import database from . import protocols @@ -39,7 +38,6 @@ @util.export def createPlugins(context): - java.Plugin(context=context) jboss.Plugin(context=context) database.Plugin(context=context) protocols.Plugin(context=context) diff --git a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/config/jboss.py b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/config/jboss.py index f6429c0..865542e 100644 --- a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/config/jboss.py +++ b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/config/jboss.py @@ -19,7 +19,6 @@ """Jboss plugin.""" -import os import gettext _ = lambda m: gettext.dgettext(message=m, domain='ovirt-engine-setup') @@ -39,32 +38,6 @@ def __init__(self, context): super(Plugin, self).__init__(context=context) - - @plugin.event( - stage=plugin.Stages.STAGE_INIT, - ) - def _init(self): - self.environment.setdefault( - osetupcons.ConfigEnv.JBOSS_HOME, - osetupcons.FileLocations.JBOSS_HOME - ) - - @plugin.event( - stage=plugin.Stages.STAGE_VALIDATION, - ) - def _validation(self): - if not os.path.exists( - self.environment[ - osetupcons.ConfigEnv.JBOSS_HOME - ] - ): - raise RuntimeError( - _('Cannot find Jboss at {jbossHome}').format( - jbossHome=self.environment[ - osetupcons.ConfigEnv.JBOSS_HOME - ], - ) - ) @plugin.event( stage=plugin.Stages.STAGE_MISC, -- To view, visit http://gerrit.ovirt.org/22897 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8a0114f9bd3abc06b6f1e8e87153cb5ae19950e0 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches