Support hacking 2.0.0
Eventually hacking will move to 2.0.0 (diskimage-builder is holding it back), and when it does there will be a few errors to fix. We can get ahead of it so it doesn't break us with some small changes for these items: F601 dictionary key $item repeated with different values F632 use ==/!= to compare str, bytes, and int literals E501 line too long While doing this noticed the lower-constraints.txt for hacking was set at 0.12.0, when test-requirements.txt had it at 1.1.0, so fixed that as well. Change-Id: I80d2a5f97e7a4896a8fa765c1971c8bb7e72d211
This commit is contained in:
parent
af9edc30d7
commit
c6db3e4f17
@ -45,7 +45,7 @@ gitdb2==2.0.3
|
|||||||
GitPython==2.1.8
|
GitPython==2.1.8
|
||||||
greenlet==0.4.13
|
greenlet==0.4.13
|
||||||
gunicorn==19.9.0
|
gunicorn==19.9.0
|
||||||
hacking==0.12.0
|
hacking==1.1.0
|
||||||
idna==2.6
|
idna==2.6
|
||||||
imagesize==1.0.0
|
imagesize==1.0.0
|
||||||
ipaddress==1.0.17
|
ipaddress==1.0.17
|
||||||
|
@ -345,7 +345,8 @@ class PaginationHelper(object):
|
|||||||
default = PaginationHelper._get_default_column_value(
|
default = PaginationHelper._get_default_column_value(
|
||||||
model_attr.property.columns[0].type)
|
model_attr.property.columns[0].type)
|
||||||
attr = sa_sql.expression.case(
|
attr = sa_sql.expression.case(
|
||||||
[(model_attr != None, # noqa: E711 # pylint: disable=singleton-comparison
|
# pylint: disable=singleton-comparison
|
||||||
|
[(model_attr != None, # noqa E711
|
||||||
model_attr), ], else_=default)
|
model_attr), ], else_=default)
|
||||||
crit_attrs.append((attr == marker_values[j]))
|
crit_attrs.append((attr == marker_values[j]))
|
||||||
|
|
||||||
@ -353,7 +354,8 @@ class PaginationHelper(object):
|
|||||||
default = PaginationHelper._get_default_column_value(
|
default = PaginationHelper._get_default_column_value(
|
||||||
model_attr.property.columns[0].type)
|
model_attr.property.columns[0].type)
|
||||||
attr = sa_sql.expression.case(
|
attr = sa_sql.expression.case(
|
||||||
[(model_attr != None, # noqa: E711 # pylint: disable=singleton-comparison
|
# pylint: disable=singleton-comparison
|
||||||
|
[(model_attr != None, # noqa E711
|
||||||
model_attr), ], else_=default)
|
model_attr), ], else_=default)
|
||||||
this_sort_dir = self.sort_keys[i][1]
|
this_sort_dir = self.sort_keys[i][1]
|
||||||
if this_sort_dir == constants.DESC:
|
if this_sort_dir == constants.DESC:
|
||||||
|
@ -53,6 +53,7 @@ def retryMaskFilter(record):
|
|||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
LOG.logger.addFilter(retryMaskFilter)
|
LOG.logger.addFilter(retryMaskFilter)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1552,8 +1552,8 @@ class TestLoadBalancer(base.BaseAPITest):
|
|||||||
|
|
||||||
lbs = self.get(
|
lbs = self.get(
|
||||||
self.LBS_PATH,
|
self.LBS_PATH,
|
||||||
params={'name': 'lb1', 'tags': 'test_tag2',
|
params={'name': 'lb1', 'tags': 'test_tag1',
|
||||||
'vip_address': '10.0.0.1', 'tags': 'test_tag1'}
|
'vip_address': '10.0.0.1'}
|
||||||
).json.get(self.root_tag_list)
|
).json.get(self.root_tag_list)
|
||||||
self.assertIsInstance(lbs, list)
|
self.assertIsInstance(lbs, list)
|
||||||
self.assertEqual(1, len(lbs))
|
self.assertEqual(1, len(lbs))
|
||||||
@ -1561,8 +1561,8 @@ class TestLoadBalancer(base.BaseAPITest):
|
|||||||
|
|
||||||
lbs = self.get(
|
lbs = self.get(
|
||||||
self.LBS_PATH,
|
self.LBS_PATH,
|
||||||
params={'name': 'lb1', 'tags': 'test_tag2',
|
params={'name': 'lb1', 'tags': 'test_tag3',
|
||||||
'vip_address': '10.0.0.1', 'tags': 'test_tag3'}
|
'vip_address': '10.0.0.1'}
|
||||||
).json.get(self.root_tag_list)
|
).json.get(self.root_tag_list)
|
||||||
self.assertIsInstance(lbs, list)
|
self.assertIsInstance(lbs, list)
|
||||||
self.assertEqual(0, len(lbs))
|
self.assertEqual(0, len(lbs))
|
||||||
|
@ -33,11 +33,15 @@ LISTENER_ID1 = uuidutils.generate_uuid()
|
|||||||
LISTENER_ID2 = uuidutils.generate_uuid()
|
LISTENER_ID2 = uuidutils.generate_uuid()
|
||||||
LISTENER_IDS = [LISTENER_ID1, LISTENER_ID2]
|
LISTENER_IDS = [LISTENER_ID1, LISTENER_ID2]
|
||||||
BASE_PATH = '/tmp/test'
|
BASE_PATH = '/tmp/test'
|
||||||
SAMPLE_POOL_STATUS = {'432fc8b3-d446-48d4-bb64-13beb90e22bc': {
|
SAMPLE_POOL_STATUS = {
|
||||||
|
'432fc8b3-d446-48d4-bb64-13beb90e22bc': {
|
||||||
'status': 'UP',
|
'status': 'UP',
|
||||||
'uuid': '432fc8b3-d446-48d4-bb64-13beb90e22bc',
|
'uuid': '432fc8b3-d446-48d4-bb64-13beb90e22bc',
|
||||||
'members': {
|
'members': {'302e33d9-dee1-4de9-98d5-36329a06fb58': 'DOWN'}},
|
||||||
'302e33d9-dee1-4de9-98d5-36329a06fb58': 'DOWN'}}}
|
'3661ed10-99db-4d2c-bffb-99b60eb876ff': {
|
||||||
|
'status': 'UP',
|
||||||
|
'uuid': '3661ed10-99db-4d2c-bffb-99b60eb876ff',
|
||||||
|
'members': {'e657f950-a6a2-4d28-bffa-0c8a8c05f815': 'DOWN'}}}
|
||||||
|
|
||||||
SAMPLE_BOGUS_POOL_STATUS = {LISTENER_ID1: {
|
SAMPLE_BOGUS_POOL_STATUS = {LISTENER_ID1: {
|
||||||
'status': 'UP',
|
'status': 'UP',
|
||||||
@ -112,11 +116,13 @@ SAMPLE_STATS_MSG = {
|
|||||||
'tx': 0, 'rx': 0, 'ereq': 0},
|
'tx': 0, 'rx': 0, 'ereq': 0},
|
||||||
'status': 'OPEN'},
|
'status': 'OPEN'},
|
||||||
},
|
},
|
||||||
'pools': {'432fc8b3-d446-48d4-bb64-13beb90e22bc': {
|
'pools': {
|
||||||
'members': {'302e33d9-dee1-4de9-98d5-36329a06fb58': 'DOWN'},
|
'432fc8b3-d446-48d4-bb64-13beb90e22bc': {
|
||||||
'status': 'UP'}, '432fc8b3-d446-48d4-bb64-13beb90e22bc': {
|
|
||||||
'members': {'302e33d9-dee1-4de9-98d5-36329a06fb58': 'DOWN'},
|
'members': {'302e33d9-dee1-4de9-98d5-36329a06fb58': 'DOWN'},
|
||||||
'status': 'UP'},
|
'status': 'UP'},
|
||||||
|
'3661ed10-99db-4d2c-bffb-99b60eb876ff': {
|
||||||
|
'members': {'e657f950-a6a2-4d28-bffa-0c8a8c05f815': 'DOWN'},
|
||||||
|
'status': 'UP'},
|
||||||
},
|
},
|
||||||
'id': None,
|
'id': None,
|
||||||
'seq': 0,
|
'seq': 0,
|
||||||
|
@ -602,9 +602,9 @@ def sample_listener_tuple(proto=None, monitor=True, alloc_default_pool=True,
|
|||||||
provisioning_status=constants.ACTIVE):
|
provisioning_status=constants.ACTIVE):
|
||||||
proto = 'HTTP' if proto is None else proto
|
proto = 'HTTP' if proto is None else proto
|
||||||
if be_proto is None:
|
if be_proto is None:
|
||||||
be_proto = 'HTTP' if proto is 'TERMINATED_HTTPS' else proto
|
be_proto = 'HTTP' if proto == 'TERMINATED_HTTPS' else proto
|
||||||
topology = 'SINGLE' if topology is None else topology
|
topology = 'SINGLE' if topology is None else topology
|
||||||
port = '443' if proto is 'HTTPS' or proto is 'TERMINATED_HTTPS' else '80'
|
port = '443' if proto in ['HTTPS', 'TERMINATED_HTTPS'] else '80'
|
||||||
peer_port = 1024 if peer_port is None else peer_port
|
peer_port = 1024 if peer_port is None else peer_port
|
||||||
insert_headers = insert_headers or {}
|
insert_headers = insert_headers or {}
|
||||||
in_listener = collections.namedtuple(
|
in_listener = collections.namedtuple(
|
||||||
@ -860,7 +860,7 @@ def sample_session_persistence_tuple(persistence_type=None,
|
|||||||
def sample_health_monitor_tuple(proto='HTTP', sample_hm=1,
|
def sample_health_monitor_tuple(proto='HTTP', sample_hm=1,
|
||||||
host_http_check=False,
|
host_http_check=False,
|
||||||
provisioning_status=constants.ACTIVE):
|
provisioning_status=constants.ACTIVE):
|
||||||
proto = 'HTTP' if proto is 'TERMINATED_HTTPS' else proto
|
proto = 'HTTP' if proto == 'TERMINATED_HTTPS' else proto
|
||||||
monitor = collections.namedtuple(
|
monitor = collections.namedtuple(
|
||||||
'monitor', 'id, type, delay, timeout, fall_threshold, rise_threshold,'
|
'monitor', 'id, type, delay, timeout, fall_threshold, rise_threshold,'
|
||||||
'http_method, url_path, expected_codes, enabled, '
|
'http_method, url_path, expected_codes, enabled, '
|
||||||
|
@ -625,9 +625,9 @@ def sample_listener_tuple(proto=None, monitor=True, alloc_default_pool=True,
|
|||||||
provisioning_status=constants.ACTIVE):
|
provisioning_status=constants.ACTIVE):
|
||||||
proto = 'HTTP' if proto is None else proto
|
proto = 'HTTP' if proto is None else proto
|
||||||
if be_proto is None:
|
if be_proto is None:
|
||||||
be_proto = 'HTTP' if proto is 'TERMINATED_HTTPS' else proto
|
be_proto = 'HTTP' if proto == 'TERMINATED_HTTPS' else proto
|
||||||
topology = 'SINGLE' if topology is None else topology
|
topology = 'SINGLE' if topology is None else topology
|
||||||
port = '443' if proto is 'HTTPS' or proto is 'TERMINATED_HTTPS' else '80'
|
port = '443' if proto in ['HTTPS', 'TERMINATED_HTTPS'] else '80'
|
||||||
peer_port = 1024 if peer_port is None else peer_port
|
peer_port = 1024 if peer_port is None else peer_port
|
||||||
insert_headers = insert_headers or {}
|
insert_headers = insert_headers or {}
|
||||||
in_listener = collections.namedtuple(
|
in_listener = collections.namedtuple(
|
||||||
@ -879,7 +879,7 @@ def sample_session_persistence_tuple(persistence_type=None,
|
|||||||
def sample_health_monitor_tuple(proto='HTTP', sample_hm=1,
|
def sample_health_monitor_tuple(proto='HTTP', sample_hm=1,
|
||||||
host_http_check=False,
|
host_http_check=False,
|
||||||
provisioning_status=constants.ACTIVE):
|
provisioning_status=constants.ACTIVE):
|
||||||
proto = 'HTTP' if proto is 'TERMINATED_HTTPS' else proto
|
proto = 'HTTP' if proto == 'TERMINATED_HTTPS' else proto
|
||||||
monitor = collections.namedtuple(
|
monitor = collections.namedtuple(
|
||||||
'monitor', 'id, type, delay, timeout, fall_threshold, rise_threshold,'
|
'monitor', 'id, type, delay, timeout, fall_threshold, rise_threshold,'
|
||||||
'http_method, url_path, expected_codes, enabled, '
|
'http_method, url_path, expected_codes, enabled, '
|
||||||
|
@ -460,7 +460,7 @@ class TestUpdateHealthDb(base.TestCase):
|
|||||||
"pool-id-1:listener-id-1": {
|
"pool-id-1:listener-id-1": {
|
||||||
"status": constants.UP,
|
"status": constants.UP,
|
||||||
"members": {"member-id-1": constants.UP}},
|
"members": {"member-id-1": constants.UP}},
|
||||||
"pool-id-1:listener-id-1": {
|
"pool-id-1:listener-id-2": {
|
||||||
"status": constants.UP,
|
"status": constants.UP,
|
||||||
"members": {"member-id-1": constants.UP}}},
|
"members": {"member-id-1": constants.UP}}},
|
||||||
"recv_time": time.time()
|
"recv_time": time.time()
|
||||||
|
@ -9,7 +9,7 @@ flake8-import-order==0.12 # LGPLv3
|
|||||||
mock>=2.0.0 # BSD
|
mock>=2.0.0 # BSD
|
||||||
python-subunit>=1.0.0 # Apache-2.0/BSD
|
python-subunit>=1.0.0 # Apache-2.0/BSD
|
||||||
oslotest>=3.2.0 # Apache-2.0
|
oslotest>=3.2.0 # Apache-2.0
|
||||||
pylint>=1.9.2 # GPLv2
|
pylint>=2.2.0 # GPLv2
|
||||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
testrepository>=0.0.18 # Apache-2.0/BSD
|
||||||
testtools>=2.2.0 # MIT
|
testtools>=2.2.0 # MIT
|
||||||
testresources>=2.0.0 # Apache-2.0/BSD
|
testresources>=2.0.0 # Apache-2.0/BSD
|
||||||
|
Loading…
x
Reference in New Issue
Block a user