def BlockdevRemovechildren(parent_cdev, new_cdevs):
  parent_bdev = _RecursiveFindBD(parent_cdev)
  if parent_bdev is None:
    _Fail("Can't find parent device '%s' in remove children", parent_cdev)
  devs = []
  for disk in new_cdevs:
    rpath = disk.StaticDevPath()
    if rpath is None:
      bd = _RecursiveFindBD(disk)
      if bd is None:
        _Fail("Can't find device %s while removing children", disk)
      else:
        devs.append(bd.dev_path)
    else:
      if not utils.IsNormAbsPath(rpath):
        _Fail("Strange path returned from StaticDevPath: '%s'", rpath)
      devs.append(rpath)
  parent_bdev.RemoveChildren(devs)
Determines the instance a blockdevice is attached to.
dataset/ETHPy150Open ganeti/ganeti/lib/backend.py/BlockdevRemovechildren--crossover with--dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/gce.py/GCEBlockDeviceAPI._get_attached_to