Yedidyah Bar David has uploaded a new change for review. Change subject: packaging: rename: handle dwh_history_timekeeping ......................................................................
packaging: rename: handle dwh_history_timekeeping Change-Id: I66faffd0d2fb40f2b30d084da24e194fe7dc29ec Bug-Url: https://bugzilla.redhat.com/1170229 Signed-off-by: Yedidyah Bar David <d...@redhat.com> --- A packaging/setup/plugins/ovirt-engine-rename/ovirt-engine-dwh/__init__.py A packaging/setup/plugins/ovirt-engine-rename/ovirt-engine-dwh/database.py 2 files changed, 82 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-dwh refs/changes/06/36006/1 diff --git a/packaging/setup/plugins/ovirt-engine-rename/ovirt-engine-dwh/__init__.py b/packaging/setup/plugins/ovirt-engine-rename/ovirt-engine-dwh/__init__.py new file mode 100644 index 0000000..f8fdff9 --- /dev/null +++ b/packaging/setup/plugins/ovirt-engine-rename/ovirt-engine-dwh/__init__.py @@ -0,0 +1,30 @@ +# +# ovirt-engine-setup -- ovirt engine setup +# Copyright (C) 2014 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. +# + + +from otopi import util + + +from . import database + + +@util.export +def createPlugins(context): + database.Plugin(context=context) + + +# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/packaging/setup/plugins/ovirt-engine-rename/ovirt-engine-dwh/database.py b/packaging/setup/plugins/ovirt-engine-rename/ovirt-engine-dwh/database.py new file mode 100644 index 0000000..f2cd7a2 --- /dev/null +++ b/packaging/setup/plugins/ovirt-engine-rename/ovirt-engine-dwh/database.py @@ -0,0 +1,52 @@ +# +# ovirt-engine-setup -- ovirt engine setup +# Copyright (C) 2014 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. +# + + +"""Database plugin.""" + + +from otopi import util +from otopi import plugin + + +from ovirt_engine_setup import constants as osetupcons +from ovirt_engine_setup.dwh import constants as odwhcons +from ovirt_engine_setup.dwh import engine_db_timekeeping + + +@util.export +class Plugin(plugin.PluginBase): + """Database plugin.""" + + def __init__(self, context): + super(Plugin, self).__init__(context=context) + + @plugin.event( + stage=plugin.Stages.STAGE_MISC, + after=( + odwhcons.Stages.ENGINE_DB_CONNECTION_AVAILABLE, + ), + ) + def _misc(self): + engine_db_timekeeping.updateValueInTimekeeping( + statement=self.environment[odwhcons.EngineDBEnv.STATEMENT], + name=engine_db_timekeeping.DB_KEY_HOSTNAME, + value=self.environment[osetupcons.RenameEnv.FQDN] + ) + + +# vim: expandtab tabstop=4 shiftwidth=4 -- To view, visit http://gerrit.ovirt.org/36006 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I66faffd0d2fb40f2b30d084da24e194fe7dc29ec Gerrit-PatchSet: 1 Gerrit-Project: ovirt-dwh Gerrit-Branch: master Gerrit-Owner: Yedidyah Bar David <d...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches