Merge "Fix the missing of configuration file"
authorkong wei <kong.wei2@zte.com.cn>
Sun, 19 Feb 2017 14:58:16 +0000 (14:58 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Sun, 19 Feb 2017 14:58:16 +0000 (14:58 +0000)
.gitignore
INFO
api/.testr.conf [new file with mode: 0644]
api/test-requirements.txt [new file with mode: 0644]
api/tox.ini
client/.testr.conf [new file with mode: 0644]
client/escalatorclient/v1/shell.py
client/escalatorclient/v1/versions.py
client/test-requirements.txt
client/tox.ini

index 2884629..33a0451 100644 (file)
@@ -1,5 +1,5 @@
 *~
 .*.sw?
-/build/
-/output/
+/docs_build/
+/docs_output/
 /releng/
diff --git a/INFO b/INFO
index dcc178d..8d0f92e 100644 (file)
--- a/INFO
+++ b/INFO
@@ -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 (file)
index 0000000..804da37
--- /dev/null
@@ -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 (file)
index 0000000..788516f
--- /dev/null
@@ -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
index 5b5d52f..f5c9d10 100644 (file)
@@ -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 (file)
index 0000000..804da37
--- /dev/null
@@ -0,0 +1,3 @@
+[DEFAULT]
+test_command=${PYTHON:-python} -m unittest discover $LISTOPT
+test_list_option=
index f926a8a..fbc2459 100644 (file)
@@ -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]
index f54ea23..f98a3ed 100644 (file)
@@ -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
index 06cb4aa..975488b 100644 (file)
@@ -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
index eca4fd9..6a6ea7d 100644 (file)
@@ -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