[node-patches] Change in ovirt-node[master]: Change validation signature
fabiand at fedoraproject.org
fabiand at fedoraproject.org
Tue Dec 11 20:09:33 UTC 2012
Fabian Deutsch has uploaded a new change for review.
Change subject: Change validation signature
......................................................................
Change validation signature
Change-Id: I496a6565e0a9a1931b00cba340e2fa782a1cf2a5
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/tui/src/ovirt/node/plugins/__init__.py
M scripts/tui/src/ovirt/node/tui.py
2 files changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/80/9880/1
diff --git a/scripts/tui/src/ovirt/node/plugins/__init__.py b/scripts/tui/src/ovirt/node/plugins/__init__.py
index 4441b04..fa135e6 100644
--- a/scripts/tui/src/ovirt/node/plugins/__init__.py
+++ b/scripts/tui/src/ovirt/node/plugins/__init__.py
@@ -150,7 +150,7 @@
"""
raise NotImplementedError()
- def validate_model(self):
+ def validate(self, model=None):
"""Simulate a complete model change.
This runs all current model values throught the checks to see
if the model validates.
@@ -163,8 +163,8 @@
LOGGER.debug("Triggering revalidation of model")
is_valid = True
try:
- for path, value in self.model().items():
- self.on_change({path: value})
+ model = model or self.model()
+ self.on_change(model)
except NotImplementedError:
LOGGER.debug("Plugin has no model")
except InvalidData:
diff --git a/scripts/tui/src/ovirt/node/tui.py b/scripts/tui/src/ovirt/node/tui.py
index 67b5391..9a937ce 100644
--- a/scripts/tui/src/ovirt/node/tui.py
+++ b/scripts/tui/src/ovirt/node/tui.py
@@ -191,7 +191,7 @@
LOGGER.debug("Triggering initial sematic checks for '%s'" % plugin)
try:
- plugin.validate_model()
+ plugin.validate()
except:
self.notify("error", "Initial model validation failed.")
--
To view, visit http://gerrit.ovirt.org/9880
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I496a6565e0a9a1931b00cba340e2fa782a1cf2a5
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>
More information about the node-patches
mailing list