@@ -391,8 +391,47 @@ def parse_georep_config(data):
391
391
raise NotImplementedError ("Georep Config" )
392
392
393
393
394
- def parse_remove_brick_status (data ):
395
- raise NotImplementedError ("Remove Brick Status" )
394
+ def parse_remove_brick_status (status ):
395
+ tree = etree .fromstring (status )
396
+
397
+ result = {'nodes' : [], 'aggregate' : _parse_remove_aggregate (tree .find ('volRemoveBrick/aggregate' ))}
398
+
399
+ for el in tree .findall ('volRemoveBrick/node' ):
400
+ result ['nodes' ].append (_parse_remove_node (el ))
401
+
402
+ return result
403
+
404
+
405
+ def _parse_remove_node (node_el ):
406
+ value = {
407
+ 'name' : node_el .find ('nodeName' ).text ,
408
+ 'id' : node_el .find ('id' ).text ,
409
+ 'files' : node_el .find ('files' ).text ,
410
+ 'size' : node_el .find ('size' ).text ,
411
+ 'lookups' : node_el .find ('lookups' ).text ,
412
+ 'failures' : node_el .find ('failures' ).text ,
413
+ 'skipped' : node_el .find ('skipped' ).text ,
414
+ 'status_code' : node_el .find ('status' ).text ,
415
+ 'status' : node_el .find ('statusStr' ).text ,
416
+ 'runtime' : node_el .find ('runtime' ).text
417
+ }
418
+
419
+ return value
420
+
421
+
422
+ def _parse_remove_aggregate (aggregate_el ):
423
+ value = {
424
+ 'files' : aggregate_el .find ('files' ).text ,
425
+ 'size' : aggregate_el .find ('size' ).text ,
426
+ 'lookups' : aggregate_el .find ('lookups' ).text ,
427
+ 'failures' : aggregate_el .find ('failures' ).text ,
428
+ 'skipped' : aggregate_el .find ('skipped' ).text ,
429
+ 'status_code' : aggregate_el .find ('status' ).text ,
430
+ 'status' : aggregate_el .find ('statusStr' ).text ,
431
+ 'runtime' : aggregate_el .find ('runtime' ).text
432
+ }
433
+
434
+ return value
396
435
397
436
398
437
def parse_tier_detach (data ):
0 commit comments