'Creates a group snapshot.'

def create_group_snapshot(self, context, group_snapshot, snapshots):

    if (not volume_utils.is_group_a_cg_snapshot_type(group_snapshot)):
        raise NotImplementedError()
    cg_id = group_snapshot.group_id
    snap_shot_name = (self._get_3par_snap_name(group_snapshot.id) + '-@count@')
    copy_of_name = self._get_3par_vvs_name(cg_id)
    extra = {'group_snapshot_id': group_snapshot.id}
    extra['group_id'] = cg_id
    extra['description'] = group_snapshot.description
    optional = {'comment': json.dumps(extra), 'readOnly': False}
    if self.config.hpe3par_snapshot_expiration:
        optional['expirationHours'] = int(self.config.hpe3par_snapshot_expiration)
    if self.config.hpe3par_snapshot_retention:
        optional['retentionHours'] = int(self.config.hpe3par_snapshot_retention)
    try:
        self.client.createSnapshotOfVolumeSet(snap_shot_name, copy_of_name, optional=optional)
    except Exception as ex:
        msg = (_('There    was    an    error    creating    the    cgsnapshot:    %s'), six.text_type(ex))
        LOG.error(msg)
        raise exception.InvalidInput(reason=msg)
    snapshot_model_updates = []
    for snapshot in snapshots:
        snapshot_update = {'id': snapshot['id'], 'status': fields.SnapshotStatus.AVAILABLE}
        snapshot_model_updates.append(snapshot_update)
    model_update = {'status': fields.GroupSnapshotStatus.AVAILABLE}
    return (model_update, snapshot_model_updates)
