# 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):


import logging
import re
import requests
import socket
import time
import yaml
from teuthology.util.compat import urlencode
from copy import deepcopy
from libcloud.common.exceptions import RateLimitReachedError, BaseHTTPError
from paramiko import AuthenticationException
from paramiko.ssh_exception import NoValidConnectionsError
from teuthology.config import config
from teuthology.contextutil import safe_while
from teuthology.provision.cloud import base
from teuthology.provision.cloud import util
from teuthology.provision.cloud.base import Provider
                    self.provider.driver.attach_volume,
                    self.node,
                    volume,
                    device=None,
                )
        except Exception:
            log.exception("Failed to create or attach volume!")
            return False
        return True

    def _destroy_volumes(self):
        all_volumes = retry(self.provider.driver.list_volumes)
        our_volumes = [vol for vol in all_volumes
                       if vol.name.startswith("%s_" % self.name)]
        for vol in our_volumes:
            try:
                retry(self.provider.driver.detach_volume, vol)
            except Exception:
                log.exception("Could not detach volume %s", vol)
            try:
                retry(self.provider.driver.destroy_volume, vol)
            except Exception:
                log.exception("Could not destroy volume %s", vol)

    def _update_dns(self):
        query = urlencode(dict(
            name=self.name,
            ip=self.ips[0],
        ))
        nsupdate_url = "%s?%s" % (

# 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/provision/cloud/openstack.py
import logging
import re
import requests
import socket
import time
import yaml
from teuthology.util.compat import urlencode
from copy import deepcopy
from libcloud.common.exceptions import RateLimitReachedError, BaseHTTPError
from paramiko import AuthenticationException
from paramiko.ssh_exception import NoValidConnectionsError
from teuthology.config import config
from teuthology.contextutil import safe_while
from teuthology.provision.cloud import base
from teuthology.provision.cloud import util
from teuthology.provision.cloud.base import Provider

                    self.provider.driver.attach_volume,
                    self.node,
                    volume,
                    device=None,
                )
        except Exception:
            log.exception("Failed to create or attach volume!")
            return False
        return True

    def _destroy_volumes(self):
        all_volumes = retry(self.provider.driver.list_volumes)
        our_volumes = [vol for vol in all_volumes
                       if vol.name.startswith("%s_" % self.name)]
        for vol in our_volumes:
            try:
                retry(self.provider.driver.detach_volume, vol)
            except Exception:
                log.exception("Could not detach volume %s", vol)
            try:
                retry(self.provider.driver.destroy_volume, vol)
            except Exception:
                log.exception("Could not destroy volume %s", vol)

    def _update_dns(self):
        query = urlencode(dict(
            name=self.name,
            ip=self.ips[0],
        ))
        nsupdate_url = "%s?%s" % (

            config.nsupdate_url,