Fix pep8 issues
Change-Id: I62674220028274619a9b180542eea716f2660917
This commit is contained in:
parent
5d552240ea
commit
b8607bb0c8
@ -180,8 +180,8 @@ class NetworkMultiBladeV2(quantum_plugin_base_v2.QuantumPluginBaseV2):
|
||||
base_plugin_ref = kwargs[const.BASE_PLUGIN_REF]
|
||||
n = kwargs[const.NETWORK]
|
||||
tenant_id = n['tenant_id']
|
||||
args = [tenant_id, id, {const.CONTEXT:context},
|
||||
{const.BASE_PLUGIN_REF:base_plugin_ref}]
|
||||
args = [tenant_id, id, {const.CONTEXT: context},
|
||||
{const.BASE_PLUGIN_REF: base_plugin_ref}]
|
||||
# TODO (Sumit): Might first need to check here if there are active
|
||||
# ports
|
||||
output = []
|
||||
|
@ -200,7 +200,7 @@ class VirtualPhysicalSwitchModelV2(quantum_plugin_base_v2.QuantumPluginBaseV2):
|
||||
vlanids = self._get_all_segmentation_ids()
|
||||
args = [ovs_output[0]['tenant_id'], ovs_output[0]['name'],
|
||||
ovs_output[0]['id'], vlan_name, vlan_id,
|
||||
{'vlan_ids':vlanids}]
|
||||
{'vlan_ids': vlanids}]
|
||||
nexus_output = self._invoke_plugin_per_device(const.NEXUS_PLUGIN,
|
||||
self._func_name(),
|
||||
args)
|
||||
@ -227,7 +227,7 @@ class VirtualPhysicalSwitchModelV2(quantum_plugin_base_v2.QuantumPluginBaseV2):
|
||||
vlan_name = conf.VLAN_NAME_PREFIX + str(vlan_id)
|
||||
args = [ovs_network['tenant_id'], ovs_network['name'],
|
||||
ovs_network['id'], vlan_name, vlan_id,
|
||||
{'vlan_ids':vlanids}]
|
||||
{'vlan_ids': vlanids}]
|
||||
nexus_output = self._invoke_plugin_per_device(
|
||||
const.NEXUS_PLUGIN, "create_network", args)
|
||||
return ovs_output
|
||||
@ -271,9 +271,9 @@ class VirtualPhysicalSwitchModelV2(quantum_plugin_base_v2.QuantumPluginBaseV2):
|
||||
ovs_output = self._invoke_plugin_per_device(const.VSWITCH_PLUGIN,
|
||||
self._func_name(),
|
||||
args)
|
||||
args = [tenant_id, id, {const.VLANID:vlan_id},
|
||||
{const.CONTEXT:context},
|
||||
{const.BASE_PLUGIN_REF:base_plugin_ref}]
|
||||
args = [tenant_id, id, {const.VLANID: vlan_id},
|
||||
{const.CONTEXT: context},
|
||||
{const.BASE_PLUGIN_REF: base_plugin_ref}]
|
||||
if self._validate_vlan_id(vlan_id):
|
||||
self._invoke_plugin_per_device(const.NEXUS_PLUGIN,
|
||||
self._func_name(), args)
|
||||
|
@ -421,7 +421,7 @@ class TestConvertToInt(unittest2.TestCase):
|
||||
[], attributes.convert_none_to_empty_list(None))
|
||||
|
||||
def test_convert_none_to_empty_list_value(self):
|
||||
values = ['1', 3, [], [1], {}, {'a':3}]
|
||||
values = ['1', 3, [], [1], {}, {'a': 3}]
|
||||
for value in values:
|
||||
self.assertEqual(
|
||||
value, attributes.convert_none_to_empty_list(value))
|
||||
|
@ -77,7 +77,7 @@ class TestDebugCommands(unittest.TestCase):
|
||||
'mac_address': 'aa:bb:cc:dd:ee:ffa',
|
||||
'network_id': 'fake_net',
|
||||
'fixed_ips':
|
||||
[{'subnet_id': 'fake_subnet', 'ip_address':'10.0.0.3'}]
|
||||
[{'subnet_id': 'fake_subnet', 'ip_address': '10.0.0.3'}]
|
||||
}}
|
||||
fake_ports = {'ports': [fake_port['port']]}
|
||||
self.fake_ports = fake_ports
|
||||
|
@ -536,10 +536,10 @@ class TestIpRouteCommand(TestIPCmdBase):
|
||||
|
||||
def test_get_gateway(self):
|
||||
test_cases = [{'sample': GATEWAY_SAMPLE1,
|
||||
'expected': {'gateway':'10.35.19.254',
|
||||
'expected': {'gateway': '10.35.19.254',
|
||||
'metric': 100}},
|
||||
{'sample': GATEWAY_SAMPLE2,
|
||||
'expected': {'gateway':'10.35.19.254',
|
||||
'expected': {'gateway': '10.35.19.254',
|
||||
'metric': 100}},
|
||||
{'sample': GATEWAY_SAMPLE3,
|
||||
'expected': None},
|
||||
|
Loading…
x
Reference in New Issue
Block a user