<commit_before><commit_msg>create the install module for suse<commit_after>

def install(release, codename, version_kind, version):
    import platform
    import subprocess

    if version_kind in ['stable', 'testing']:
        key = 'release'
    else:
        key = 'autobuild'

    if codename == 'Mantis':
        distro = 'opensuse12'
    else:
        distro = 'sles-11sp2'

    subprocess.check_call(
        args='su -c \'rpm --import "https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/{key}.asc"\''.format(key=key),
        shell=True,
        )

    if version_kind == 'stable':
        url = 'http://ceph.com/rpm-{version}/{distro}/'.format(
            version=version,
            distro=distro,
            )
    elif version_kind == 'testing':
        url = 'http://ceph.com/rpm-testing/{distro}'.format(distro=distro)
    elif version_kind == 'dev':
        url = 'http://gitbuilder.ceph.com/ceph-rpm-{distro}{release}-{machine}-basic/ref/{version}/'.format(
            distro=distro,
            release=release.split(".", 1)[0],
            machine=platform.machine(),
            version=version,
            )

    subprocess.check_call(
        args=[
            'rpm',
            '-Uvh',
            '--replacepkgs',
            '--force',
            '--quiet',
            '{url}noarch/ceph-release-1-0.noarch.rpm'.format(
                url=url,
                ),
            ]
        )

    subprocess.check_call(
        args=[
            'zypper',
            '--non-interactive',
            '--quiet',
            'install',
            'ceph',
            ],
        )
{'fraction_non_alphanumeric': 0.15527950310559005, 'fraction_numerical': 0.0055900621118012426, 'mean_word_length': 1.6152597402597402, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '7128793', 'n_tokens_mistral': 519, 'n_tokens_neox': 495, 'n_words': 78}