Revision e5351ee9 qa/rapi-workload.py

b/qa/rapi-workload.py
176 176
  @type fn function
177 177
  @param fn A client method returning a job id.
178 178

  
179
  @rtype tuple of bool, any object
180
  @return The success status and the result of the operation, if any
181

  
179 182
  """
180 183
  possible_job_id = fn(*args, **kwargs)
181 184
  try:
......
194 197

  
195 198
  result = client.GetJobStatus(possible_job_id)["opresult"][0]
196 199
  if success:
197
    return result
200
    return success, result
198 201
  else:
199 202
    print "Error encountered while performing operation: "
200 203
    print result
201
    return None
204
    return success, None
202 205

  
203 206

  
204 207
def TestTags(client, get_fn, add_fn, delete_fn, *args):
......
483 486
  ]
484 487

  
485 488
  for storage_type in constants.STS_REPORT:
486
    storage_units = Finish(client, client.GetNodeStorageUnits,
487
                           non_master_node, storage_type,
488
                           ",".join(storage_units_fields))
489
    success, storage_units = Finish(client, client.GetNodeStorageUnits,
490
                                    non_master_node, storage_type,
491
                                    ",".join(storage_units_fields))
489 492

  
490
    if len(storage_units) > 0 and len(storage_units[0]) > 0:
493
    if success and len(storage_units) > 0 and len(storage_units[0]) > 0:
491 494
      # Name is the first entry of the first result, allocatable the other
492 495
      unit_name = storage_units[0][0]
493 496
      Finish(client, client.ModifyNodeStorageUnits,

Also available in: Unified diff