def server_powerstatus(host=None, admin_username=None, admin_password=None, module=None):
 ret = __execute_ret('serveraction powerstatus', host=host, admin_username=admin_username, admin_password=admin_password, module=module)
 result = {'retcode': 0}
 if (ret['stdout'] == 'ON'):
  result['status'] = True
  result['comment'] = 'Power is on'
 if (ret['stdout'] == 'OFF'):
  result['status'] = False
  result['comment'] = 'Power is on'
 if ret['stdout'].startswith('ERROR'):
  result['status'] = False
  result['comment'] = ret['stdout']
 return result

def server_powerstatus ( host = None , admin_username = None , admin_password = None , module = None ) : ret = __execute_ret ( 'serveraction powerstatus' , host = host , admin_username = admin_username , admin_password = admin_password , module = module ) result = { 'retcode' : 0 } if ( ret [ 'stdout' ] == 'ON' ) : result [ 'status' ] = True result [ 'comment' ] = 'Power is on' if ( ret [ 'stdout' ] == 'OFF' ) : result [ 'status' ] = False result [ 'comment' ] = 'Power is on' if ret [ 'stdout' ] . startswith ( 'ERROR' ) : result [ 'status' ] = False result [ 'comment' ] = ret [ 'stdout' ] return result
return the power status for the passed module cli example: .