diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | INFO | 13 | ||||
-rw-r--r-- | api/.testr.conf | 3 | ||||
-rw-r--r-- | api/test-requirements.txt | 29 | ||||
-rw-r--r-- | api/tox.ini | 8 | ||||
-rw-r--r-- | client/.testr.conf | 3 | ||||
-rw-r--r-- | client/escalatorclient/v1/shell.py | 2 | ||||
-rw-r--r-- | client/escalatorclient/v1/versions.py | 9 | ||||
-rw-r--r-- | client/test-requirements.txt | 24 | ||||
-rw-r--r-- | client/tox.ini | 4 |
10 files changed, 70 insertions, 29 deletions
@@ -1,5 +1,5 @@ *~ .*.sw? -/build/ -/output/ +/docs_build/ +/docs_output/ /releng/ @@ -11,7 +11,6 @@ Mailing list tag: [escalator] Meetings: Every Thursday 1200-1300 UTC IRC : #opnfv-meeting @ Freenode.net - Committers: hu.jie@zte.com.cn fuqiao@chinamobile.com @@ -19,18 +18,6 @@ ulrich.kleber@huawei.com maria.toeroe@ericsson.com kong.wei2@zte.com.cn -Contributors: -sama@docomolab-euro.com -chao.zhong@zte.com.cn -zhang.jun3g@zte.com.cn -yuan.yue@zte.com.cn -huangzhipeng@huawei.com -meng.jia@zte.com.cn -liyi.meng@ericsson.com -pasi.vaananen@stratus.com -wang.guobing1@zte.com.cn -jianfei.zhang@nokia.com - Link to TSC approval of the project: http://meetbot.opnfv.org/meetings/opnfv-meeting/2015/opnfv-meeting.2015-04-21-14.00.html Link(s) to approval of project lead and additional committers: diff --git a/api/.testr.conf b/api/.testr.conf new file mode 100644 index 0000000..804da37 --- /dev/null +++ b/api/.testr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_command=${PYTHON:-python} -m unittest discover $LISTOPT +test_list_option= diff --git a/api/test-requirements.txt b/api/test-requirements.txt new file mode 100644 index 0000000..788516f --- /dev/null +++ b/api/test-requirements.txt @@ -0,0 +1,29 @@ +Babel>=1.3 + +bandit>=0.17.3 +coverage>=3.6 +discover +fixtures>=0.3.14 +mox3>=0.7.0 +mock>=1.0 +sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 +requests>=2.2.0,!=2.4.0 +testrepository>=0.0.18 +testscenarios>=0.4 # Apache-2.0/BSD +testtools>=0.9.36,!=1.2.0 +psutil>=1.1.1,<2.0.0 +oslotest>=1.5.1,<1.6.0 # Apache-2.0 +# Optional packages that should be installed when testing +PyMySQL!=0.7.7,>=0.6.2 # MIT License +pysendfile==2.0.0 +qpid-python;python_version=='2.7' # Apache-2.0 + +# Documentation +oslosphinx>=2.5.0,<2.6.0 # Apache-2.0 + +#flake8 +pyflakes!=1.2.0,!=1.2.1,!=1.2.2,<1.4.0,>=0.8.1 +configparser +mccabe<0.6.0,>=0.5.0 +pycodestyle<2.3.0,>=2.0.0 +flake8 diff --git a/api/tox.ini b/api/tox.ini index 5b5d52f..f5c9d10 100644 --- a/api/tox.ini +++ b/api/tox.ini @@ -9,7 +9,7 @@ usedevelop = True install_command = pip install -U {opts} {packages} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = lockutils-wrapper python setup.py testr --slowest --testr-args='{posargs}' +commands = python setup.py testr --slowest --testr-args='{posargs}' whitelist_externals = bash [tox:jenkins] @@ -18,8 +18,6 @@ downloadcache = ~/cache/pip [testenv:pep8] commands = flake8 {posargs} - # Check that .po and .pot files are valid: - bash -c "find escalator -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null" [testenv:cover] setenv = VIRTUAL_ENV={envdir} @@ -39,12 +37,10 @@ commands = python setup.py build_sphinx # TODO(dmllr): Analyze or fix the warnings blacklisted below # E711 comparison to None should be 'if cond is not None:' # E712 comparison to True should be 'if cond is True:' or 'if cond:' -# H302 import only modules -# H402 one line docstring needs punctuation. # H404 multi line docstring should start with a summary # H405 multi line docstring summary not separated with an empty line # H904 Wrap long lines in parentheses instead of a backslash -ignore = E711,E712,H302,H402,H404,H405,H904,F841,F821,E265,F812,F402,E226,E731 +ignore = E711,E712,H404,H405,H904,F841,F821,E265,F812,F402,E226,E731 exclude = .venv,.git,.tox,dist,doc,etc,*escalator/locale*,*openstack/common*,*lib/python*,*egg,build,escalator/i18n.py [hacking] diff --git a/client/.testr.conf b/client/.testr.conf new file mode 100644 index 0000000..804da37 --- /dev/null +++ b/client/.testr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_command=${PYTHON:-python} -m unittest discover $LISTOPT +test_list_option= diff --git a/client/escalatorclient/v1/shell.py b/client/escalatorclient/v1/shell.py index f926a8a..fbc2459 100644 --- a/client/escalatorclient/v1/shell.py +++ b/client/escalatorclient/v1/shell.py @@ -149,7 +149,7 @@ def do_version_delete(dc, args): @utils.arg('--sort-dir', default='asc', choices=escalatorclient.v1.versions.SORT_DIR_VALUES, help='Sort version list in specified direction.') -def do_version_list(dc, args): +def do_cluster_version_list(dc, args): """List hosts you can access.""" filter_keys = ['name', 'type', 'status', 'version'] filter_items = [(key, getattr(args, key)) for key in filter_keys] diff --git a/client/escalatorclient/v1/versions.py b/client/escalatorclient/v1/versions.py index f54ea23..f98a3ed 100644 --- a/client/escalatorclient/v1/versions.py +++ b/client/escalatorclient/v1/versions.py @@ -22,6 +22,7 @@ import six.moves.urllib.parse as urlparse from escalatorclient.common import utils from escalatorclient.openstack.common.apiclient import base +from escalatorclient.common.http import HTTPClient CREATE_PARAMS = ('id', 'name', 'description', 'type', 'version', 'size', 'checksum', 'status', 'os_status', 'version_patch') @@ -53,8 +54,14 @@ class Version(base.Resource): class VersionManager(base.ManagerWithFind): resource_class = Version + def get_version_client(self): + endpoint = "http://127.0.0.1:19292" + client = HTTPClient(endpoint) + return client + def _list(self, url, response_key, obj_class=None, body=None): - resp, body = self.client.get(url) + version_client = self.get_version_client() + resp, body = version_client.get(url) if obj_class is None: obj_class = self.resource_class diff --git a/client/test-requirements.txt b/client/test-requirements.txt index 06cb4aa..975488b 100644 --- a/client/test-requirements.txt +++ b/client/test-requirements.txt @@ -1,13 +1,31 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. -hacking>=0.8.0,<0.9 +# process, which may cause wedges in the gate lbel>=1.3 +bandit>=0.17.3 coverage>=3.6 discover +fixtures>=0.3.14 mox3>=0.7.0 mock>=1.0 -oslosphinx>=2.2.0 # Apache-2.0 sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 +requests>=2.2.0,!=2.4.0 testrepository>=0.0.18 +testscenarios>=0.4 # Apache-2.0/BSD testtools>=0.9.36,!=1.2.0 +psutil>=1.1.1,<2.0.0 +oslotest>=1.5.1,<1.6.0 # Apache-2.0 +# Optional packages that should be installed when testing +PyMySQL!=0.7.7,>=0.6.2 # MIT License +pysendfile==2.0.0 +qpid-python;python_version=='2.7' # Apache-2.0 + +# Documentation +oslosphinx>=2.5.0,<2.6.0 # Apache-2.0ater. + +#flake8 +pyflakes!=1.2.0,!=1.2.1,!=1.2.2,<1.4.0,>=0.8.1 +configparser +mccabe<0.6.0,>=0.5.0 +pycodestyle<2.3.0,>=2.0.0 +flake8 diff --git a/client/tox.ini b/client/tox.ini index eca4fd9..6a6ea7d 100644 --- a/client/tox.ini +++ b/client/tox.ini @@ -33,9 +33,7 @@ downloadcache = ~/cache/pip [flake8] # H233 Python 3.x incompatible use of print operator -# H302 import only modules -# H303 no wildcard import # H404 multi line docstring should start with a summary -ignore = F403,F812,H233,H302,H303,H404,F401,E731 +ignore = F403,F812,H233,H404,F401,E731 show-source = True exclude = .venv,.tox,dist,doc,*egg,build |