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:
parent
e398f9c5ff
commit
97aaaa5c42
@ -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,
|
||||
@ -151,8 +155,8 @@ CLIENTS = {
|
||||
'cinder': get_cinder_client,
|
||||
'keystone': get_keystone_client,
|
||||
'glance': get_glance_client,
|
||||
'trove' : get_trove_client,
|
||||
'ironic' : get_ironic_client,
|
||||
'trove': get_trove_client,
|
||||
'ironic': get_ironic_client,
|
||||
# 'neutron': get_nova_client
|
||||
}
|
||||
BASE_MANAGERS = {
|
||||
|
@ -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')
|
||||
|
2
tox.ini
2
tox.ini
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user