Cross module commit for 'diag' and 'disabled' node states.
authorStephen Soltesz <soltesz@cs.princeton.edu>
Tue, 18 Dec 2007 18:54:48 +0000 (18:54 +0000)
committerStephen Soltesz <soltesz@cs.princeton.edu>
Tue, 18 Dec 2007 18:54:48 +0000 (18:54 +0000)
source/BootManager.py

index 5323103..b745eb0 100755 (executable)
@@ -235,10 +235,10 @@ class BootManager:
             UpdateBootStateWithPLC.Run( self.VARS, self.LOG )
             _rinsRun()
 
-        def _debugRun():
+        def _debugRun(state='dbg'):
             # implements debug logic, which just starts the sshd
             # and just waits around
-            self.VARS['BOOT_STATE']='dbg'
+            self.VARS['BOOT_STATE']=state
             UpdateBootStateWithPLC.Run( self.VARS, self.LOG )
             StartDebug.Run( self.VARS, self.LOG )
 
@@ -254,6 +254,8 @@ class BootManager:
         NodeRunStates['rins'] = _rinsRun
         NodeRunStates['boot'] = _bootRun
         NodeRunStates['dbg']  = _debugRun
+        NodeRunStates['diag']  = lambda : _debugRun('diag')
+        NodeRunStates['disable']  = lambda : _debugRun('disable')
 
         success = 0
         try:
@@ -305,6 +307,8 @@ def main(argv):
                      'inst':None,
                      'rins':None,
                      'boot':None,
+                                        'diag':None,
+                                        'disable':None,
                      'dbg':None}
 
     # set to 1 if error occurred