From e4deff56fb9d083f9d8081944256d7a3ac1c3af3 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Mon, 5 Nov 2012 13:14:19 -0500 Subject: [PATCH] Pep8 fixes for quantum master. This patch addresses some pep8 issues I found when running run_tests.sh -p on Fedora 17. Change-Id: I24896c43bd303c29f85a35814231e970223c132e --- .../plugins/linuxbridge/db/l2network_db_v2.py | 4 ++-- .../openvswitch/agent/ovs_quantum_agent.py | 21 ++++++++++--------- quantum/plugins/openvswitch/ovs_db_v2.py | 4 ++-- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/quantum/plugins/linuxbridge/db/l2network_db_v2.py b/quantum/plugins/linuxbridge/db/l2network_db_v2.py index dee651e43..8b2c1645d 100644 --- a/quantum/plugins/linuxbridge/db/l2network_db_v2.py +++ b/quantum/plugins/linuxbridge/db/l2network_db_v2.py @@ -128,8 +128,8 @@ def reserve_specific_network(session, physical_network, vlan_id): one()) if state.allocated: if vlan_id == constants.FLAT_VLAN_ID: - raise q_exc.FlatNetworkInUse(physical_network= - physical_network) + raise q_exc.FlatNetworkInUse( + physical_network=physical_network) else: raise q_exc.VlanIdInUse(vlan_id=vlan_id, physical_network=physical_network) diff --git a/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py b/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py index 7973cac2a..a76da6272 100755 --- a/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py +++ b/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py @@ -255,11 +255,12 @@ class OVSQuantumAgent(object): actions="set_tunnel:%s,normal" % segmentation_id) # inbound bcast/mcast - self.tun_br.add_flow(priority=3, tun_id=segmentation_id, - dl_dst= - "01:00:00:00:00:00/01:00:00:00:00:00", - actions="mod_vlan_vid:%s,output:%s" % - (lvid, self.patch_int_ofport)) + self.tun_br.add_flow( + priority=3, + tun_id=segmentation_id, + dl_dst="01:00:00:00:00:00/01:00:00:00:00:00", + actions="mod_vlan_vid:%s,output:%s" % + (lvid, self.patch_int_ofport)) else: LOG.error("Cannot provision GRE network for net-id=%s " "- tunneling disabled", net_uuid) @@ -272,11 +273,11 @@ class OVSQuantumAgent(object): dl_vlan=lvid, actions="strip_vlan,normal") # inbound - self.int_br.add_flow(priority=3, - in_port= - self.int_ofports[physical_network], - dl_vlan=0xffff, - actions="mod_vlan_vid:%s,normal" % lvid) + self.int_br.add_flow( + priority=3, + in_port=self.int_ofports[physical_network], + dl_vlan=0xffff, + actions="mod_vlan_vid:%s,normal" % lvid) else: LOG.error("Cannot provision flat network for net-id=%s " "- no bridge for physical_network %s", net_uuid, diff --git a/quantum/plugins/openvswitch/ovs_db_v2.py b/quantum/plugins/openvswitch/ovs_db_v2.py index a658e007b..bf1c82295 100644 --- a/quantum/plugins/openvswitch/ovs_db_v2.py +++ b/quantum/plugins/openvswitch/ovs_db_v2.py @@ -146,8 +146,8 @@ def reserve_specific_vlan(session, physical_network, vlan_id): one()) if alloc.allocated: if vlan_id == constants.FLAT_VLAN_ID: - raise q_exc.FlatNetworkInUse(physical_network= - physical_network) + raise q_exc.FlatNetworkInUse( + physical_network=physical_network) else: raise q_exc.VlanIdInUse(vlan_id=vlan_id, physical_network=physical_network) -- 2.45.2