'Create a FlashCopy mapping and add to consistent group.'

def create_flashcopy_to_consistgrp(self, source, target, consistgrp, config, opts, full_copy=False, pool=None):

    LOG.debug('Enter:    create_flashcopy_to_consistgrp:    create    FlashCopy    from    source    %(source)s    to    target    %(target)sThen    add    the    flashcopy    to    %(cg)s.', {'source': source, 'target': target, 'cg': consistgrp})
    src_attrs = self.get_vdisk_attributes(source)
    if (src_attrs is None):
        msg = (_('create_copy:    Source    vdisk    %(src)s    does    not    exist.') % {'src': source})
        LOG.error(msg)
        raise exception.VolumeDriverException(message=msg)
    src_size = src_attrs['capacity']
    if (not pool):
        pool = src_attrs['mdisk_grp_name']
    opts['iogrp'] = src_attrs['IO_group_id']
    self.create_vdisk(target, src_size, 'b', pool, opts)
    self.ssh.mkfcmap(source, target, full_copy, config.storwize_svc_flashcopy_rate, consistgrp=consistgrp)
    LOG.debug('Leave:    create_flashcopy_to_consistgrp:    FlashCopy    started    from        %(source)s    to    %(target)s.', {'source': source, 'target': target})
