Fix pep8 errors and remove unnecessary tests.

Also remove .idea directory.

Change-Id: I40ae15dd264722dd810b7a3d1db5b555e5b0c3f0
This commit is contained in:
Timur Sufiev 2013-10-29 15:43:13 +04:00 committed by TimurNurlygayanov
parent d65dfd2828
commit d1f9a8e3e3
7 changed files with 25 additions and 69 deletions

4
.gitreview Normal file
View File

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

View File

@ -1,7 +0,0 @@
<component name="ProjectDictionaryState">
<dictionary name="fervent">
<words>
<w>metadataclient</w>
</words>
</dictionary>
</component>

View File

@ -132,8 +132,8 @@ class MuranoRepositoryShell(object):
parser.add_argument('--murano_metadata-api-version',
default=utils.env(
'MURANO_METADATA_API_VERSION', default='1'),
help='Defaults to env[MURANO_METADATA_API_VERSION] '
'or 1')
help='Defaults to env[MURANO_METADATA_API_VERSION]'
' or 1')
return parser
def get_subcommand_parser(self, version):
@ -319,4 +319,4 @@ def main():
if __name__ == "__main__":
main()
main()

View File

@ -92,4 +92,4 @@ class Controller(object):
def delete_dir(self, data_type, path):
url = '/v1/admin/{0}/{1}'.format(data_type, path)
self.http_client.json_request('DELETE', url)
self.http_client.json_request('DELETE', url)

View File

@ -1,15 +1,14 @@
distribute>=0.6.24
mock
anyjson
mox
mock>=1.0
anyjson>=0.3.3
mox>=0.5.3
nose
nose-exclude
nosexcover
openstack.nose_plugin
nosehtmloutput
openstack.nose_plugin>=0.7
nosehtmloutput>=0.0.3
pep8==1.3.3
setuptools-git>=0.4
sphinx>=1.1.2
unittest2
httpretty
httpretty>=0.6.3

34
test.py
View File

@ -1,34 +0,0 @@
from metadataclient.v1.client import Client
def metadataclient():
endpoint = 'http://localhost:5000'
insecure = False
token_id = '12casc2'
return Client(endpoint=endpoint, token=token_id, insecure=insecure)
def main():
# metadataclient().metadata_client.get_ui_data()
metadataclient().metadata_client.get_conductor_data()
admin = metadataclient().metadata_admin
# print admin.list_ui()
# print admin.list_ui('Murano')
# print admin.list_agent()
# workflows = admin.list_workflows()
# for key, value in workflows.iteritems():
# for i in value:
# print i
# heat = metadataclient().metadata_admin.list_heat()
# for key, value in heat.iteritems():
# for i in value:
# print i
# admin.get_file('ui', 'WebServer.yaml')
# print admin.get_file('ui', 'Murano/Demo.yaml')
# admin.create_directory('ui', 'test')
# admin.delete_dir('ui', 'Murano/README.rst')
if __name__ == "__main__":
main()

26
tox.ini
View File

@ -1,5 +1,5 @@
[tox]
envlist = py27,pep8,pep8,pyflakes
envlist = pep8,pyflakes
[testenv]
setenv = VIRTUAL_ENV={envdir}
@ -10,7 +10,7 @@ setenv = VIRTUAL_ENV={envdir}
NOSE_OPENSTACK_SHOW_ELAPSED=1
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = nosetests
#commands = nosetests
[testenv:pep8]
deps = pep8==1.3.3
@ -20,34 +20,28 @@ commands = pep8 --repeat --show-source metadataclient setup.py
commands = {posargs}
[testenv:cover]
commands = nosetests --cover-erase --cover-package=metadataclient --with-xcoverage
#commands = nosetests --cover-erase --cover-package=metadataclient --with-xcoverage
[tox:jenkins]
downloadcache = ~/cache/pip
[testenv:jenkins26]
basepython = python2.6
setenv = NOSE_WITH_XUNIT=1
deps = file://{toxinidir}/.cache.bundle
[testenv:jenkins27]
basepython = python2.7
setenv = NOSE_WITH_XUNIT=1
deps = file://{toxinidir}/.cache.bundle
[testenv:jenkinscover]
deps = file://{toxinidir}/.cache.bundle
setenv = NOSE_WITH_XUNIT=1
commands = nosetests --cover-erase --cover-package=metadataclient --with-xcoverage
[testenv:py33]
basepython = python2.7
deps=
commands=
[testenv:jenkinsvenv]
deps = file://{toxinidir}/.cache.bundle
setenv = NOSE_WITH_XUNIT=1
commands = {posargs}
[testenv:docs]
commands = ls
[testenv:pyflakes]
deps = flake8
commands = flake8
#commands = flake8
[flake8]
# H301 one import per line