'Creates the volume group from source.
:param context: the context
:param group: the volume group object to be created
:param volumes: volumes in the consistency group
:param group_snapshot: the source volume group snapshot
:param snapshots: snapshots of the source volumes
:param source_group: the source volume group
:param source_vols: the source vols
:returns: model_update, volumes_model_update
model_update is a dictionary of cg status
volumes_model_update is a list of dictionaries of volume
update
:raises: VolumeBackendAPIException, NotImplementedError'

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

    if (not volume_utils.is_group_a_cg_snapshot_type(group)):
        raise NotImplementedError()
    create_snapshot = False
    volumes_model_update = []
    if group_snapshot:
        source_vols_or_snapshots = snapshots
        source_id = group_snapshot.id
        actual_source_grp = group_snapshot
    elif source_group:
        source_vols_or_snapshots = source_vols
        source_id = source_group.id
        actual_source_grp = source_group
        create_snapshot = True
    else:
        exception_message = _('Must    supply    either    group    snapshot    or    a    source    group.')
        raise exception.VolumeBackendAPIException(data=exception_message)
    LOG.debug('Enter    VMAX    create_volume    group_from_src.    Group    to    be    created:    %(grpId)s,    Source    :    %(SourceGrpId)s.', {'grpId': group.id, 'SourceGrpId': source_id})
    tgt_name = self.utils.update_volume_group_name(group)
    self.create_group(context, group)
    model_update = {'status': fields.GroupStatus.AVAILABLE}
    snap_name = None
    try:
        (array, extraspecs_dict_list) = self.utils.get_volume_group_utils(group, self.interval, self.retries)
        vol_grp_name = ''
        dict_volume_dicts = {}
        target_volume_names = {}
        for (volume, source_vol_or_snapshot) in zip(volumes, source_vols_or_snapshots):
            if ('size' in source_vol_or_snapshot):
                volume_size = source_vol_or_snapshot['size']
            else:
                volume_size = source_vol_or_snapshot['volume_size']
            for extraspecs_dict in extraspecs_dict_list:
                if (volume.volume_type_id in extraspecs_dict['volumeTypeId']):
                    extraspecs = extraspecs_dict.get(utils.EXTRA_SPECS)
                    target_volume_name = six.text_type(uuid.uuid4())
                    volume_dict = self.provision.create_volume_from_sg(array, target_volume_name, tgt_name, volume_size, extraspecs)
                    dict_volume_dicts[volume.id] = volume_dict
                    target_volume_names[volume.id] = target_volume_name
        if (create_snapshot is True):
            snap_name = self.utils.truncate_string(group.id, 19)
            self._create_group_replica(actual_source_grp, snap_name)
            vol_grp_name = self.utils.update_volume_group_name(source_group)
        else:
            snap_name = self.utils.truncate_string(source_id, 19)
            source_group = actual_source_grp.get('group')
            volume_group = self._find_volume_group(array, source_group)
            if (volume_group is not None):
                if ('snapVXSnapshots' in volume_group):
                    if (snap_name in volume_group['snapVXSnapshots']):
                        LOG.info('Snapshot    is    present    on    the    array')
                if ('name' in volume_group):
                    vol_grp_name = volume_group['name']
        interval_retries_dict = self.utils.get_intervals_retries_dict(self.interval, self.retries)
        self.provision.link_and_break_replica(array, vol_grp_name, tgt_name, snap_name, interval_retries_dict, delete_snapshot=create_snapshot)
    except Exception:
        exception_message = (_('Failed    to    create    vol    grp    %(volGrpName)s    from    source    %(grpSnapshot)s.') % {'volGrpName': group.id, 'grpSnapshot': source_id})
        LOG.exception(exception_message)
        raise exception.VolumeBackendAPIException(data=exception_message)
    volumes_model_update = self.utils.update_volume_model_updates(volumes_model_update, volumes, group.id, model_update['status'])
    for volume_model_update in volumes_model_update:
        if (volume_model_update['id'] in dict_volume_dicts):
            volume_model_update.update({'provider_location': six.text_type(dict_volume_dicts[volume_model_update['id']])})
    self.utils.update_admin_metadata(volumes_model_update, key='targetVolumeName', values=target_volume_names)
    return (model_update, volumes_model_update)
