Use same flake8 extensions as Octavia
Enabled the same flake8 extensions as the Octavia tree, fixing the bugs that they now caught. Trivialfix Change-Id: I0fc3f5e3a48dc9dc0286cf9b11847a77573ac411
This commit is contained in:
parent
e9aa05ef60
commit
0ae7f108b9
|
@ -156,8 +156,9 @@ class AvailabilityZoneProfileClient(base_client.BaseLBaaSClient):
|
|||
return_object_only=return_object_only)
|
||||
|
||||
def update_availability_zone_profile(
|
||||
self, availability_zone_profile_id, name=Unset, provider_name=Unset,
|
||||
availability_zone_data=Unset, return_object_only=True):
|
||||
self, availability_zone_profile_id, name=Unset,
|
||||
provider_name=Unset, availability_zone_data=Unset,
|
||||
return_object_only=True):
|
||||
"""Update an availability zone profile.
|
||||
|
||||
:param availability_zone_profile_id: The availability zone profile ID
|
||||
|
|
|
@ -145,8 +145,8 @@ class FlavorProfileClient(base_client.BaseLBaaSClient):
|
|||
return_object_only=return_object_only)
|
||||
|
||||
def update_flavor_profile(
|
||||
self, flavorprofile_id, name=Unset, provider_name=Unset,
|
||||
flavor_data=Unset, return_object_only=True):
|
||||
self, flavorprofile_id, name=Unset, provider_name=Unset,
|
||||
flavor_data=Unset, return_object_only=True):
|
||||
"""Update a flavor profile.
|
||||
|
||||
:param flavorprofile_id: The flavor profile ID to update.
|
||||
|
|
|
@ -34,7 +34,7 @@ LOG = logging.getLogger(__name__)
|
|||
CONF.validation.run_validation,
|
||||
'Active-Standby tests will not work without run_validation enabled.')
|
||||
class ActiveStandbyIptablesScenarioTest(
|
||||
test_base.LoadBalancerBaseTestWithCompute):
|
||||
test_base.LoadBalancerBaseTestWithCompute):
|
||||
|
||||
@classmethod
|
||||
def skip_checks(cls):
|
||||
|
|
|
@ -109,13 +109,13 @@ class TLSWithBarbicanTest(test_base.LoadBalancerBaseTestWithCompute):
|
|||
# Create a CA self-signed cert and key
|
||||
cls.ca_cert, ca_key = cert_utils.generate_ca_cert_and_key()
|
||||
|
||||
LOG.debug('CA Cert: %s' % cls.ca_cert.public_bytes(
|
||||
LOG.debug('CA Cert: %s', cls.ca_cert.public_bytes(
|
||||
serialization.Encoding.PEM))
|
||||
LOG.debug('CA private Key: %s' % ca_key.private_bytes(
|
||||
LOG.debug('CA private Key: %s', ca_key.private_bytes(
|
||||
encoding=serialization.Encoding.PEM,
|
||||
format=serialization.PrivateFormat.TraditionalOpenSSL,
|
||||
encryption_algorithm=serialization.NoEncryption()))
|
||||
LOG.debug('CA public Key: %s' % ca_key.public_key().public_bytes(
|
||||
LOG.debug('CA public Key: %s', ca_key.public_key().public_bytes(
|
||||
encoding=serialization.Encoding.PEM,
|
||||
format=serialization.PublicFormat.SubjectPublicKeyInfo))
|
||||
|
||||
|
@ -127,7 +127,7 @@ class TLSWithBarbicanTest(test_base.LoadBalancerBaseTestWithCompute):
|
|||
# Create a server cert and key
|
||||
# This will be used as the "default certificate" in SNI tests.
|
||||
cls.server_uuid = uuidutils.generate_uuid()
|
||||
LOG.debug('Server (default) UUID: %s' % cls.server_uuid)
|
||||
LOG.debug('Server (default) UUID: %s', cls.server_uuid)
|
||||
|
||||
server_cert, server_key, cls.server_secret_ref = (
|
||||
cls._generate_load_certificate(cls.barbican_mgr, cls.ca_cert,
|
||||
|
@ -135,7 +135,7 @@ class TLSWithBarbicanTest(test_base.LoadBalancerBaseTestWithCompute):
|
|||
|
||||
# Create the SNI1 cert and key
|
||||
cls.SNI1_uuid = uuidutils.generate_uuid()
|
||||
LOG.debug('SNI1 UUID: %s' % cls.SNI1_uuid)
|
||||
LOG.debug('SNI1 UUID: %s', cls.SNI1_uuid)
|
||||
|
||||
SNI1_cert, SNI1_key, cls.SNI1_secret_ref = (
|
||||
cls._generate_load_certificate(cls.barbican_mgr, cls.ca_cert,
|
||||
|
@ -143,7 +143,7 @@ class TLSWithBarbicanTest(test_base.LoadBalancerBaseTestWithCompute):
|
|||
|
||||
# Create the SNI2 cert and key
|
||||
cls.SNI2_uuid = uuidutils.generate_uuid()
|
||||
LOG.debug('SNI2 UUID: %s' % cls.SNI2_uuid)
|
||||
LOG.debug('SNI2 UUID: %s', cls.SNI2_uuid)
|
||||
|
||||
SNI2_cert, SNI2_key, cls.SNI2_secret_ref = (
|
||||
cls._generate_load_certificate(cls.barbican_mgr, cls.ca_cert,
|
||||
|
|
|
@ -24,7 +24,7 @@ CONF = config.CONF
|
|||
|
||||
|
||||
class IPv6TrafficOperationsScenarioTest(
|
||||
test_base.LoadBalancerBaseTestWithCompute):
|
||||
test_base.LoadBalancerBaseTestWithCompute):
|
||||
"""Test traffic operations with an IPv6 VIP."""
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -171,7 +171,7 @@ class PoolScenarioTest(test_base.LoadBalancerBaseTest):
|
|||
const.LB_ALGORITHM_LEAST_CONNECTIONS
|
||||
|
||||
if self.protocol == const.HTTP and (
|
||||
self.lb_feature_enabled.session_persistence_enabled):
|
||||
self.lb_feature_enabled.session_persistence_enabled):
|
||||
pool_update_kwargs[const.SESSION_PERSISTENCE] = {
|
||||
const.TYPE: const.SESSION_PERSISTENCE_HTTP_COOKIE}
|
||||
pool = self.mem_pool_client.update_pool(
|
||||
|
|
12
tox.ini
12
tox.ini
|
@ -17,7 +17,7 @@ commands =
|
|||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
commands = flake8 {posargs}
|
||||
commands = flake8
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
|
@ -74,12 +74,16 @@ basepython = python3
|
|||
commands = oslo_debug_helper {posargs}
|
||||
|
||||
[flake8]
|
||||
# E123, E125 skipped as they are invalid PEP-8.
|
||||
|
||||
show-source = True
|
||||
ignore = E123,E125
|
||||
builtins = _
|
||||
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
||||
import-order-style = pep8
|
||||
# [H106]: Don't put vim configuration in source files
|
||||
# [H203]: Use assertIs(Not)None to check for None
|
||||
# [H204]: Use assert(Not)Equal to check for equality
|
||||
# [H205]: Use assert(Greater|Less)(Equal) for comparison
|
||||
# [H904]: Delay string interpolations at logging calls
|
||||
enable-extensions=H106,H203,H204,H205,H904
|
||||
|
||||
[testenv:genconfig]
|
||||
basepython = python3
|
||||
|
|
Loading…
Reference in New Issue