def _child_vhds(session, sr_ref, vdi_uuid_list, old_snapshots_only=False):
    children = set()
    for ref, rec in _get_all_vdis_in_sr(session, sr_ref):
        rec_uuid = rec['uuid']

        if rec_uuid in vdi_uuid_list:
            continue

        parent_uuid = _get_vhd_parent_uuid(session, ref, rec)
        if parent_uuid not in vdi_uuid_list:
            continue

        if old_snapshots_only and not _is_vdi_a_snapshot(rec):
            continue

        children.add(rec_uuid)

    return list(children)
Return the immediate children of a given VHD.
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/virt/xenapi/vm_utils.py/_child_vhds