<commit_before>import re

from fabfile.config import *
from fabfile.utils.fabos import detect_ostype

@task
@EXECUTE_TASK
@roles('all')
def install_test_repo():
    '''Installs test repo which contains packages specific to
       execute contrail test scripts
    '''
    execute('install_test_repo_node', env.host_string)

@task
def install_test_repo_node(*args):
    '''Installs test repo in given node'''
    for host_string in args:
        with settings(host_string=host_string):
            os_type = detect_ostype().lower()
            if os_type in ['ubuntu']:
                print 'No test-repo availabe'
            if os_type in ['centos', 'centoslinux71']:
                put('fabfile/contraillabs/repo/centos_el7_test.repo',
                    '/etc/yum.repos.d/contrail_test.repo')
                run('yum clean all')
            if os_type in ['redhat']:
                put('fabfile/contraillabs/repo/el7_test.repo',
                    '/etc/yum.repos.d/contrail_test.repo')
                run('yum clean all')


@task
@EXECUTE_TASK
@roles('all')
def cleanup_repo():
    '''Removes all existing repos in all the nodes specified in testbed'''
    esxi_hosts = getattr(testbed, 'esxi_hosts', None)
    if esxi_hosts:
        for esxi in esxi_hosts:
            if env.host_string == esxi_hosts[esxi]['contrail_vm']['host']:
                return
    execute('cleanup_repo_node', env.host_string)

@task<commit_msg>typo in contrail test repo for centoslinux<commit_after>import re

from fabfile.config import *
from fabfile.utils.fabos import detect_ostype

@task
@EXECUTE_TASK
@roles('all')
def install_test_repo():
    '''Installs test repo which contains packages specific to
       execute contrail test scripts
    '''
    execute('install_test_repo_node', env.host_string)

@task
def install_test_repo_node(*args):
    '''Installs test repo in given node'''
    for host_string in args:
        with settings(host_string=host_string):
            os_type = detect_ostype().lower()
            if os_type in ['ubuntu']:
                print 'No test-repo availabe'
            if os_type in ['centos', 'centoslinux']:
                put('fabfile/contraillabs/repo/centos_el7_test.repo',
                    '/etc/yum.repos.d/contrail_test.repo')
                run('yum clean all')
            if os_type in ['redhat']:
                put('fabfile/contraillabs/repo/el7_test.repo',
                    '/etc/yum.repos.d/contrail_test.repo')
                run('yum clean all')


@task
@EXECUTE_TASK
@roles('all')
def cleanup_repo():
    '''Removes all existing repos in all the nodes specified in testbed'''
    esxi_hosts = getattr(testbed, 'esxi_hosts', None)
    if esxi_hosts:
        for esxi in esxi_hosts:
            if env.host_string == esxi_hosts[esxi]['contrail_vm']['host']:
                return
    execute('cleanup_repo_node', env.host_string)

@task
{'fraction_non_alphanumeric': 0.11045909561615465, 'fraction_numerical': 0.0020711080428028996, 'mean_word_length': 2.608966376089664, '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': '2463092', 'n_tokens_mistral': 937, 'n_tokens_neox': 895, 'n_words': 215}