<commit_before>#!/usr/bin/python

from novaclient.v1_1.client import Client as NovaClient

__author__ = 'beb'

AUTH_URLv2 = 'http://192.168.120.15:5000/v2.0'
AUTH_URLv3 = 'http://192.168.120.15:5000/v3'
USERNAME = 'admin'
PASSWORD = '<PASSWORD>'
TENANT_NAME = 'admin'

class Client(object):
    def __init__(self):
        kwargs = [USERNAME, PASSWORD, TENANT_NAME, AUTH_URLv2]
        self.novaclient = NovaClient(*kwargs)

    def get_hypervisors(self):
        hypervisors = self.novaclient.hypervisors.list()
        return hypervisors

    def get_servers(self):
        servers = self.novaclient.servers.list(search_opts={'deleted': 'true'})
        return servers<commit_msg>Get server info for hypervisors.<commit_after>#!/usr/bin/python

from novaclient.v1_1.client import Client as NovaClient

__author__ = 'beb'

AUTH_URLv2 = 'http://192.168.120.15:5000/v2.0'
AUTH_URLv3 = 'http://192.168.120.15:5000/v3'
USERNAME = 'admin'
PASSWORD = '<PASSWORD>'
TENANT_NAME = 'admin'

class Client(object):
    def __init__(self):
        kwargs = [USERNAME, PASSWORD, TENANT_NAME, AUTH_URLv2]
        self.novaclient = NovaClient(*kwargs)

    def get_hypervisors(self):
        hypervisors = self.novaclient.hypervisors.list()
        return hypervisors

    def get_servers(self):
        servers = self.novaclient.servers.list()
        return servers
{'fraction_non_alphanumeric': 0.1279585798816568, 'fraction_numerical': 0.05621301775147929, 'mean_word_length': 3.649484536082474, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '7186533', 'n_tokens_mistral': 525, 'n_tokens_neox': 477, 'n_words': 88}