Revision 723f4565
b/doc/rapi.rst | ||
---|---|---|
570 | 570 |
of the storage unit). Parameters can be passed additionally. Currently only |
571 | 571 |
``allocatable`` (bool) is supported. The result will be a job id. |
572 | 572 |
|
573 |
``/2/nodes/[node_name]/storage/repair`` |
|
574 |
+++++++++++++++++++++++++++++++++++++++ |
|
575 |
|
|
576 |
Repairs a storage unit on the node. |
|
577 |
|
|
578 |
``PUT`` |
|
579 |
~~~~~~~ |
|
580 |
|
|
581 |
Repairs a storage unit on the node. Requires the parameters ``storage_type`` |
|
582 |
(currently only ``lvm-vg`` can be repaired) and ``name`` (name of the storage |
|
583 |
unit). The result will be a job id. |
|
584 |
|
|
573 | 585 |
``/2/nodes/[node_name]/tags`` |
574 | 586 |
+++++++++++++++++++++++++++++ |
575 | 587 |
|
b/lib/rapi/connector.py | ||
---|---|---|
163 | 163 |
rlib2.R_2_nodes_name_storage, |
164 | 164 |
re.compile(r'^/2/nodes/([\w\._-]+)/storage/modify$'): |
165 | 165 |
rlib2.R_2_nodes_name_storage_modify, |
166 |
re.compile(r'^/2/nodes/([\w\._-]+)/storage/repair$'): |
|
167 |
rlib2.R_2_nodes_name_storage_repair, |
|
166 | 168 |
"/2/instances": rlib2.R_2_instances, |
167 | 169 |
re.compile(r'^/2/instances/([\w\._-]+)$'): rlib2.R_2_instances_name, |
168 | 170 |
re.compile(r'^/2/instances/([\w\._-]+)/tags$'): rlib2.R_2_instances_name_tags, |
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