Make api service work

This commit is contained in:
Lingxian Kong 2017-04-13 16:43:50 +12:00
parent ef833a417f
commit 14812384c2
10 changed files with 127 additions and 25 deletions

6
.coveragerc Normal file
View File

@ -0,0 +1,6 @@
[run]
branch = True
source = qinling
[report]
ignore_errors = True

60
.gitignore vendored Normal file
View File

@ -0,0 +1,60 @@
*.py[cod]
*.sqlite
# C extensions
*.so
# Packages
*.egg
*.eggs
*.egg-info
dist
build
.venv
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib
lib64
# Installer logs
pip-log.txt
# Unit test / coverage reports
.coverage
.tox
nosetests.xml
cover/*
.testrepository/
subunit.log
.qinling.conf
AUTHORS
ChangeLog
# Translations
*.mo
# Mr Developer
.mr.developer.cfg
.project
.pydevproject
.idea
.DS_Store
etc/*.conf
etc/qinling.conf.sample
#Linux swap file
*.swp
# Files created by releasenotes build
releasenotes/build
# Files created by doc build
doc/source/api
# Files created by API build
api-ref/build/

4
.gitreview Normal file
View File

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

3
.mailmap Normal file
View File

@ -0,0 +1,3 @@
# Format is:
# <preferred e-mail> <other e-mail 1>
# <preferred e-mail> <other e-mail 2>

7
.testr.conf Normal file
View File

@ -0,0 +1,7 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

@ -1 +1 @@
Subproject commit 4eed5b5811a780a1716d5d5ee18fb85ac2ca348b
Subproject commit e089c31e73c1e313293ea794a25a30b15b4dad8e

View File

@ -3,3 +3,19 @@
# process, which may cause wedges in the gate later.
pbr>=2.0 # Apache-2.0
Babel!=2.4.0,>=2.3.4 # BSD
eventlet!=0.18.3,>=0.18.2 # MIT
keystonemiddleware>=4.12.0 # Apache-2.0
oslo.concurrency>=3.8.0 # Apache-2.0
oslo.config>=3.22.0 # Apache-2.0
oslo.messaging>=5.19.0 # Apache-2.0
oslo.policy>=1.17.0 # Apache-2.0
oslo.utils>=3.20.0 # Apache-2.0
oslo.log>=3.22.0 # Apache-2.0
oslo.serialization>=1.10.0 # Apache-2.0
oslo.service>=1.10.0 # Apache-2.0
pecan!=1.0.2,!=1.0.3,!=1.0.4,!=1.2,>=1.0.0 # BSD
setuptools!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.0,!=34.3.0,!=34.3.1,!=34.3.2,>=16.0 # PSF/ZPL
six>=1.9.0 # MIT
stevedore>=1.20.0 # Apache-2.0
WSME>=0.8 # MIT

View File

@ -3,7 +3,7 @@ name = qinling
summary = Function as a Service
description-file =
README.rst
author = OpenStack
author = OpenStack Qinling Team
author-email = openstack-dev@lists.openstack.org
home-page = http://www.openstack.org/
classifier =
@ -16,13 +16,19 @@ classifier =
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
[files]
packages =
qinling
[entry_points]
console_scripts =
qinling-server = qinling.cmd.launch:main
oslo.config.opts =
mistral.config = mistral.config:list_opts
[build_sphinx]
all-files = 1
warning-is-error = 1
@ -31,17 +37,3 @@ build-dir = doc/build
[upload_sphinx]
upload-dir = doc/build/html
[compile_catalog]
directory = qinling/locale
domain = qinling
[update_catalog]
domain = qinling
output_dir = qinling/locale
input_file = qinling/locale/qinling.pot
[extract_messages]
keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg
output_file = qinling/locale/qinling.pot

View File

@ -0,0 +1,6 @@
[DEFAULT]
namespace = qinling.config
namespace = oslo.messaging
namespace = keystonemiddleware.auth_token
namespace = oslo.log
namespace = oslo.policy

22
tox.ini
View File

@ -1,6 +1,6 @@
[tox]
minversion = 2.0
envlist = py34,py27,pypy,pep8
envlist = py35,py27,pep8
skipsdist = True
[testenv]
@ -10,11 +10,21 @@ setenv =
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
deps = -r{toxinidir}/test-requirements.txt
commands = python setup.py test --slowest --testr-args='{posargs}'
commands =
find . -type f -name "*.pyc" -delete
python setup.py test --slowest --testr-args='{posargs}'
whitelist_externals =
rm
find
[testenv:pep8]
commands = flake8 {posargs}
[testenv:genconfig]
commands =
oslo-config-generator --config-file tools/config/config-generator.qinling.conf \
--output-file etc/qinling.conf.sample
[testenv:venv]
commands = {posargs}
@ -32,9 +42,7 @@ commands =
commands = oslo_debug_helper {posargs}
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125
ignore =
show-source = true
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,build