Rename os-failures into os-faults

New name "os-faults" better corresponds to the mission of the
library - providing a unified way for fault injection in OpenStack.

Change-Id: I4eff3936f303f35e3b67dec59a39682944bdae25
This commit is contained in:
Ilya Shakhat
2016-09-04 15:58:05 +03:00
parent 5775ecd703
commit b5e0993e4f
37 changed files with 73 additions and 75 deletions

View File

@@ -1,7 +1,7 @@
[run] [run]
branch = True branch = True
source = os_failures source = os_faults
omit = os_failures/openstack/* omit = os_faults/openstack/*
[report] [report]
ignore_errors = True ignore_errors = True

View File

@@ -1,4 +1,4 @@
[gerrit] [gerrit]
host=review.openstack.org host=review.openstack.org
port=29418 port=29418
project=openstack/os-failures.git project=openstack/os-faults.git

View File

@@ -14,4 +14,4 @@ Pull requests submitted through GitHub will be ignored.
Bugs should be filed on Launchpad, not GitHub: Bugs should be filed on Launchpad, not GitHub:
https://bugs.launchpad.net/os_failures https://bugs.launchpad.net/os_faults

View File

@@ -1,4 +1,4 @@
os_failures Style Commandments os_faults Style Commandments
=============================================== ===============================================
Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/ Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/

View File

@@ -1,17 +1,17 @@
=========== =========
os-failures os-faults
=========== =========
**An OpenStack failures library** **OpenStack faults injection library**
The library does destructive actions against OpenStack cloud. It provides The library does destructive actions inside OpenStack cloud. It provides
an abstraction layer over different type of cloud deployment. The actions an abstraction layer over different type of cloud deployment. The actions
are implemented as drivers (e.g. DevStack driver, Fuel driver, KVM driver etc.). are implemented as drivers (e.g. DevStack driver, Fuel driver, KVM driver etc.).
* Free software: Apache license * Free software: Apache license
* Documentation: http://os_failures.readthedocs.io * Documentation: http://os-faults.readthedocs.io
* Source: https://github.com/shakhat/os-failures * Source: https://github.com/openstack/os-faults
* Bugs: http://bugs.launchpad.net/os_failures * Bugs: http://bugs.launchpad.net/os_faults
Usage Usage
----- -----
@@ -44,7 +44,7 @@ Build the connection to the cloud deployment and verify it:
.. code-block:: python .. code-block:: python
distractor = os_failures.connect(cloud_config) distractor = os_faults.connect(cloud_config)
distractor.verify() distractor.verify()
Make some distraction: Make some distraction:
@@ -69,7 +69,7 @@ Get a service and restart it:
.. code-block:: python .. code-block:: python
distractor = os_failures.connect(cloud_config) distractor = os_faults.connect(cloud_config)
service = distractor.get_service(name='keystone-api') service = distractor.get_service(name='keystone-api')
service.restart() service.restart()

View File

@@ -37,7 +37,7 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'os_failures' project = u'os-faults'
copyright = u'2016, OpenStack Foundation' copyright = u'2016, OpenStack Foundation'
# If true, '()' will be appended to :func: etc. cross-reference text. # If true, '()' will be appended to :func: etc. cross-reference text.

View File

@@ -1,10 +1,10 @@
.. os_failures documentation master file, created by .. os-faults documentation master file, created by
sphinx-quickstart on Tue Jul 9 22:26:36 2013. sphinx-quickstart on Tue Jul 9 22:26:36 2013.
You can adapt this file completely to your liking, but it should at least You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive. contain the root `toctree` directive.
Welcome to os_failures's documentation! Welcome to os-faults's documentation!
======================================================== =====================================
Contents: Contents:

View File

@@ -4,9 +4,9 @@ Installation
At the command line:: At the command line::
$ pip install os_failures $ pip install os-faults
Or, if you have virtualenvwrapper installed:: Or, if you have virtualenvwrapper installed::
$ mkvirtualenv os_failures $ mkvirtualenv os-faults
$ pip install os_failures $ pip install os-faults

View File

@@ -1,7 +1,7 @@
======== =====
Usage Usage
======== =====
To use os_failures in a project:: To use os-faults in a project::
import os_failures import os_faults

View File

@@ -12,7 +12,7 @@
import logging import logging
import os_failures import os_faults
def main(): def main():
@@ -32,7 +32,7 @@ def main():
} }
logging.info('# Create connection') logging.info('# Create connection')
distractor = os_failures.connect(cloud_config) distractor = os_faults.connect(cloud_config)
logging.info('# Verify connection to the cloud') logging.info('# Verify connection to the cloud')
distractor.verify() distractor.verify()

View File

@@ -1,6 +1,6 @@
#!/bin/bash -x #!/bin/bash -x
KEY_FILE_NAME="${HOME}/.ssh/os_failures" KEY_FILE_NAME="${HOME}/.ssh/os_faults"
USERNAME="root" USERNAME="root"
HOST="172.18.171.149" HOST="172.18.171.149"

View File

@@ -12,7 +12,7 @@
import logging import logging
import os_failures import os_faults
def main(): def main():
@@ -42,7 +42,7 @@ def main():
} }
logging.info('Create connection to the cluster') logging.info('Create connection to the cluster')
destructor = os_failures.connect(cloud_config) destructor = os_faults.connect(cloud_config)
logging.info('Verify connection to the cluster') logging.info('Verify connection to the cluster')
destructor.verify() destructor.verify()

View File

@@ -12,7 +12,7 @@
import logging import logging
import os_failures import os_faults
def main(): def main():
@@ -36,7 +36,7 @@ def main():
} }
logging.info('Create connection to the cluster') logging.info('Create connection to the cluster')
destructor = os_failures.connect(cloud_config) destructor = os_faults.connect(cloud_config)
logging.info('Verify connection to the cluster') logging.info('Verify connection to the cluster')
destructor.verify() destructor.verify()

View File

@@ -12,7 +12,7 @@
import logging import logging
import os_failures import os_faults
def main(): def main():
@@ -37,12 +37,12 @@ def main():
} }
logging.info('# Create connection') logging.info('# Create connection')
distractor = os_failures.connect(cloud_config) distractor = os_faults.connect(cloud_config)
logging.info('# Verify connection to the cloud') logging.info('# Verify connection to the cloud')
distractor.verify() distractor.verify()
# os_failures library operate with 2 types of objects: # os_faults library operate with 2 types of objects:
# service - is software that runs in the cloud, e.g. keystone, mysql, # service - is software that runs in the cloud, e.g. keystone, mysql,
# rabbitmq, nova-api, glance-api # rabbitmq, nova-api, glance-api
# nodes - nodes that host the cloud, e.g. hardware server with hostname # nodes - nodes that host the cloud, e.g. hardware server with hostname

View File

@@ -12,13 +12,13 @@
import pbr.version import pbr.version
from os_failures.drivers import devstack from os_faults.drivers import devstack
from os_failures.drivers import fuel from os_faults.drivers import fuel
from os_failures.drivers import ipmi from os_faults.drivers import ipmi
from os_failures.drivers import libvirt_driver from os_faults.drivers import libvirt_driver
__version__ = pbr.version.VersionInfo( __version__ = pbr.version.VersionInfo(
'os_failures').version_string() 'os_faults').version_string()
def connect(cloud_config): def connect(cloud_config):

View File

@@ -81,7 +81,7 @@ class MyCallback(callback_pkg.CallbackBase):
def resolve_relative_path(file_name): def resolve_relative_path(file_name):
path = os.path.normpath(os.path.join( path = os.path.normpath(os.path.join(
os.path.dirname(__import__('os_failures').__file__), '../', file_name)) os.path.dirname(__import__('os_faults').__file__), '../', file_name))
if os.path.exists(path): if os.path.exists(path):
return path return path
@@ -99,7 +99,7 @@ class AnsibleRunner(object):
ssh_common_args='', become=None): ssh_common_args='', become=None):
super(AnsibleRunner, self).__init__() super(AnsibleRunner, self).__init__()
module_path = resolve_relative_path('os_failures/ansible/modules') module_path = resolve_relative_path('os_faults/ansible/modules')
ssh_common_args = ' '.join([ssh_common_args, SSH_COMMON_ARGS]) ssh_common_args = ' '.join([ssh_common_args, SSH_COMMON_ARGS])
self.options = Options( self.options = Options(

View File

@@ -17,10 +17,10 @@ import logging
import six import six
from os_failures.ansible import executor from os_faults.ansible import executor
from os_failures.api import cloud_management from os_faults.api import cloud_management
from os_failures.api import node_collection from os_faults.api import node_collection
from os_failures.api import service from os_faults.api import service
HostClass = namedtuple('HostClass', ['ip', 'mac']) HostClass = namedtuple('HostClass', ['ip', 'mac'])

View File

@@ -17,11 +17,11 @@ import logging
import random import random
import six import six
from os_failures.ansible import executor from os_faults.ansible import executor
from os_failures.api import cloud_management from os_faults.api import cloud_management
from os_failures.api import error from os_faults.api import error
from os_failures.api import node_collection from os_faults.api import node_collection
from os_failures.api import service from os_faults.api import service
class FuelNodeCollection(node_collection.NodeCollection): class FuelNodeCollection(node_collection.NodeCollection):

View File

@@ -16,9 +16,9 @@ import logging
from pyghmi import exceptions as pyghmi_exception from pyghmi import exceptions as pyghmi_exception
from pyghmi.ipmi import command as ipmi_command from pyghmi.ipmi import command as ipmi_command
from os_failures.api import error from os_faults.api import error
from os_failures.api import power_management from os_faults.api import power_management
from os_failures import utils from os_faults import utils
class IPMIDriver(power_management.PowerManagement): class IPMIDriver(power_management.PowerManagement):

View File

@@ -15,9 +15,9 @@ import logging
import libvirt import libvirt
from os_failures.api import error from os_faults.api import error
from os_failures.api import power_management from os_faults.api import power_management
from os_failures import utils from os_faults import utils
class LibvirtDriver(power_management.PowerManagement): class LibvirtDriver(power_management.PowerManagement):

View File

@@ -11,16 +11,16 @@
# under the License. # under the License.
""" """
test_os_failures test_os_faults
---------------------------------- ----------------------------------
Tests for `os_failures` module. Tests for `os_faults` module.
""" """
from os_failures.tests import base from os_faults.tests import base
class TestOs_failures(base.TestCase): class Testos_faults(base.TestCase):
def test_something(self): def test_something(self):
pass pass

View File

@@ -15,7 +15,7 @@ import logging
import threading import threading
import traceback import traceback
from os_failures.api import error from os_faults.api import error
def run(target, mac_addresses_list): def run(target, mac_addresses_list):

View File

@@ -55,7 +55,7 @@ source_suffix = '.rst'
master_doc = 'index' master_doc = 'index'
# General information about the project. # General information about the project.
project = u'os_failures Release Notes' project = u'os_faults Release Notes'
copyright = u'2016, OpenStack Foundation' copyright = u'2016, OpenStack Foundation'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for

View File

@@ -1,5 +1,5 @@
============================================ ============================================
os_failures Release Notes os_faults Release Notes
============================================ ============================================
.. toctree:: .. toctree::

View File

@@ -1,5 +1,5 @@
[metadata] [metadata]
name = os_failures name = os_faults
summary = OpenStack failures library summary = OpenStack failures library
description-file = description-file =
README.rst README.rst
@@ -15,12 +15,10 @@ classifier =
Programming Language :: Python Programming Language :: Python
Programming Language :: Python :: 2 Programming Language :: Python :: 2
Programming Language :: Python :: 2.7 Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.5
[files] [files]
packages = packages =
os_failures os_faults
[build_sphinx] [build_sphinx]
source-dir = doc/source source-dir = doc/source
@@ -31,18 +29,18 @@ all_files = 1
upload-dir = doc/build/html upload-dir = doc/build/html
[compile_catalog] [compile_catalog]
directory = os_failures/locale directory = os_faults/locale
domain = os_failures domain = os_faults
[update_catalog] [update_catalog]
domain = os_failures domain = os_faults
output_dir = os_failures/locale output_dir = os_faults/locale
input_file = os_failures/locale/os_failures.pot input_file = os_faults/locale/os_faults.pot
[extract_messages] [extract_messages]
keywords = _ gettext ngettext l_ lazy_gettext keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg mapping_file = babel.cfg
output_file = os_failures/locale/os_failures.pot output_file = os_faults/locale/os_faults.pot
[build_releasenotes] [build_releasenotes]
all_files = 1 all_files = 1