Revision 153d9724 lib/rpc.py

b/lib/rpc.py
539 539
  return c.getresult().get(node, False)
540 540

  
541 541

  
542
def call_blockdev_addchild(node, bdev, ndev):
543
  """Request adding a new child to a (mirroring) device.
542
def call_blockdev_addchildren(node, bdev, ndevs):
543
  """Request adding a list of children to a (mirroring) device.
544 544

  
545 545
  This is a single-node call.
546 546

  
547 547
  """
548
  params = [bdev.ToDict(), ndev.ToDict()]
549
  c = Client("blockdev_addchild", params)
548
  params = [bdev.ToDict(), [disk.ToDict() for disk in ndevs]]
549
  c = Client("blockdev_addchildren", params)
550 550
  c.connect(node)
551 551
  c.run()
552 552
  return c.getresult().get(node, False)
553 553

  
554 554

  
555
def call_blockdev_removechild(node, bdev, ndev):
556
  """Request removing a new child from a (mirroring) device.
555
def call_blockdev_removechildren(node, bdev, ndevs):
556
  """Request removing a list of children from a (mirroring) device.
557 557

  
558 558
  This is a single-node call.
559 559

  
560 560
  """
561
  params = [bdev.ToDict(), ndev.ToDict()]
562
  c = Client("blockdev_removechild", params)
561
  params = [bdev.ToDict(), [disk.ToDict() for disk in ndevs]]
562
  c = Client("blockdev_removechildren", params)
563 563
  c.connect(node)
564 564
  c.run()
565 565
  return c.getresult().get(node, False)

Also available in: Unified diff