Run pep8 on some tools python files

Running pep8 on some of the python files in tools/ would
be useful/helpful during development.

Change-Id: I10e7cf7ca448e7498482bae90aa2255507413fce
This commit is contained in:
Dan Prince 2015-12-01 15:11:42 -05:00
parent e398f9c5ff
commit 97aaaa5c42
3 changed files with 11 additions and 7 deletions

View File

@ -24,14 +24,14 @@ from cinderclient.v2 import client as cinderclient
from glanceclient.v2 import client as glanceclient
from heatclient.openstack.common.apiclient import base as heat_base
from heatclient.v1 import client as heatclient
from ironicclient.common import base as ironic_base
from ironicclient.v1 import client as ironicclient
from keystoneclient import base as keystone_base
from keystoneclient.v3 import client as keystoneclient
from novaclient import client as novaclient
from novaclient.openstack.common.apiclient import base as nova_base
from troveclient import base as trove_base
from troveclient.v1 import client as troveclient
from ironicclient.common import base as ironic_base
from ironicclient.v1 import client as ironicclient
# TODO(nmakhotkin): Find a rational way to do it for neutron.
# TODO(nmakhotkin): Implement recursive way of searching for managers
@ -66,6 +66,7 @@ BASE_CINDER_MANAGER = cinder_base.HookableMixin
BASE_TROVE_MANAGER = trove_base.Manager
BASE_IRONIC_MANAGER = ironic_base.Manager
def get_parser():
parser = argparse.ArgumentParser(
description='Gets All needed methods of OpenStack clients.',
@ -138,12 +139,15 @@ def get_ceilometer_client(**kwargs):
def get_cinder_client(**kwargs):
return cinderclient.Client()
def get_trove_client(**kwargs):
return troveclient.Client('username', 'password')
def get_ironic_client(**kwargs):
return ironicclient.Client("http://127.0.0.1:6385/")
CLIENTS = {
'nova': get_nova_client,
'heat': get_heat_client,

View File

@ -15,8 +15,8 @@
from oslo_config import cfg
from oslo_log import log as logging
from mistral.db.v2 import api as db_api
from mistral import config
from mistral.db.v2 import api as db_api
from mistral.services import action_manager
from mistral.services import workflows
@ -29,7 +29,7 @@ def main():
config.parse_args()
if len(CONF.config_file) == 0:
print "Usage: sync_db --config-file <path-to-config-file>"
print("Usage: sync_db --config-file <path-to-config-file>")
return exit(1)
logging.setup(CONF, 'Mistral')

View File

@ -20,7 +20,7 @@ passenv = ZUUL_PROJECT
commands = ./run_tests.sh -V --db-type postgresql
[testenv:pep8]
commands = flake8 {posargs}
commands = flake8 {posargs} . {toxinidir}/tools/get_action_list.py {toxinidir}/tools/sync_db.py
[testenv:cover]
# Also do not run test_coverage_ext tests while gathering coverage as those