Update neutron files for new over-indentation hacking rule (E117)
Change-Id: I594e2d1238f6ffa3c1039624e3b3ed6569485837
This commit is contained in:
parent
e55918ef9e
commit
8914f8247f
@ -58,7 +58,8 @@ def upgrade():
|
|||||||
# as a result of Ifd3e007aaf2a2ed8123275aa3a9f540838e3c003 being
|
# as a result of Ifd3e007aaf2a2ed8123275aa3a9f540838e3c003 being
|
||||||
# back-ported
|
# back-ported
|
||||||
for router_port in session.query(router_ports).filter(
|
for router_port in session.query(router_ports).filter(
|
||||||
router_ports.c.port_type == lib_const.DEVICE_OWNER_ROUTER_HA_INTF):
|
router_ports.c.port_type ==
|
||||||
|
lib_const.DEVICE_OWNER_ROUTER_HA_INTF):
|
||||||
router_port_tuples.discard((router_port.router_id,
|
router_port_tuples.discard((router_port.router_id,
|
||||||
router_port.port_id))
|
router_port.port_id))
|
||||||
new_records = [dict(router_id=router_id, port_id=port_id,
|
new_records = [dict(router_id=router_id, port_id=port_id,
|
||||||
|
@ -1914,8 +1914,7 @@ fixed_ips=ip_address%%3D%s&fixed_ips=ip_address%%3D%s&fixed_ips=subnet_id%%3D%s
|
|||||||
ip_version=constants.IP_VERSION_6,
|
ip_version=constants.IP_VERSION_6,
|
||||||
gateway_ip=constants.ATTR_NOT_SPECIFIED)
|
gateway_ip=constants.ATTR_NOT_SPECIFIED)
|
||||||
subnet2 = self.deserialize(self.fmt, res)
|
subnet2 = self.deserialize(self.fmt, res)
|
||||||
kwargs = {"fixed_ips":
|
kwargs = {"fixed_ips": [{'subnet_id': subnet['subnet']['id']},
|
||||||
[{'subnet_id': subnet['subnet']['id']},
|
|
||||||
{'subnet_id': subnet2['subnet']['id']}]}
|
{'subnet_id': subnet2['subnet']['id']}]}
|
||||||
res = self._create_port(self.fmt, net_id=net_id, **kwargs)
|
res = self._create_port(self.fmt, net_id=net_id, **kwargs)
|
||||||
port3 = self.deserialize(self.fmt, res)
|
port3 = self.deserialize(self.fmt, res)
|
||||||
@ -2352,8 +2351,7 @@ fixed_ips=ip_address%%3D%s&fixed_ips=ip_address%%3D%s&fixed_ips=subnet_id%%3D%s
|
|||||||
def test_range_allocation(self):
|
def test_range_allocation(self):
|
||||||
with self.subnet(gateway_ip='10.0.0.3',
|
with self.subnet(gateway_ip='10.0.0.3',
|
||||||
cidr='10.0.0.0/29') as subnet:
|
cidr='10.0.0.0/29') as subnet:
|
||||||
kwargs = {"fixed_ips":
|
kwargs = {"fixed_ips": [{'subnet_id': subnet['subnet']['id']},
|
||||||
[{'subnet_id': subnet['subnet']['id']},
|
|
||||||
{'subnet_id': subnet['subnet']['id']},
|
{'subnet_id': subnet['subnet']['id']},
|
||||||
{'subnet_id': subnet['subnet']['id']},
|
{'subnet_id': subnet['subnet']['id']},
|
||||||
{'subnet_id': subnet['subnet']['id']},
|
{'subnet_id': subnet['subnet']['id']},
|
||||||
@ -2375,8 +2373,7 @@ fixed_ips=ip_address%%3D%s&fixed_ips=ip_address%%3D%s&fixed_ips=subnet_id%%3D%s
|
|||||||
|
|
||||||
with self.subnet(gateway_ip='11.0.0.6',
|
with self.subnet(gateway_ip='11.0.0.6',
|
||||||
cidr='11.0.0.0/29') as subnet:
|
cidr='11.0.0.0/29') as subnet:
|
||||||
kwargs = {"fixed_ips":
|
kwargs = {"fixed_ips": [{'subnet_id': subnet['subnet']['id']},
|
||||||
[{'subnet_id': subnet['subnet']['id']},
|
|
||||||
{'subnet_id': subnet['subnet']['id']},
|
{'subnet_id': subnet['subnet']['id']},
|
||||||
{'subnet_id': subnet['subnet']['id']},
|
{'subnet_id': subnet['subnet']['id']},
|
||||||
{'subnet_id': subnet['subnet']['id']},
|
{'subnet_id': subnet['subnet']['id']},
|
||||||
|
@ -912,7 +912,8 @@ class TestRollback(test_db_base.NeutronDbPluginV2TestCase):
|
|||||||
Backend = ipam_pluggable_backend.IpamPluggableBackend
|
Backend = ipam_pluggable_backend.IpamPluggableBackend
|
||||||
with mock.patch.object(Backend, '_store_ip_allocation', wraps=store),\
|
with mock.patch.object(Backend, '_store_ip_allocation', wraps=store),\
|
||||||
mock.patch.object(Backend, '_safe_rollback', wraps=rollback),\
|
mock.patch.object(Backend, '_safe_rollback', wraps=rollback),\
|
||||||
mock.patch.object(Backend, '_allocate_ips_for_port', wraps=alloc):
|
mock.patch.object(Backend, '_allocate_ips_for_port',
|
||||||
|
wraps=alloc):
|
||||||
# Create port with two addresses. The wrapper lets one succeed
|
# Create port with two addresses. The wrapper lets one succeed
|
||||||
# then simulates race for the second to trigger IPAM rollback.
|
# then simulates race for the second to trigger IPAM rollback.
|
||||||
response = self._create_port(
|
response = self._create_port(
|
||||||
|
@ -52,7 +52,8 @@ class TestMacvtapRPCCallbacks(base.BaseTestCase):
|
|||||||
with mock.patch.object(ip_lib.IpLinkCommand, 'delete') as mock_del,\
|
with mock.patch.object(ip_lib.IpLinkCommand, 'delete') as mock_del,\
|
||||||
mock.patch.object(macvtap_common, 'get_vlan_device_name',
|
mock.patch.object(macvtap_common, 'get_vlan_device_name',
|
||||||
return_value='vlan1'),\
|
return_value='vlan1'),\
|
||||||
mock.patch.object(ip_lib.IPDevice, 'exists', return_value=True):
|
mock.patch.object(ip_lib.IPDevice, 'exists',
|
||||||
|
return_value=True):
|
||||||
self.rpc.network_delete("anycontext", network_id=NETWORK_ID)
|
self.rpc.network_delete("anycontext", network_id=NETWORK_ID)
|
||||||
self.assertTrue(mock_del.called)
|
self.assertTrue(mock_del.called)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user