Merge "Reuse neutron-lib for pep8 hacking checks"

This commit is contained in:
Jenkins 2017-08-14 14:50:11 +00:00 committed by Gerrit Code Review
commit 5531b53b8b
3 changed files with 8 additions and 5 deletions

View File

@ -99,7 +99,7 @@ class CinderConnector(fuxi_connector.Connector):
brick_connector = brick_get_connector(protocol)
device_info = brick_connector.connect_volume(conn_info['data'])
LOG.info("Get device_info after connect to "
"volume %s" % device_info)
"volume %s", device_info)
try:
link_path = os.path.join(consts.VOLUME_LINK_DIR, volume.id)
utils.execute('ln', '-s', os.path.realpath(device_info['path']),

View File

@ -40,7 +40,8 @@ def init_app_conf():
# Init volume providers.
volume_providers = CONF.volume_providers
if not volume_providers:
raise Exception("Must define volume providers in configuration file")
raise Exception(_("Must define volume providers in "
"configuration file"))
app.volume_providers = collections.OrderedDict()
for provider in volume_providers:
@ -51,7 +52,8 @@ def init_app_conf():
else:
LOG.warning("Could not find volume provider: %s", provider)
if not app.volume_providers:
raise Exception("Not provide at least one effective volume provider")
raise Exception(_("Not provide at least one effective "
"volume provider"))
# Init volume store directory.
try:

View File

@ -41,12 +41,13 @@ setenv = OS_TEST_PATH=./fuxi/tests/fullstack
[flake8]
show-source = True
enable-extensions = H106,H203
enable-extensions = H106,H203,H904
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,releasenotes
[hacking]
import_exceptions = fuxi.i18n, fuxi.tests
import_exceptions = fuxi.tests
local-check-factory = neutron_lib.hacking.checks.factory
[testenv:genconfig]
commands = oslo-config-generator --config-file=etc/oslo-config-generator/fuxi-config-generator.conf