[node-patches] Change in ovirt-node[node-2.6]: engine_page: Let users change password
dougsland at redhat.com
dougsland at redhat.com
Thu Mar 21 14:05:47 UTC 2013
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: engine_page: Let users change password
......................................................................
engine_page: Let users change password
Old TUI could be used to let users change password without
providing Management server. This patch will provide
such feature.
Change-Id: I0a66230e612c9585ef368d1700073b8d4e50604a
Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
---
M scripts/tui/src/ovirt/node/setup/engine_page.py
1 file changed, 11 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/47/13247/1
diff --git a/scripts/tui/src/ovirt/node/setup/engine_page.py b/scripts/tui/src/ovirt/node/setup/engine_page.py
index 6397560..1c2538a 100644
--- a/scripts/tui/src/ovirt/node/setup/engine_page.py
+++ b/scripts/tui/src/ovirt/node/setup/engine_page.py
@@ -63,18 +63,11 @@
"vdsm_cfg.password",
"Password")
- def cert_validator(v):
- cert_path = VDSM().retrieve()["cert_path"]
- cert_exists = cert_path and os.path.exists(cert_path)
- return cert_exists or ("The Engine Certificate does not exist. " +
- "Retrieve and verify it before you " +
- "continue.")
return {"vdsm_cfg.address": valid.FQDNOrIPAddress() | valid.Empty(),
"vdsm_cfg.port": valid.Port(),
"vdsm_cfg.password": valid.Text(),
"vdsm_cfg.password_confirmation": same_as_password,
- "action.register": cert_validator
}
def ui_content(self):
@@ -153,7 +146,8 @@
self.logger.debug("Setting engine password")
txs += [SetEnginePassword()]
- if effective_changes.contains_any(["action.register"]):
+ if effective_changes.contains_any(["action.register"]) and \
+ changes.contains_any(["vdsm_cfg.address"]):
self.logger.debug("Connecting to engine")
txs += [ActivateVDSM()]
@@ -298,9 +292,18 @@
class ActivateVDSM(utils.Transaction.Element):
title = "Activating VDSM"
+ def cert_validator(self):
+ cert_path = VDSM().retrieve()["cert_path"]
+ cert_exists = cert_path and os.path.exists(cert_path)
+
+ return cert_exists
+
def commit(self):
self.logger.info("Connecting to VDSM server")
+ if not self.cert_validator():
+ return False
+
# pylint: disable-msg=E0611,F0401
sys.path.append('/usr/share/vdsm-reg')
import deployUtil # @UnresolvedImport
--
To view, visit http://gerrit.ovirt.org/13247
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a66230e612c9585ef368d1700073b8d4e50604a
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: node-2.6
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>
More information about the node-patches
mailing list