From 07079db4ceb3accb4f4d775efc3b09b2ded3b153 Mon Sep 17 00:00:00 2001 From: Faiyaz Ahmed Date: Fri, 14 Mar 2008 02:02:11 +0000 Subject: [PATCH] get site_id --- source/steps/CheckHardwareRequirements.py | 11 +++++++++-- source/steps/GetAndUpdateNodeDetails.py | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/source/steps/CheckHardwareRequirements.py b/source/steps/CheckHardwareRequirements.py index 7739f73..43caa43 100644 --- a/source/steps/CheckHardwareRequirements.py +++ b/source/steps/CheckHardwareRequirements.py @@ -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" ) diff --git a/source/steps/GetAndUpdateNodeDetails.py b/source/steps/GetAndUpdateNodeDetails.py index 502183c..fb66618 100644 --- a/source/steps/GetAndUpdateNodeDetails.py +++ b/source/steps/GetAndUpdateNodeDetails.py @@ -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'] ) -- 2.43.0