Revision 723f4565 lib/rapi/rlib2.py

b/lib/rapi/rlib2.py
353 353
    return baserlib.SubmitJob([op])
354 354

  
355 355

  
356
class R_2_nodes_name_storage_repair(baserlib.R_Generic):
357
  """/2/nodes/[node_name]/storage/repair ressource.
358

  
359
  """
360
  def PUT(self):
361
    node_name = self.items[0]
362

  
363
    storage_type = self._checkStringVariable("storage_type", None)
364
    if not storage_type:
365
      raise http.HttpBadRequest("Missing the required 'storage_type'"
366
                                " parameter")
367

  
368
    name = self._checkStringVariable("name", None)
369
    if not name:
370
      raise http.HttpBadRequest("Missing the required 'name'"
371
                                " parameter")
372

  
373
    op = opcodes.OpRepairNodeStorage(node_name=node_name,
374
                                     storage_type=storage_type,
375
                                     name=name)
376
    return baserlib.SubmitJob([op])
377

  
378

  
356 379
class R_2_instances(baserlib.R_Generic):
357 380
  """/2/instances resource.
358 381

  

Also available in: Unified diff