'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
The source can be group_snapshot or a source_group.
param volumes is a list of objects retrieved from the db. It cannot
be assigned to volumes_model_update. volumes_model_update is a list
of dictionaries. It has to be built by the driver. An entry will be
in this format: {\'id\': xxx, \'status\': xxx, ......}. model_update
will be in this format: {\'status\': xxx, ......}.
To be consistent with other volume operations, the manager will
assume the operation is successful if no exception is thrown by
the driver. For a successful operation, the driver can either build
the model_update and volumes_model_update and return them or
return None, None.'

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

    if (not ((group_snapshot and snapshots and (not source_group)) or (source_group and source_vols and (not group_snapshot)))):
        msg = _('create_group_from_src    only    supports    a    group_snapshot    source    or    a    group    source.    Multiple    sources    cannot    be    used.')
        raise exception.InvalidInput(msg)
    if (not volume_utils.is_group_a_cg_snapshot_type(group)):
        raise NotImplementedError()
    model_update = {'status': fields.GroupStatus.AVAILABLE}
    volumes_model_update = []
    if source_group:
        for (volume, src_vol) in zip(volumes, source_vols):
            update = self.create_cloned_volume(volume, src_vol)
            update['status'] = fields.GroupStatus.AVAILABLE
            volumes_model_update.append(update.copy())
    else:
        for (volume, src_snap) in zip(volumes, snapshots):
            update = self.create_volume_from_snapshot(volume, src_snap)
            update['status'] = fields.GroupStatus.AVAILABLE
            volumes_model_update.append(update.copy())
    model_update = self.create_group(context, group)
    if (model_update['status'] == fields.GroupStatus.AVAILABLE):
        self.update_group(context, group, volumes, None)
    return (model_update, volumes_model_update)
