bd998017d5
Create host inventory services (api, conductor and agent) and python-inventoryclient. The inventory service collects the host resources and provides a REST API and client to expose the host resources. Create plugin for integration with system configuration (sysinv) service. This is the initial inventory service infratructure commit. Puppet configuration, SM integration and host integration with sysinv(systemconfig) changes are pending and planned to be delivered in future commits. Tests Performed: Verify the changes are inert on config_controller installation and provisioning. Puppet and spec changes are required in order to create keystone, database and activate inventory services. Unit tests performed (when puppet configuration for keystone, database is applied): Trigger host configure_check, configure signals into systemconfig(sysinv). Verify python-inventoryclient and api service: Disks and related storage resources are pending. inventory host-cpu-list/show inventory host-device-list/show/modify inventory host-ethernetport-list/show inventory host-lldp-neighbor-list inventory host-lldp-agent-list/show inventory host-memory-list/show inventory host-node-list/show inventory host-port-list/show Tox Unit tests: inventory: pep8 python-inventoryclient: py27, pep8, cover, pylint Change-Id: I744ac0de098608c55b9356abf180cc36601cfb8d Story: 2002950 Task: 22952 Signed-off-by: John Kung <john.kung@windriver.com>
65 lines
1.8 KiB
INI
65 lines
1.8 KiB
INI
[tox]
|
|
envlist = py27,pep8,cover,pylint
|
|
minversion = 1.6
|
|
|
|
# tox does not work if the path to the workdir is too long, so move it to /tmp
|
|
toxworkdir = /tmp/{env:USER}_inventoryclienttox
|
|
cgcsdir = {toxinidir}/../../../..
|
|
distshare={toxworkdir}/.tox/distshare
|
|
|
|
[testenv]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
|
OS_TEST_PATH=inventoryclient/tests
|
|
TESTR_START_DIR=inventoryclient/tests
|
|
basepython = python2.7
|
|
usedevelop = True
|
|
|
|
install_command = pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike} {opts} {packages}
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
|
|
commands =
|
|
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
|
python setup.py testr --slowest --testr-args='{posargs}'
|
|
|
|
whitelist_externals =
|
|
bash
|
|
find
|
|
rm
|
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8 inventoryclient
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
basepython = python2.7
|
|
commands =
|
|
find . -type f -name ".coverage\.*" -delete
|
|
rm -f .coverage
|
|
rm -Rf cover
|
|
rm -f coverage.xml
|
|
python setup.py testr --coverage --testr-args='{posargs}'
|
|
coverage xml
|
|
|
|
[flake8]
|
|
show-source = true
|
|
exclude=.*,dist,*lib/python*,*egg,build
|
|
max-complexity=25
|
|
# H102 Apache 2.0 license header not found
|
|
# H233 Python 3.x incompatible use of print operator
|
|
# H404 multi line docstring should start without a leading new line
|
|
# H405 multi line docstring summary not separated with an empty line
|
|
ignore = H102,H233,H404,H405
|
|
|
|
[testenv:pylint]
|
|
basepython = python2.7
|
|
|
|
deps = {[testenv]deps}
|
|
pylint
|
|
|
|
commands = pylint {posargs} inventoryclient --rcfile=./pylint.rc --extension-pkg-whitelist=lxml.etree,greenlet --ignored-classes=LookupDict
|