<commit_before>#!/usr/bin/env jython

import logging
from org.jclouds.abiquo.predicates.cloud import VirtualMachinePredicates
from org.jclouds.abiquo.predicates.cloud import VolumePredicates

log = logging.getLogger('kahuna')


def find_volume(context, name):
    """ Find a volume given its name """
    cloud = context.getCloudService()
    vdcs = cloud.listVirtualDatacenters()
    log.debug("Looking for volume: %s" % name)
    for vdc in vdcs:
        volume = vdc.findVolume(VolumePredicates.name(name))
        if volume:
            log.debug("Found volume in virtual datacenter: %s" % vdc.getName())
            return volume


def refresh_volume(context, volume):
    """ Refresh the given volume """
    vdc = volume.getVirtualDatacenter()
    return vdc.getVolume(volume.getId())
<commit_msg>Renamed volume predicate<commit_after>#!/usr/bin/env jython

import logging
from org.jclouds.abiquo.predicates.cloud import VirtualMachinePredicates
from org.jclouds.abiquo.predicates.cloud import VirtualDiskPredicates

log = logging.getLogger('kahuna')


def find_volume(context, name):
    """ Find a volume given its name """
    cloud = context.getCloudService()
    vdcs = cloud.listVirtualDatacenters()
    log.debug("Looking for volume: %s" % name)
    for vdc in vdcs:
        volume = vdc.findVolume(VirtualDiskPredicates.name(name))
        if volume:
            log.debug("Found volume in virtual datacenter: %s" % vdc.getName())
            return volume


def refresh_volume(context, volume):
    """ Refresh the given volume """
    vdc = volume.getVirtualDatacenter()
    return vdc.getVolume(volume.getId())

{'fraction_non_alphanumeric': 0.10804174340085942, 'fraction_numerical': 0.0, 'mean_word_length': 3.7246376811594204, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1985816', 'n_tokens_mistral': 504, 'n_tokens_neox': 493, 'n_words': 122}