<s> from lib . actions import OrionBaseAction <EOL> class NodeStatus ( OrionBaseAction ) : <EOL> def run ( self , node , platform ) : <EOL> """<STR_LIT>""" <EOL> results = { } <EOL> results [ '<STR_LIT:status>' ] = None <EOL> results [ '<STR_LIT>' ] = None <EOL> self . connect ( platform ) <EOL> swql = "<STR_LIT>" <EOL> kargs = { '<STR_LIT>' : node } <EOL> orion_data = self . query ( swql , ** kargs ) <EOL> if len ( orion_data [ '<STR_LIT>' ] ) != <NUM_LIT:0> : <EOL> ( results [ '<STR_LIT:status>' ] , results [ '<STR_LIT>' ] ) = self . status_code_to_text ( <EOL> orion_data [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT>' ] ) <EOL> else : <EOL> error_msg = "<STR_LIT>" <EOL> self . send_user_error ( error_msg ) <EOL> raise ValueError ( error_msg ) <EOL> return results </s>
