'Creates a cgsnapshot.'

def create_cgsnapshot(self, context, cgsnapshot, snapshots):

    cgsnapshot_id = cgsnapshot['id']
    try:
        self.proxy.create_cgsnapshot(cgsnapshot)
    except Exception as e:
        msg = (_('Failed    to    create    cg    snapshot    %(id)s    due    to    %(reason)s.') % {'id': cgsnapshot_id, 'reason': six.text_type(e)})
        raise exception.VolumeBackendAPIException(data=msg)
    snapshot_updates = []
    for snapshot in snapshots:
        snapshot_updates.append({'id': snapshot.id, 'status': 'available'})
    model_update = {'status': 'available'}
    return (model_update, snapshot_updates)
