Fix pep8 E126

Fix pep8 issue "E126 continuation line over-indented for
hanging indent".

TrivialFix

Change-Id: If6112bf37153d25848aa0828f1285e9bcefc7991
This commit is contained in:
Pawel Suder 2019-01-30 08:03:53 +01:00
parent 7f7f5e2414
commit a50381fbfa
2 changed files with 36 additions and 36 deletions

View File

@ -50,14 +50,14 @@ RESOURCE_ATTRIBUTE_MAP = {
BANDWIDTH_LIMIT_RULES_ALIAS: dict(
_QOS_RULE_COMMON_FIELDS,
**{q_const.MAX_KBPS: {
'allow_post': False, 'allow_put': True,
'convert_to': converters.convert_to_int,
'is_visible': True,
'is_filter': True,
'is_sort_key': True,
'validate': {
'type:range': [0, db_const.DB_INTEGER_MAX_VALUE]
}
'allow_post': False, 'allow_put': True,
'convert_to': converters.convert_to_int,
'is_visible': True,
'is_filter': True,
'is_sort_key': True,
'validate': {
'type:range': [0, db_const.DB_INTEGER_MAX_VALUE]
}
},
q_const.DIRECTION: {
'allow_post': False,
@ -77,33 +77,33 @@ RESOURCE_ATTRIBUTE_MAP = {
'is_sort_key': True,
'convert_to': converters.convert_to_int,
'validate': {
'type:range': [0, db_const.DB_INTEGER_MAX_VALUE]
'type:range': [0, db_const.DB_INTEGER_MAX_VALUE]
}
}}),
DSCP_MARKING_RULES_ALIAS: dict(
_QOS_RULE_COMMON_FIELDS,
**{q_const.DSCP_MARK: {
'allow_post': False, 'allow_put': True,
'convert_to': converters.convert_to_int,
'is_visible': True,
'is_filter': True,
'is_sort_key': True,
'validate': {
'type:values': constants.VALID_DSCP_MARKS
}
'allow_post': False, 'allow_put': True,
'convert_to': converters.convert_to_int,
'is_visible': True,
'is_filter': True,
'is_sort_key': True,
'validate': {
'type:values': constants.VALID_DSCP_MARKS
}
}}),
MIN_BANDWIDTH_RULES_ALIAS: dict(
_QOS_RULE_COMMON_FIELDS,
**{q_const.MIN_KBPS: {
'allow_post': False, 'allow_put': True,
'is_visible': True,
'is_filter': True,
'is_sort_key': True,
'convert_to': converters.convert_to_int,
'validate': {
'type:range': [0, db_const.DB_INTEGER_MAX_VALUE]
}
},
_QOS_RULE_COMMON_FIELDS,
**{q_const.MIN_KBPS: {
'allow_post': False, 'allow_put': True,
'is_visible': True,
'is_filter': True,
'is_sort_key': True,
'convert_to': converters.convert_to_int,
'validate': {
'type:range': [0, db_const.DB_INTEGER_MAX_VALUE]
}
},
q_const.DIRECTION: {
'allow_post': False, 'allow_put': True,
'is_visible': True, 'default': constants.EGRESS_DIRECTION,
@ -112,8 +112,8 @@ RESOURCE_ATTRIBUTE_MAP = {
'validate': {
'type:values': constants.VALID_DIRECTIONS
}
}
}
}
)
}
SUB_RESOURCE_ATTRIBUTE_MAP = {}

View File

@ -253,22 +253,22 @@ class TestUtils(base.BaseTestCase):
def test_get_port_binding_by_status_and_host(self):
bindings = []
self.assertIsNone(utils.get_port_binding_by_status_and_host(
bindings, constants.INACTIVE))
bindings, constants.INACTIVE))
bindings.extend([{pb_ext.STATUS: constants.INACTIVE,
pb_ext.HOST: 'host-1'},
{pb_ext.STATUS: constants.INACTIVE,
pb_ext.HOST: 'host-2'}])
self.assertEqual(
'host-1', utils.get_port_binding_by_status_and_host(
bindings,
constants.INACTIVE)[pb_ext.HOST])
bindings,
constants.INACTIVE)[pb_ext.HOST])
self.assertEqual(
'host-2', utils.get_port_binding_by_status_and_host(
bindings,
constants.INACTIVE,
host='host-2')[pb_ext.HOST])
bindings,
constants.INACTIVE,
host='host-2')[pb_ext.HOST])
self.assertIsNone(utils.get_port_binding_by_status_and_host(
bindings, constants.ACTIVE))
bindings, constants.ACTIVE))
self.assertRaises(exceptions.PortBindingNotFound,
utils.get_port_binding_by_status_and_host, bindings,
constants.ACTIVE, 'host', True, 'port_id')