# Path: teuthology/config.py
# def init_logging():
#     def __init__(self, yaml_path=None):
#     def load(self, conf=None):
#     def update(self, in_dict):
#     def from_dict(cls, in_dict):
#     def to_dict(self):
#     def from_str(cls, in_str):
#     def to_str(self):
#     def get(self, key, default=None):
#     def __str__(self):
#     def __repr__(self):
#     def __getitem__(self, name):
#     def __getattr__(self, name):
#     def __contains__(self, name):
#     def __setattr__(self, name, value):
#     def __delattr__(self, name):
#     def __len__(self):
#     def __iter__(self):
#     def __setitem__(self, name, value):
#     def __delitem__(self, name):
#     def __init__(self, yaml_path=None):
#     def get_ceph_cm_ansible_git_url(self):
#     def get_ceph_qa_suite_git_url(self):
#     def get_ceph_git_url(self):
#     def __init__(self, config_dict=None):
#     def _clean_config(self, config_dict):
#     def __getattr__(self, name):
#     def __setattr__(self, name, value):
#     def __repr__(self):
#     def __str__(self):
# def set_config_attr(obj):
# def _get_config_path():
# class YamlConfig(collections.MutableMapping):
# class TeuthologyConfig(YamlConfig):
# class JobConfig(YamlConfig):
# class FakeNamespace(YamlConfig):
# 
# Path: teuthology/misc.py
# def host_shortname(hostname):
#     if _is_ipv4(hostname) or _is_ipv6(hostname):
#         return hostname
#     else:
#         return hostname.split('.', 1)[0]


import logging
import os
import pexpect
import psutil
import subprocess
import sys
import time
import teuthology.lock.query
import teuthology.lock.util
    import libvirt
from teuthology.config import config
from teuthology.contextutil import safe_while
from teuthology.exceptions import ConsoleError
from teuthology.misc import host_shortname
        Extract the name portion from remote name strings.
        """
        hostname = (name or self.name).split('@')[-1]
        return host_shortname(hostname)


class PhysicalConsole(RemoteConsole):
    """
    Physical Console (set from getRemoteConsole)
    """
    def __init__(self, name, ipmiuser=None, ipmipass=None, ipmidomain=None,
                 logfile=None, timeout=40):
        self.name = name
        self.shortname = self.getShortName(name)
        self.timeout = timeout
        self.logfile = None
        self.ipmiuser = ipmiuser or config.ipmi_user
        self.ipmipass = ipmipass or config.ipmi_password
        self.ipmidomain = ipmidomain or config.ipmi_domain
        self.has_ipmi_credentials = all(
            [self.ipmiuser, self.ipmipass, self.ipmidomain]
        )
        self.conserver_master = config.conserver_master
        self.conserver_port = config.conserver_port
        conserver_client_found = psutil.Popen(
            'which console',
            shell=True,
            stdout=subprocess.PIPE,
            stderr=subprocess.STDOUT).wait() == 0
        self.has_conserver = all([

# Path: teuthology/config.py
# def init_logging():
#     def __init__(self, yaml_path=None):
#     def load(self, conf=None):
#     def update(self, in_dict):
#     def from_dict(cls, in_dict):
#     def to_dict(self):
#     def from_str(cls, in_str):
#     def to_str(self):
#     def get(self, key, default=None):
#     def __str__(self):
#     def __repr__(self):
#     def __getitem__(self, name):
#     def __getattr__(self, name):
#     def __contains__(self, name):
#     def __setattr__(self, name, value):
#     def __delattr__(self, name):
#     def __len__(self):
#     def __iter__(self):
#     def __setitem__(self, name, value):
#     def __delitem__(self, name):
#     def __init__(self, yaml_path=None):
#     def get_ceph_cm_ansible_git_url(self):
#     def get_ceph_qa_suite_git_url(self):
#     def get_ceph_git_url(self):
#     def __init__(self, config_dict=None):
#     def _clean_config(self, config_dict):
#     def __getattr__(self, name):
#     def __setattr__(self, name, value):
#     def __repr__(self):
#     def __str__(self):
# def set_config_attr(obj):
# def _get_config_path():
# class YamlConfig(collections.MutableMapping):
# class TeuthologyConfig(YamlConfig):
# class JobConfig(YamlConfig):
# class FakeNamespace(YamlConfig):
# 
# Path: teuthology/misc.py
# def host_shortname(hostname):
#     if _is_ipv4(hostname) or _is_ipv6(hostname):
#         return hostname
#     else:
#         return hostname.split('.', 1)[0]


# Path: teuthology/orchestra/console.py
import logging
import os
import pexpect
import psutil
import subprocess
import sys
import time
import teuthology.lock.query
import teuthology.lock.util
    import libvirt
from teuthology.config import config
from teuthology.contextutil import safe_while
from teuthology.exceptions import ConsoleError
from teuthology.misc import host_shortname

        Extract the name portion from remote name strings.
        """
        hostname = (name or self.name).split('@')[-1]
        return host_shortname(hostname)


class PhysicalConsole(RemoteConsole):
    """
    Physical Console (set from getRemoteConsole)
    """
    def __init__(self, name, ipmiuser=None, ipmipass=None, ipmidomain=None,
                 logfile=None, timeout=40):
        self.name = name
        self.shortname = self.getShortName(name)
        self.timeout = timeout
        self.logfile = None
        self.ipmiuser = ipmiuser or config.ipmi_user
        self.ipmipass = ipmipass or config.ipmi_password
        self.ipmidomain = ipmidomain or config.ipmi_domain
        self.has_ipmi_credentials = all(
            [self.ipmiuser, self.ipmipass, self.ipmidomain]
        )
        self.conserver_master = config.conserver_master
        self.conserver_port = config.conserver_port
        conserver_client_found = psutil.Popen(
            'which console',
            shell=True,
            stdout=subprocess.PIPE,
            stderr=subprocess.STDOUT).wait() == 0
        self.has_conserver = all([

            config.use_conserver is not False,