[node-patches] Change in ovirt-node[master]: cim/snmp must contain passwords to enable

jboggs at redhat.com jboggs at redhat.com
Wed Nov 7 19:23:17 UTC 2012


Joey Boggs has uploaded a new change for review.

Change subject: cim/snmp must contain passwords to enable
......................................................................

cim/snmp must contain passwords to enable

rhbz#872469

Signed-off-by: Joey Boggs <jboggs at redhat.com>
Change-Id: I1a3ee52e029ef724577ddaf689a28d05434a9531
---
M plugins/snmp.py
M scripts/ovirt_config_setup/cim.py
2 files changed, 16 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/09/9109/1

diff --git a/plugins/snmp.py b/plugins/snmp.py
index be047b2..37158db 100755
--- a/plugins/snmp.py
+++ b/plugins/snmp.py
@@ -141,6 +141,13 @@
                               buttons=['Ok'])
                 self.ncs.reset_screen_colors()
         elif self.snmp_status.value() == 0:
+            if len(self.root_password_1.value()) > 0:
+                ButtonChoiceWindow(self.screen, "SNMP Error",
+                      "SNMP must be enabled to set a password!",
+                      buttons=['Ok'])
+            else:
+                disable_snmpd()
+
             disable_snmpd()
 
 def snmp_auto():
diff --git a/scripts/ovirt_config_setup/cim.py b/scripts/ovirt_config_setup/cim.py
index 42d7352..6aa018c 100755
--- a/scripts/ovirt_config_setup/cim.py
+++ b/scripts/ovirt_config_setup/cim.py
@@ -97,9 +97,15 @@
         setting_password_failed = False
         if (len(self.cim_password_1.value()) > 0  or
             len(self.cim_password_2.value()) > 0):
-            setting_password_failed = self.__set_cim_password()
-            if setting_password_failed:
-                return
+            if self.cim_status.value() == 1:
+                setting_password_failed = self.__set_cim_password()
+                if setting_password_failed:
+                    return
+            else:
+                ButtonChoiceWindow(self.ncs.screen, "CIM Configuration",
+                    "CIM Must Be Enabled to Set Password", buttons=['Ok'])
+                self.ncs.reset_screen_colors()
+                return False
 
         if is_transition_to_disabled:
             if disable_cim():


--
To view, visit http://gerrit.ovirt.org/9109
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a3ee52e029ef724577ddaf689a28d05434a9531
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Joey Boggs <jboggs at redhat.com>



More information about the node-patches mailing list