Refactored python-tempestconf to work with devstack
Change-Id: I5143d9ef63d7bf326b477110c0ff6f82b3c2a9b2
This commit is contained in:
parent
2811119bd4
commit
305bf0bb19
@ -1,4 +1,4 @@
|
||||
tempest_config_tool Style Commandments
|
||||
python-tempestconf Style Commandments
|
||||
===============================================
|
||||
|
||||
Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/
|
||||
|
14
README.rst
14
README.rst
@ -1,17 +1,15 @@
|
||||
===============================
|
||||
tempest_config_tool
|
||||
python-tempestconf
|
||||
===============================
|
||||
|
||||
OpenStack Boilerplate contains all the boilerplate you need to create an OpenStack package.
|
||||
python-tempestconf will automatically generates the tempest configuration based on your cloud.
|
||||
|
||||
|
||||
Please fill here a long description which must be at least 3 lines wrapped on
|
||||
80 cols, so that distribution package maintainers can use it in their packages.
|
||||
Note that this is a hard requirement.
|
||||
|
||||
* Free software: Apache license
|
||||
* Documentation: http://docs.openstack.org/developer/tempest_config_tool
|
||||
* Source: http://git.openstack.org/cgit/openstack/tempest_config_tool
|
||||
* Bugs: http://bugs.launchpad.net/replace with the name of the project on launchpad
|
||||
* Documentation: http://docs.openstack.org/developer/python-tempestconf
|
||||
* Source: http://git.openstack.org/cgit/openstack/python-tempestconf
|
||||
* Bugs: http://bugs.launchpad.net/python-tempestconf
|
||||
|
||||
Features
|
||||
--------
|
||||
|
@ -1,19 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import pbr.version
|
||||
|
||||
|
||||
__version__ = pbr.version.VersionInfo(
|
||||
'config_tempest').version_string()
|
23
config_tempest/config_tempest.py
Normal file → Executable file
23
config_tempest/config_tempest.py
Normal file → Executable file
@ -34,34 +34,29 @@ or manually if necessary.
|
||||
obtained by querying the cloud.
|
||||
"""
|
||||
|
||||
import api_discovery
|
||||
import argparse
|
||||
import ConfigParser
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import tempest.config
|
||||
import urllib2
|
||||
|
||||
# Since tempest can be configured in different directories, we need to use
|
||||
# the path starting at cwd.
|
||||
sys.path.insert(0, os.getcwd())
|
||||
|
||||
import config_tempest.api_discovery as api_discovery
|
||||
from tempest.common import identity
|
||||
import tempest.config
|
||||
from tempest.lib import auth
|
||||
from tempest.lib import exceptions
|
||||
from tempest.lib.services.compute import flavors_client
|
||||
from tempest.lib.services.compute import networks_client as nova_net_client
|
||||
from tempest.lib.services.compute import servers_client
|
||||
from tempest.lib.services.identity.v2 import identity_client
|
||||
from tempest.lib.services.identity.v2 import roles_client
|
||||
from tempest.lib.services.identity.v2 import tenants_client
|
||||
from tempest.lib.services.identity.v2 import users_client
|
||||
from tempest.lib.services.identity.v3 \
|
||||
import identity_client as identity_v3_client
|
||||
from tempest.lib.services.image.v2 import images_client
|
||||
from tempest.lib.services.network import networks_client
|
||||
from tempest.services.identity.v2.json import identity_client
|
||||
from tempest.services.identity.v2.json import roles_client
|
||||
from tempest.services.identity.v2.json import tenants_client
|
||||
from tempest.services.identity.v2.json import users_client
|
||||
from tempest.services.identity.v3.json \
|
||||
import identity_client as identity_v3_client
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
LOG_FORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
|
||||
@ -776,7 +771,7 @@ def configure_discovered_services(conf, services):
|
||||
|
||||
# set supported API versions for services with more of them
|
||||
for service, versions in SERVICE_VERSIONS.iteritems():
|
||||
supported_versions = services[service]['versions']
|
||||
supported_versions = services.get(service, {}).get('versions', [])
|
||||
section = service + '-feature-enabled'
|
||||
for version in versions:
|
||||
is_supported = any(version in item
|
||||
|
@ -13,16 +13,16 @@
|
||||
# under the License.
|
||||
|
||||
"""
|
||||
test_config_tempest
|
||||
test_tempest_config
|
||||
----------------------------------
|
||||
|
||||
Tests for `config_tempest` module.
|
||||
Tests for `tempest_config` module.
|
||||
"""
|
||||
|
||||
from config_tempest.tests import base
|
||||
from tempest_config.tests import base
|
||||
|
||||
|
||||
class TestConfig_tempest(base.TestCase):
|
||||
class TestTempest_config(base.TestCase):
|
||||
|
||||
def test_something(self):
|
||||
pass
|
@ -37,8 +37,8 @@ source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'tempest_config_tool'
|
||||
copyright = u'2016, OpenStack Foundation'
|
||||
project = u'python-tempestconf'
|
||||
copyright = u'2016, Red Hat'
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
add_function_parentheses = True
|
||||
|
@ -1,9 +1,9 @@
|
||||
.. tempest_config_tool documentation master file, created by
|
||||
.. python-tempestconf documentation master file, created by
|
||||
sphinx-quickstart on Tue Jul 9 22:26:36 2013.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
Welcome to tempest_config_tool's documentation!
|
||||
Welcome to python-tempestconf's documentation!
|
||||
========================================================
|
||||
|
||||
Contents:
|
||||
|
@ -4,9 +4,9 @@ Installation
|
||||
|
||||
At the command line::
|
||||
|
||||
$ pip install tempest_config_tool
|
||||
$ pip install python-tempestconf
|
||||
|
||||
Or, if you have virtualenvwrapper installed::
|
||||
|
||||
$ mkvirtualenv tempest_config_tool
|
||||
$ pip install tempest_config_tool
|
||||
$ mkvirtualenv python-tempestconf
|
||||
$ pip install python-tempestconf
|
||||
|
@ -2,6 +2,6 @@
|
||||
Usage
|
||||
========
|
||||
|
||||
To use tempest_config_tool in a project::
|
||||
To use python-tempestconf in a project::
|
||||
|
||||
import config_tempest
|
||||
import tempest_config
|
||||
|
@ -55,7 +55,7 @@ source_suffix = '.rst'
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'config_tempest Release Notes'
|
||||
project = u'tempest_config Release Notes'
|
||||
copyright = u'2016, OpenStack Foundation'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
@ -270,3 +270,6 @@ texinfo_documents = [
|
||||
|
||||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||
# texinfo_no_detailmenu = False
|
||||
|
||||
# -- Options for Internationalization output ------------------------------
|
||||
locale_dirs = ['locale/']
|
||||
|
@ -1,5 +1,5 @@
|
||||
============================================
|
||||
config_tempest Release Notes
|
||||
tempest_config Release Notes
|
||||
============================================
|
||||
|
||||
.. toctree::
|
||||
|
@ -2,6 +2,6 @@
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
pbr>=1.6 # Apache-2.0
|
||||
requests
|
||||
tempest
|
||||
pbr>=1.8 # Apache-2.0
|
||||
tempest>=14.0.0 # Apache-2.0
|
||||
requests>=2.10.0,!=2.12.2 # Apache-2.0
|
||||
|
33
setup.cfg
33
setup.cfg
@ -1,11 +1,11 @@
|
||||
[metadata]
|
||||
name = tempest_config_tool
|
||||
summary = OpenStack Boilerplate contains all the boilerplate you need to create an OpenStack package.
|
||||
name = python-tempestconf
|
||||
summary = python-tempestconf will automatically generates the tempest configuration based on your cloud.
|
||||
description-file =
|
||||
README.rst
|
||||
author = OpenStack
|
||||
author-email = openstack-dev@lists.openstack.org
|
||||
home-page = http://www.openstack.org/
|
||||
author = Red Hat
|
||||
author-email = rdo-list@redhat.com
|
||||
home-page = http://www.redhat.com/
|
||||
classifier =
|
||||
Environment :: OpenStack
|
||||
Intended Audience :: Information Technology
|
||||
@ -23,6 +23,13 @@ classifier =
|
||||
packages =
|
||||
config_tempest
|
||||
|
||||
data_files =
|
||||
etc/tempest = etc/*
|
||||
|
||||
[entry_points]
|
||||
console_scripts =
|
||||
discover-tempest-config = config_tempest.config_tempest:main
|
||||
|
||||
[build_sphinx]
|
||||
source-dir = doc/source
|
||||
build-dir = doc/build
|
||||
@ -31,21 +38,7 @@ all_files = 1
|
||||
[upload_sphinx]
|
||||
upload-dir = doc/build/html
|
||||
|
||||
[compile_catalog]
|
||||
directory = config_tempest/locale
|
||||
domain = config_tempest
|
||||
|
||||
[update_catalog]
|
||||
domain = config_tempest
|
||||
output_dir = config_tempest/locale
|
||||
input_file = config_tempest/locale/config_tempest.pot
|
||||
|
||||
[extract_messages]
|
||||
keywords = _ gettext ngettext l_ lazy_gettext
|
||||
mapping_file = babel.cfg
|
||||
output_file = config_tempest/locale/config_tempest.pot
|
||||
|
||||
[build_releasenotes]
|
||||
all_files = 1
|
||||
build-dir = releasenotes/build
|
||||
source-dir = releasenotes/source
|
||||
source-dir = releasenotes/source
|
||||
|
2
setup.py
2
setup.py
@ -25,5 +25,5 @@ except ImportError:
|
||||
pass
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['pbr'],
|
||||
setup_requires=['pbr>=1.8'],
|
||||
pbr=True)
|
||||
|
@ -2,16 +2,16 @@
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
|
||||
hacking<0.12,>=0.11.0 # Apache-2.0
|
||||
hacking>=0.12.0,<0.13 # Apache-2.0
|
||||
|
||||
coverage>=3.6 # Apache-2.0
|
||||
coverage>=4.0 # Apache-2.0
|
||||
python-subunit>=0.0.18 # Apache-2.0/BSD
|
||||
sphinx!=1.3b1,<1.3,>=1.2.1 # BSD
|
||||
oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0
|
||||
sphinx>=1.2.1,!=1.3b1,<1.4 # BSD
|
||||
oslosphinx>=4.7.0 # Apache-2.0
|
||||
oslotest>=1.10.0 # Apache-2.0
|
||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
||||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
||||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
testtools>=1.4.0 # MIT
|
||||
|
||||
# releasenotes
|
||||
reno>=1.8.0 # Apache2
|
||||
reno>=1.8.0 # Apache-2.0
|
||||
|
9
tox.ini
9
tox.ini
@ -5,12 +5,11 @@ skipsdist = True
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
install_command = pip install -U {opts} {packages}
|
||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
deps =
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
PYTHONWARNINGS=default::DeprecationWarning
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = python setup.py test --slowest --testr-args='{posargs}'
|
||||
|
||||
[testenv:pep8]
|
||||
@ -23,7 +22,7 @@ commands = {posargs}
|
||||
commands = python setup.py test --coverage --testr-args='{posargs}'
|
||||
|
||||
[testenv:docs]
|
||||
commands = python setup.py build_sphinx {posargs}
|
||||
commands = python setup.py build_sphinx
|
||||
|
||||
[testenv:releasenotes]
|
||||
commands =
|
||||
|
Loading…
Reference in New Issue
Block a user