'Creates a group from source.
:param context: the context of the caller.
:param group: the Group object to be created.
:param volumes: a list of volume objects in the group.
:param group_snapshot: the GroupSnapshot object as source.
:param snapshots: a list of snapshot objects in group_snapshot.
:param source_group: the Group object as source.
:param source_vols: a list of volume objects in the source_group.
:returns: model_update, volumes_model_update'

def _create_group_from_src_generic(self, context, group, volumes, group_snapshot=None, snapshots=None, source_group=None, source_vols=None):

    model_update = {'status': 'available'}
    volumes_model_update = []
    for vol in volumes:
        if snapshots:
            for snapshot in snapshots:
                if (vol.snapshot_id == snapshot.id):
                    vol_model_update = {'id': vol.id}
                    try:
                        driver_update = self.driver.create_volume_from_snapshot(vol, snapshot)
                        if driver_update:
                            driver_update.pop('id', None)
                            vol_model_update.update(driver_update)
                        if ('status' not in vol_model_update):
                            vol_model_update['status'] = 'available'
                    except Exception:
                        vol_model_update['status'] = 'error'
                        model_update['status'] = 'error'
                    volumes_model_update.append(vol_model_update)
                    break
        elif source_vols:
            for source_vol in source_vols:
                if (vol.source_volid == source_vol.id):
                    vol_model_update = {'id': vol.id}
                    try:
                        driver_update = self.driver.create_cloned_volume(vol, source_vol)
                        if driver_update:
                            driver_update.pop('id', None)
                            vol_model_update.update(driver_update)
                        if ('status' not in vol_model_update):
                            vol_model_update['status'] = 'available'
                    except Exception:
                        vol_model_update['status'] = 'error'
                        model_update['status'] = 'error'
                    volumes_model_update.append(vol_model_update)
                    break
    return (model_update, volumes_model_update)
