Merge "Support hacking 2.0.0"
This commit is contained in:
commit
6a535c979b
@ -45,7 +45,7 @@ gitdb2==2.0.3
|
||||
GitPython==2.1.8
|
||||
greenlet==0.4.13
|
||||
gunicorn==19.9.0
|
||||
hacking==0.12.0
|
||||
hacking==1.1.0
|
||||
idna==2.6
|
||||
imagesize==1.0.0
|
||||
ipaddress==1.0.17
|
||||
|
@ -345,7 +345,8 @@ class PaginationHelper(object):
|
||||
default = PaginationHelper._get_default_column_value(
|
||||
model_attr.property.columns[0].type)
|
||||
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)
|
||||
crit_attrs.append((attr == marker_values[j]))
|
||||
|
||||
@ -353,7 +354,8 @@ class PaginationHelper(object):
|
||||
default = PaginationHelper._get_default_column_value(
|
||||
model_attr.property.columns[0].type)
|
||||
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)
|
||||
this_sort_dir = self.sort_keys[i][1]
|
||||
if this_sort_dir == constants.DESC:
|
||||
|
@ -53,6 +53,7 @@ def retryMaskFilter(record):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
LOG.logger.addFilter(retryMaskFilter)
|
||||
|
||||
|
||||
|
@ -1552,8 +1552,8 @@ class TestLoadBalancer(base.BaseAPITest):
|
||||
|
||||
lbs = self.get(
|
||||
self.LBS_PATH,
|
||||
params={'name': 'lb1', 'tags': 'test_tag2',
|
||||
'vip_address': '10.0.0.1', 'tags': 'test_tag1'}
|
||||
params={'name': 'lb1', 'tags': 'test_tag1',
|
||||
'vip_address': '10.0.0.1'}
|
||||
).json.get(self.root_tag_list)
|
||||
self.assertIsInstance(lbs, list)
|
||||
self.assertEqual(1, len(lbs))
|
||||
@ -1561,8 +1561,8 @@ class TestLoadBalancer(base.BaseAPITest):
|
||||
|
||||
lbs = self.get(
|
||||
self.LBS_PATH,
|
||||
params={'name': 'lb1', 'tags': 'test_tag2',
|
||||
'vip_address': '10.0.0.1', 'tags': 'test_tag3'}
|
||||
params={'name': 'lb1', 'tags': 'test_tag3',
|
||||
'vip_address': '10.0.0.1'}
|
||||
).json.get(self.root_tag_list)
|
||||
self.assertIsInstance(lbs, list)
|
||||
self.assertEqual(0, len(lbs))
|
||||
|
@ -33,11 +33,15 @@ LISTENER_ID1 = uuidutils.generate_uuid()
|
||||
LISTENER_ID2 = uuidutils.generate_uuid()
|
||||
LISTENER_IDS = [LISTENER_ID1, LISTENER_ID2]
|
||||
BASE_PATH = '/tmp/test'
|
||||
SAMPLE_POOL_STATUS = {'432fc8b3-d446-48d4-bb64-13beb90e22bc': {
|
||||
'status': 'UP',
|
||||
'uuid': '432fc8b3-d446-48d4-bb64-13beb90e22bc',
|
||||
'members': {
|
||||
'302e33d9-dee1-4de9-98d5-36329a06fb58': 'DOWN'}}}
|
||||
SAMPLE_POOL_STATUS = {
|
||||
'432fc8b3-d446-48d4-bb64-13beb90e22bc': {
|
||||
'status': 'UP',
|
||||
'uuid': '432fc8b3-d446-48d4-bb64-13beb90e22bc',
|
||||
'members': {'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: {
|
||||
'status': 'UP',
|
||||
@ -112,11 +116,13 @@ SAMPLE_STATS_MSG = {
|
||||
'tx': 0, 'rx': 0, 'ereq': 0},
|
||||
'status': 'OPEN'},
|
||||
},
|
||||
'pools': {'432fc8b3-d446-48d4-bb64-13beb90e22bc': {
|
||||
'members': {'302e33d9-dee1-4de9-98d5-36329a06fb58': 'DOWN'},
|
||||
'status': 'UP'}, '432fc8b3-d446-48d4-bb64-13beb90e22bc': {
|
||||
'members': {'302e33d9-dee1-4de9-98d5-36329a06fb58': 'DOWN'},
|
||||
'status': 'UP'},
|
||||
'pools': {
|
||||
'432fc8b3-d446-48d4-bb64-13beb90e22bc': {
|
||||
'members': {'302e33d9-dee1-4de9-98d5-36329a06fb58': 'DOWN'},
|
||||
'status': 'UP'},
|
||||
'3661ed10-99db-4d2c-bffb-99b60eb876ff': {
|
||||
'members': {'e657f950-a6a2-4d28-bffa-0c8a8c05f815': 'DOWN'},
|
||||
'status': 'UP'},
|
||||
},
|
||||
'id': None,
|
||||
'seq': 0,
|
||||
|
@ -602,9 +602,9 @@ def sample_listener_tuple(proto=None, monitor=True, alloc_default_pool=True,
|
||||
provisioning_status=constants.ACTIVE):
|
||||
proto = 'HTTP' if proto is None else proto
|
||||
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
|
||||
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
|
||||
insert_headers = insert_headers or {}
|
||||
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,
|
||||
host_http_check=False,
|
||||
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', 'id, type, delay, timeout, fall_threshold, rise_threshold,'
|
||||
'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):
|
||||
proto = 'HTTP' if proto is None else proto
|
||||
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
|
||||
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
|
||||
insert_headers = insert_headers or {}
|
||||
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,
|
||||
host_http_check=False,
|
||||
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', 'id, type, delay, timeout, fall_threshold, rise_threshold,'
|
||||
'http_method, url_path, expected_codes, enabled, '
|
||||
|
@ -460,7 +460,7 @@ class TestUpdateHealthDb(base.TestCase):
|
||||
"pool-id-1:listener-id-1": {
|
||||
"status": constants.UP,
|
||||
"members": {"member-id-1": constants.UP}},
|
||||
"pool-id-1:listener-id-1": {
|
||||
"pool-id-1:listener-id-2": {
|
||||
"status": constants.UP,
|
||||
"members": {"member-id-1": constants.UP}}},
|
||||
"recv_time": time.time()
|
||||
|
@ -8,7 +8,7 @@ fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
flake8-import-order==0.12 # LGPLv3
|
||||
python-subunit>=1.0.0 # Apache-2.0/BSD
|
||||
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
|
||||
testtools>=2.2.0 # MIT
|
||||
testresources>=2.0.0 # Apache-2.0/BSD
|
||||
|
Loading…
Reference in New Issue
Block a user