def is_valid_info_file(path):

    digest_size = hashlib.sha1().digestsize * 2
    regexp = (CONF.libvirt.image_info_filename_pattern
              % {'image': ('([0-9a-f]{%(digest_size)d}|'
                           '[0-9a-f]{%(digest_size)d}_sm|'
                           '[0-9a-f]{%(digest_size)d}_[0-9]+)'
                           % {'digest_size': digest_size})})
    m = re.match(regexp, path)
    if m:
        return True
    return False
Prints stages to a file, stage info to stdout
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/virt/libvirt/imagecache.py/is_valid_info_file--crossover with--dataset/ETHPy150Open Mouse-Imaging-Centre/pydpiper/pydpiper/pipeline.py/Pipeline.printStages