[node-patches] Change in ovirt-node[master]: Changes references to root pw to admin pw instead (installer...
rbarry at redhat.com
rbarry at redhat.com
Mon Jun 17 21:35:14 UTC 2013
Ryan Barry has uploaded a new change for review.
Change subject: Changes references to root pw to admin pw instead (installer)
......................................................................
Changes references to root pw to admin pw instead (installer)
Don't throw an exception about the root password when we're
setting the admin password, change input fields to admin for
consistency.
Change-Id: I9d4ea92b2a9339a1535451fb81b48878b2deb828
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
M src/ovirt/node/installer/core/password_page.py
M src/ovirt/node/installer/core/progress_page.py
2 files changed, 15 insertions(+), 15 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/13/15813/1
diff --git a/src/ovirt/node/installer/core/password_page.py b/src/ovirt/node/installer/core/password_page.py
index 8470cc3..1877a11 100644
--- a/src/ovirt/node/installer/core/password_page.py
+++ b/src/ovirt/node/installer/core/password_page.py
@@ -44,8 +44,8 @@
ws = [ui.Header("header[0]",
"Require a password for local console access?"),
ui.Divider("divider[0]"),
- ui.PasswordEntry("root.password", "Password:"),
- ui.PasswordEntry("root.password_confirmation",
+ ui.PasswordEntry("admin.password", "Password:"),
+ ui.PasswordEntry("admin.password_confirmation",
"Confirm Password:"),
]
self.widgets.add(ws)
@@ -56,22 +56,22 @@
return page
def on_change(self, changes):
- if changes.contains_any(["root.password",
- "root.password_confirmation"]):
+ if changes.contains_any(["admin.password",
+ "admin.password_confirmation"]):
self._model.update(changes)
- root_pw, root_pw_conf = self._model.get("root.password", ""), \
- self._model.get("root.password_confirmation", "")
+ admin_pw, admin_pw_conf = self._model.get("admin.password", ""), \
+ self._model.get("admin.password_confirmation", "")
- if root_pw != root_pw_conf:
+ if admin_pw != admin_pw_conf:
raise exceptions.InvalidData("Passwords must be the same.")
else:
- self.widgets["root.password"].valid(True)
- self.widgets["root.password_confirmation"].valid(True)
+ self.widgets["admin.password"].valid(True)
+ self.widgets["admin.password_confirmation"].valid(True)
def on_merge(self, effective_changes):
changes = self.pending_changes(False)
if changes.contains_any(["button.back"]):
self.application.ui.navigate.to_previous_plugin()
- elif changes.contains_any(["root.password_confirmation",
+ elif changes.contains_any(["admin.password_confirmation",
"button.next"]):
self.application.ui.navigate.to_next_plugin()
diff --git a/src/ovirt/node/installer/core/progress_page.py b/src/ovirt/node/installer/core/progress_page.py
index cf07e37..e5a64c1 100644
--- a/src/ovirt/node/installer/core/progress_page.py
+++ b/src/ovirt/node/installer/core/progress_page.py
@@ -157,7 +157,7 @@
if cfg["method"] in ["install"]:
tx += [self.UpdateDefaultsFromModels(cfg),
self.PartitionAndFormat(cfg["installation.devices"]),
- self.SetPassword(cfg["root.password_confirmation"]),
+ self.SetPassword(cfg["admin.password_confirmation"]),
self.InstallImageAndBootloader(cfg["boot.device"]),
self.SetKeyboardLayout(cfg["keyboard.layout"])]
@@ -234,16 +234,16 @@
class SetPassword(utils.Transaction.Element):
title = "Setting Admin Password"
- def __init__(self, root_password):
+ def __init__(self, admin_password):
super(InstallerThread.SetPassword, self).__init__()
- self.root_password = root_password
+ self.admin_password = admin_password
def commit(self):
from ovirtnode import password
- admin_pw_set = password.set_password(self.root_password, "admin")
+ admin_pw_set = password.set_password(self.admin_password, "admin")
self.logger.debug("Setting admin password")
if not admin_pw_set:
- raise RuntimeError("Failed to set root password")
+ raise RuntimeError("Failed to set admin password")
class InstallImageAndBootloader(utils.Transaction.Element):
def __init__(self, dst=None):
--
To view, visit http://gerrit.ovirt.org/15813
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d4ea92b2a9339a1535451fb81b48878b2deb828
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
More information about the node-patches
mailing list