get site_id
authorFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Fri, 14 Mar 2008 02:02:11 +0000 (02:02 +0000)
committerFaiyaz Ahmed <faiyaza@cs.princeton.edu>
Fri, 14 Mar 2008 02:02:11 +0000 (02:02 +0000)
source/steps/CheckHardwareRequirements.py
source/steps/GetAndUpdateNodeDetails.py

index 7739f73..43caa43 100644 (file)
@@ -93,13 +93,20 @@ def Run( vars, log ):
             
             sent= 0
             try:
-                sent= BootAPI.call_api_function( vars, "BootNotifyOwners",
+                #sent= BootAPI.call_api_function( vars, "BootNotifyOwners",
+                #                         (notify_messages.MSG_INSUFFICIENT_MEMORY,
+                #                          include_pis,
+                #                          include_techs,
+                #                          include_support) )
+                person_ids = BootAPI.call_api_function( vars, "GetSites", 
+                sent= BootAPI.call_api_function( vars, "NotifyPersons",
                                          (notify_messages.MSG_INSUFFICIENT_MEMORY,
                                           include_pis,
                                           include_techs,
                                           include_support) )
             except BootManagerException, e:
-                log.write( "Call to BootNotifyOwners failed: %s.\n" % e )
+                log.write( "Call to NotifyPersons failed: %s.\n" % e )
                 
             if sent == 0:
                 log.write( "Unable to notify site contacts of problem.\n" )
index 502183c..fb66618 100644 (file)
@@ -73,11 +73,11 @@ def Run( vars, log ):
     except ValueError, var:
         raise BootManagerException, "Variable in vars, shouldn't be: %s\n" % var
 
-    details= BootAPI.call_api_function( vars, "GetNodes", (vars['NODE_ID'], ['boot_state', 'nodegroup_ids', 'nodenetwork_ids', 'model']))[0]
+    details= BootAPI.call_api_function( vars, "GetNodes", (vars['NODE_ID'], ['boot_state', 'nodegroup_ids', 'nodenetwork_ids', 'model', 'site_id']))[0]
 
     vars['BOOT_STATE']= details['boot_state']
     vars['NODE_MODEL']= string.strip(details['model'])
-    
+    vars['SITE_ID'] = details['site_id'} 
     log.write( "Successfully retrieved node record.\n" )
     log.write( "Current boot state: %s\n" % vars['BOOT_STATE'] )
     log.write( "Node make/model: %s\n" % vars['NODE_MODEL'] )