<commit_before>from lab.providers import Provider


class ProviderExistingOSP7(Provider):
    """Creates servers from base hardware lab config
    """

    def sample_config(self):
        return {'hardware-lab-config': 'g10.yaml'}

    def __init__(self, config):
        from netaddr import IPNetwork
        from lab.server import Server

        super(ProviderExistingOSP7, self).__init__(config=config)

        lab_cfg = self.read_config_from_file(config_path=config['hardware-lab-config'])
        user_net = IPNetwork(lab_cfg['nets']['user']['cidr'])
        self.servers = [Server(ip=str(user_net[lab_cfg['nodes']['director']['ip-shift'][0]]), username='root', password='<PASSWORD>')]

    def create_servers(self):
        return self.servers

    def wait_for_servers(self):
        servers = self.create_servers()
        for server in servers:<commit_msg>switch ProviderExistingOSP7 to use Laboratory class<commit_after>from lab.providers import Provider


class ProviderExistingOSP7(Provider):
    """Creates servers from base hardware lab config
    """

    def sample_config(self):
        return {'hardware-lab-config': 'g10.yaml'}

    def __init__(self, config):
        from lab.laboratory import Laboratory

        super(ProviderExistingOSP7, self).__init__(config=config)

        director = Laboratory(config_path=config['hardware-lab-config']).director()
        self.servers = [director]

    def create_servers(self):
        return self.servers

    def wait_for_servers(self):
        servers = self.create_servers()
        for server in servers:
{'fraction_non_alphanumeric': 0.11350665821179455, 'fraction_numerical': 0.0063411540900443885, 'mean_word_length': 3.6411764705882352, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '5379533', 'n_tokens_mistral': 469, 'n_tokens_neox': 454, 'n_words': 98}