<commit_before>import logging
from time import sleep

import xmlrpclib
from devops.helpers import wait, tcp_ping, http, ssh

from test.integration.base import Base
from test.helpers import SSHClient


class TestCobbler(Base):
    def __init__(self, *args, **kwargs):
        super(TestCobbler, self).__init__(*args, **kwargs)
        self.remote = SSHClient()

    def setUp(self):
        logging.info('Admin node ip: %s' % self.get_admin_node_ip())
        self.ip = self.get_admin_node_ip()

    def tearDown(self):
        pass

    # There is unknown issue with Cobbler interface so this currently fails
    def test_cobbler_alive(self):
        wait(
            # it's now 502 but shouldn't be - just for now
            lambda: http(host=self.ip, url='/cobbler_api', waited_code=502),
            timeout=60
        )
        server = xmlrpclib.Server('http://%s/cobbler_api' % self.ip)
        token = server.login('cobbler', 'cobbler')
        assert server.ping() is True<commit_msg>cobbler test - server.ping deprecated<commit_after>import logging
from time import sleep

import xmlrpclib
from devops.helpers import wait, tcp_ping, http, ssh

from test.integration.base import Base
from test.helpers import SSHClient


class TestCobbler(Base):
    def __init__(self, *args, **kwargs):
        super(TestCobbler, self).__init__(*args, **kwargs)
        self.remote = SSHClient()

    def setUp(self):
        logging.info('Admin node ip: %s' % self.get_admin_node_ip())
        self.ip = self.get_admin_node_ip()

    def tearDown(self):
        pass

    # There is unknown issue with Cobbler interface so this currently fails
    def test_cobbler_alive(self):
        wait(
            # it's now 502 but shouldn't be - just for now
            lambda: http(host=self.ip, url='/cobbler_api', waited_code=502),
            timeout=60
        )
        server = xmlrpclib.Server('http://%s/cobbler_api' % self.ip)
        token = server.login('cobbler', 'cobbler')
{'fraction_non_alphanumeric': 0.10683544303797468, 'fraction_numerical': 0.00810126582278481, 'mean_word_length': 2.9051383399209487, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '647489', 'n_tokens_mistral': 641, 'n_tokens_neox': 611, 'n_words': 166}