IMPORTANT FIX: Restore Reset_Server.xml for HPiLO
Stephen Soltesz [Thu, 7 Apr 2011 22:04:06 +0000 (18:04 -0400)]
HPiLO resets do not work with the previous version.

pcucontrol/models/HPiLO.py

index 0f00f55..417844d 100644 (file)
@@ -48,6 +48,21 @@ class HPiLO(PCUControl):
         if locfg.s.returncode != 0:
             return cmd_out.strip() + cmd_err.strip()
 
+        if dryrun: 
+            return 0
+
+        locfg = command.CMD()
+        cmd = cmd_str + "locfg.pl -s %s -f %s -u %s -p '%s'" % (
+                    self.host, cmd_str+"iloxml/PowerOn_Server.xml", 
+                    self.username, self.password)
+        cmd_out, cmd_err = locfg.run_noexcept(cmd)
+
+        locfg = command.CMD()
+        cmd = cmd_str + "locfg.pl -s %s -f %s -u %s -p '%s'" % (
+                    self.host, cmd_str+"iloxml/Reset_Server.xml", 
+                    self.username, self.password)
+        cmd_out, cmd_err = locfg.run_noexcept(cmd)
+
         cmd = "grep 'MESSAGE' | grep -v 'No error'"
         p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, 
                             stderr=subprocess.STDOUT, close_fds=True)