'Creates a cgsnapshot.'

def create_cgsnapshot(self, cgsnapshot, snapshots):

    cg_id = cgsnapshot['consistencygroup_id']
    cg_name = utils.convert_uuid_to_es_fmt(cg_id)
    es_cg = self._get_consistencygroup_by_name(cg_name)
    es_snaphots = self._client.create_consistency_group_snapshot(es_cg['id'])
    snapshot_updates = list()
    for snap in snapshots:
        es_vol = self._get_volume(snap['volume']['id'])
        for es_snap in es_snaphots:
            if (es_snap['baseVol'] == es_vol['id']):
                snapshot_updates.append({'id': snap['id'], 'provider_id': es_snap['id'], 'status': 'available'})
    return (None, snapshot_updates)
