]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Fix incorrect indentations found by Pep 1.4.6+
authorDirk Mueller <dirk@dmllr.de>
Sat, 19 Oct 2013 08:50:16 +0000 (10:50 +0200)
committerDirk Mueller <dirk@dmllr.de>
Sat, 19 Oct 2013 08:50:16 +0000 (10:50 +0200)
Pep 1.4.5 had several bugs with checking indentation of
hanging and nested sets. Fix fallout.

Change-Id: Ibcb1679e0bd283feb3c1568ba214bc525575fd43

39 files changed:
neutron/agent/dhcp_agent.py
neutron/api/extensions.py
neutron/db/migration/alembic_migrations/versions/1149d7de0cfa_port_security.py
neutron/db/migration/alembic_migrations/versions/3c6e57a23db4_add_multiprovider.py
neutron/db/migration/alembic_migrations/versions/3cbf70257c28_nvp_mac_learning.py
neutron/db/migration/alembic_migrations/versions/4a666eb208c2_service_router.py
neutron/db/migration/alembic_migrations/versions/52ff27f7567a_support_for_vpnaas.py
neutron/debug/shell.py
neutron/extensions/flavor.py
neutron/plugins/cisco/db/n1kv_db_v2.py
neutron/plugins/cisco/db/n1kv_models_v2.py
neutron/plugins/cisco/n1kv/n1kv_neutron_plugin.py
neutron/plugins/hyperv/agent/hyperv_neutron_agent.py
neutron/plugins/hyperv/hyperv_neutron_plugin.py
neutron/plugins/ml2/drivers/mech_arista/mechanism_arista.py
neutron/plugins/mlnx/common/config.py
neutron/plugins/mlnx/db/mlnx_db_v2.py
neutron/plugins/nicira/NeutronPlugin.py
neutron/plugins/nicira/check_nvp_config.py
neutron/plugins/nicira/vshield/edge_firewall_driver.py
neutron/plugins/nicira/vshield/edge_loadbalancer_driver.py
neutron/services/firewall/agents/l3reference/firewall_l3_agent.py
neutron/tests/unit/bigswitch/test_router_db.py
neutron/tests/unit/cisco/n1kv/test_n1kv_db.py
neutron/tests/unit/db/vpn/test_db_vpnaas.py
neutron/tests/unit/ml2/test_ml2_plugin.py
neutron/tests/unit/ml2/test_type_vxlan.py
neutron/tests/unit/nicira/test_nicira_plugin.py
neutron/tests/unit/nicira/test_nvplib.py
neutron/tests/unit/test_db_plugin.py
neutron/tests/unit/test_debug_commands.py
neutron/tests/unit/test_dhcp_agent.py
neutron/tests/unit/test_extension_portsecurity.py
neutron/tests/unit/test_extension_security_group.py
neutron/tests/unit/test_iptables_firewall.py
neutron/tests/unit/test_l3_agent.py
neutron/tests/unit/test_linux_dhcp.py
neutron/tests/unit/test_linux_ip_lib.py
neutron/tests/unit/test_security_groups_rpc.py

index 4fd9f3509929054d093e1f34416db6b1c7934df3..f58b577cdf9dd99bd0dac5ce492e840cb6aa6279 100644 (file)
@@ -403,9 +403,9 @@ class DhcpPluginApi(proxy.RpcProxy):
         """Make a remote process call to get the dhcp port."""
         return dhcp.DictModel(self.call(self.context,
                                         self.make_msg('get_dhcp_port',
-                                        network_id=network_id,
-                                        device_id=device_id,
-                                        host=self.host),
+                                                      network_id=network_id,
+                                                      device_id=device_id,
+                                                      host=self.host),
                               topic=self.topic))
 
     def create_dhcp_port(self, port):
index a3d4e23d9df5256b186e893390b5c86e93a961ff..c34188f4662864ca8aec23980db51606858bf2bb 100644 (file)
@@ -263,8 +263,7 @@ class ExtensionMiddleware(wsgi.Middleware):
     def __init__(self, application,
                  ext_mgr=None):
         self.ext_mgr = (ext_mgr
-                        or ExtensionManager(
-                        get_extensions_path()))
+                        or ExtensionManager(get_extensions_path()))
         mapper = routes.Mapper()
 
         # extended resources
index 2de10aedfac321c8c959215bc21e3be9672f1680..9b3629187f501ba565d4634dfceb965f02338d0a 100644 (file)
@@ -46,19 +46,19 @@ def upgrade(active_plugins=None, options=None):
     ### commands auto generated by Alembic - please adjust! ###
     op.create_table('networksecuritybindings',
                     sa.Column('network_id', sa.String(length=36),
-                    nullable=False),
+                              nullable=False),
                     sa.Column('port_security_enabled', sa.Boolean(),
-                    nullable=False),
+                              nullable=False),
                     sa.ForeignKeyConstraint(['network_id'], ['networks.id'],
-                    ondelete='CASCADE'),
+                                            ondelete='CASCADE'),
                     sa.PrimaryKeyConstraint('network_id'))
     op.create_table('portsecuritybindings',
                     sa.Column('port_id', sa.String(length=36),
-                    nullable=False),
+                              nullable=False),
                     sa.Column('port_security_enabled', sa.Boolean(),
-                    nullable=False),
+                              nullable=False),
                     sa.ForeignKeyConstraint(['port_id'], ['ports.id'],
-                    ondelete='CASCADE'),
+                                            ondelete='CASCADE'),
                     sa.PrimaryKeyConstraint('port_id'))
     ### end Alembic commands ###
 
index 72e7200d22554e9ad52c3561a44dc8b8c391f29f..5ccf7ee0d8664e9be0e196300db849c4433f4975 100644 (file)
@@ -55,8 +55,9 @@ def upgrade(active_plugins=None, options=None):
                     sa.Column('network_id', sa.String(length=36),
                               primary_key=True),
                     sa.Column('binding_type',
-                              sa.Enum('flat', 'vlan', 'stt', 'gre', 'l3_ext',
-                                      name=(
+                              sa.Enum(
+                                  'flat', 'vlan', 'stt', 'gre', 'l3_ext',
+                                  name=(
                                       'nvp_network_bindings_binding_type')),
                               nullable=False, primary_key=True),
                     sa.Column('phy_uuid', sa.String(36), primary_key=True,
@@ -80,18 +81,15 @@ def downgrade(active_plugins=None, options=None):
                "(SELECT network_id from nvp_multi_provider_networks)")
 
     # create table with previous contains
-    op.create_table('rename_nvp_network_bindings',
-                    sa.Column('network_id', sa.String(length=36),
-                              primary_key=True),
-                    sa.Column('binding_type',
-                              sa.Enum('flat', 'vlan', 'stt', 'gre', 'l3_ext',
-                                      name=(
-                                      'nvp_network_bindings_binding_type')),
-                              nullable=False),
-                    sa.Column('phy_uuid', sa.String(36),
-                              nullable=True),
-                    sa.Column('vlan_id', sa.Integer,
-                              nullable=True, autoincrement=False))
+    op.create_table(
+        'rename_nvp_network_bindings',
+        sa.Column('network_id', sa.String(length=36), primary_key=True),
+        sa.Column('binding_type',
+                  sa.Enum('flat', 'vlan', 'stt', 'gre', 'l3_ext',
+                          name=('nvp_network_bindings_binding_type')),
+                  nullable=False),
+        sa.Column('phy_uuid', sa.String(36), nullable=True),
+        sa.Column('vlan_id', sa.Integer, nullable=True, autoincrement=False))
 
     # copy data from nvp_network_bindings into rename_nvp_network_bindings
     op.execute("INSERT INTO rename_nvp_network_bindings SELECT network_id, "
index 0864f9a13f08f1c80799e9faa8f66f9a75f4a3d5..2dc9f65cd9fb80f210e9a37ad3c8a97001de8886 100644 (file)
@@ -49,7 +49,7 @@ def upgrade(active_plugins=None, options=None):
         sa.Column('port_id', sa.String(length=36), nullable=False),
         sa.Column('mac_learning_enabled', sa.Boolean(), nullable=False),
         sa.ForeignKeyConstraint(
-        ['port_id'], ['ports.id'], ondelete='CASCADE'),
+            ['port_id'], ['ports.id'], ondelete='CASCADE'),
         sa.PrimaryKeyConstraint('port_id'))
 
 
index 580590c56aa409e7f383ee40f6275199870c2c83..911182b45aa41152405bcc82e1507bfafd39ff37 100644 (file)
@@ -58,9 +58,7 @@ def upgrade(active_plugins=None, options=None):
     )
     op.add_column(
         u'nsxrouterextattributess',
-        sa.Column('service_router',
-        sa.Boolean(),
-        nullable=False))
+        sa.Column('service_router', sa.Boolean(), nullable=False))
     op.execute("UPDATE nsxrouterextattributess set service_router=False")
 
 
index 41f934d8b0658ef06652d0da420f2dc1b4d20cfb..c9f61ff91fdbcc60f7fd696c67722800c9d2142c 100644 (file)
@@ -55,7 +55,7 @@ def upgrade(active_plugins=None, options=None):
         sa.Column(
             'encryption_algorithm',
             sa.Enum('3des', 'aes-128', 'aes-256', 'aes-192',
-            name='vpn_encrypt_algorithms'), nullable=False),
+                    name='vpn_encrypt_algorithms'), nullable=False),
         sa.Column(
             'phase1_negotiation_mode',
             sa.Enum('main', name='ike_phase1_mode'), nullable=False),
index 3b97fb3eb938eaec8d69b87e75715e8b52232795..103c43014f64c7ae85b7cf7428022479f8346659 100644 (file)
@@ -41,7 +41,7 @@ COMMAND_V2 = {
         'neutron.debug.commands.ExecProbe'),
     'ping-all': utils.import_class(
         'neutron.debug.commands.PingAll'),
-#TODO(nati)  ping, netcat , nmap, bench
+    #TODO(nati)  ping, netcat , nmap, bench
 }
 COMMANDS = {'2.0': COMMAND_V2}
 
index 7d3d5e9efc7ed3b09f5f7c45dede799e5e24cb2d..4f7be18d132f7dc18aaaf402f86c53b88006f646 100644 (file)
@@ -27,16 +27,16 @@ FLAVOR_ROUTER = 'flavor:router'
 
 FLAVOR_ATTRIBUTE = {
     'networks': {
-    FLAVOR_NETWORK: {'allow_post': True,
-                     'allow_put': False,
-                     'is_visible': True,
-                     'default': attributes.ATTR_NOT_SPECIFIED}
+        FLAVOR_NETWORK: {'allow_post': True,
+                         'allow_put': False,
+                         'is_visible': True,
+                         'default': attributes.ATTR_NOT_SPECIFIED}
     },
     'routers': {
-    FLAVOR_ROUTER: {'allow_post': True,
-                    'allow_put': False,
-                    'is_visible': True,
-                    'default': attributes.ATTR_NOT_SPECIFIED}
+        FLAVOR_ROUTER: {'allow_post': True,
+                        'allow_put': False,
+                        'is_visible': True,
+                        'default': attributes.ATTR_NOT_SPECIFIED}
     }
 }
 
index 7cf36d0d09642cc2fe41541195f0b08d2e8cfce2..9bea96a37eed86a068c6d16401d12cadfd546991 100644 (file)
@@ -76,9 +76,9 @@ def del_multi_segment_binding(db_session, multi_segment_id, segment_pairs):
         for (segment1_id, segment2_id) in segment_pairs:
             (db_session.query(n1kv_models_v2.
              N1kvMultiSegmentNetworkBinding).filter_by(
-             multi_segment_id=multi_segment_id,
-             segment1_id=segment1_id,
-             segment2_id=segment2_id).delete())
+                 multi_segment_id=multi_segment_id,
+                 segment1_id=segment1_id,
+                 segment2_id=segment2_id).delete())
 
 
 def add_trunk_segment_binding(db_session, trunk_segment_id, segment_pairs):
@@ -1490,7 +1490,7 @@ class PolicyProfile_db_mixin(object):
         with db_session.begin(subtransactions=True):
             a_set_q = (db_session.query(n1kv_models_v2.ProfileBinding).
                        filter_by(tenant_id=c_const.TENANT_ID_NOT_SET,
-                       profile_type=c_const.POLICY))
+                                 profile_type=c_const.POLICY))
             a_set = set(i.profile_id for i in a_set_q)
             b_set_q = (db_session.query(n1kv_models_v2.ProfileBinding).
                        filter(and_(n1kv_models_v2.ProfileBinding.
index 4933ff8391e2bb04f545853a2298b41382eab330..f8890bad017a6ad11bd2a66c9da6aaaa2c5807b2 100644 (file)
@@ -157,7 +157,7 @@ class N1kvTrunkSegmentBinding(model_base.BASEV2):
 
     trunk_segment_id = sa.Column(sa.String(36),
                                  sa.ForeignKey('networks.id',
-                                 ondelete="CASCADE"),
+                                               ondelete="CASCADE"),
                                  primary_key=True)
     segment_id = sa.Column(sa.String(36), nullable=False, primary_key=True)
     dot1qtag = sa.Column(sa.String(36), nullable=False, primary_key=True)
@@ -170,7 +170,7 @@ class N1kvMultiSegmentNetworkBinding(model_base.BASEV2):
 
     multi_segment_id = sa.Column(sa.String(36),
                                  sa.ForeignKey('networks.id',
-                                 ondelete="CASCADE"),
+                                               ondelete="CASCADE"),
                                  primary_key=True)
     segment1_id = sa.Column(sa.String(36), nullable=False, primary_key=True)
     segment2_id = sa.Column(sa.String(36), nullable=False, primary_key=True)
index f2b9149aecce2a183b4a8d813b812de4fd284483..6a21d13150e635051d60f018c5c25eb0968d363f 100644 (file)
@@ -464,7 +464,7 @@ class N1kvNeutronPluginV2(db_base_plugin_v2.NeutronDbPluginV2,
                 n1kv_db_v2.add_multi_segment_encap_profile_name(session,
                                                                 net_id,
                                                                 (segment1,
-                                                                segment2),
+                                                                 segment2),
                                                                 encap_profile)
             else:
                 raise cisco_exceptions.NoClusterFound
@@ -491,7 +491,7 @@ class N1kvNeutronPluginV2(db_base_plugin_v2.NeutronDbPluginV2,
             binding = (
                 n1kv_db_v2.get_multi_segment_network_binding(session, net_id,
                                                              (segment1,
-                                                             segment2)))
+                                                              segment2)))
             encap_profile = binding['encap_profile_name']
             if encap_profile in encap_dict:
                 profile_dict = encap_dict[encap_profile]
index 0944ca39e6819e80f987929b53acb6719f61d1a8..5690ac8be96571f06e2d11bcf61d9973a74a59e9 100644 (file)
@@ -45,8 +45,8 @@ agent_opts = [
         'physical_network_vswitch_mappings',
         default=[],
         help=_('List of <physical_network>:<vswitch> '
-        'where the physical networks can be expressed with '
-        'wildcards, e.g.: ."*:external"')),
+               'where the physical networks can be expressed with '
+               'wildcards, e.g.: ."*:external"')),
     cfg.StrOpt(
         'local_network_vswitch',
         default='private',
index 07d6c9d3e49e47fafa6067758187a10381f550b8..b9721c6cf1281f50e9ad115ba7a42f06a55d2d3b 100644 (file)
@@ -44,11 +44,11 @@ DEFAULT_VLAN_RANGES = []
 hyperv_opts = [
     cfg.StrOpt('tenant_network_type', default='local',
                help=_("Network type for tenant networks "
-               "(local, flat, vlan or none)")),
+                      "(local, flat, vlan or none)")),
     cfg.ListOpt('network_vlan_ranges',
                 default=DEFAULT_VLAN_RANGES,
                 help=_("List of <physical_network>:<vlan_min>:<vlan_max> "
-                "or <physical_network>")),
+                       "or <physical_network>")),
 ]
 
 cfg.CONF.register_opts(hyperv_opts, "HYPERV")
index 292629a9ad29f7f9a08270b657dd3cd2e2489d9d..60e132742a5a866844d70e132843877929b984fd 100644 (file)
@@ -263,8 +263,8 @@ class AristaRPCWrapper(object):
         """
         cmds = ['auth url %s user %s password %s' %
                 (self._keystone_url(),
-                self.keystone_conf.admin_user,
-                self.keystone_conf.admin_password)]
+                 self.keystone_conf.admin_user,
+                 self.keystone_conf.admin_password)]
 
         self._run_openstack_cmds(cmds)
 
index fb374b2f5bc697e507384c226208d12f16528dc5..adf868ea7e61719532580b7c1a48536fb749b7e8 100644 (file)
@@ -26,7 +26,7 @@ DEFAULT_INTERFACE_MAPPINGS = []
 vlan_opts = [
     cfg.StrOpt('tenant_network_type', default='vlan',
                help=_("Network type for tenant networks "
-               "(local, ib, vlan, or none)")),
+                      "(local, ib, vlan, or none)")),
     cfg.ListOpt('network_vlan_ranges',
                 default=DEFAULT_VLAN_RANGES,
                 help=_("List of <physical_network>:<vlan_min>:<vlan_max> "
index f730824ede58439b2808be47b15c08761386514e..50dd7057a42d87cc924f7a567a23a8a1b0b2484b 100644 (file)
@@ -135,9 +135,8 @@ def reserve_specific_network(session, physical_network, segmentation_id):
         try:
             entry = (session.query(mlnx_models_v2.SegmentationIdAllocation).
                      filter_by(physical_network=physical_network,
-                     segmentation_id=segmentation_id).
-                     with_lockmode('update').
-                     one())
+                               segmentation_id=segmentation_id).
+                     with_lockmode('update').one())
             if entry.allocated:
                 raise q_exc.VlanIdInUse(vlan_id=segmentation_id,
                                         physical_network=physical_network)
index f9d84d2fd176435cea3d0d3a804abe990e3feb73..2e6518a8aa8c4bbbb93dc9cf5de99ccb44672f96 100644 (file)
@@ -2024,7 +2024,7 @@ class NvpPluginV2(addr_pair_db.AllowedAddressPairsMixin,
                                 in securitygroups_db.IP_PROTOCOL_MAP.values())
             if (not port_based_proto and
                 (r['port_range_min'] is not None or
-                r['port_range_max'] is not None)):
+                 r['port_range_max'] is not None)):
                 msg = (_("Port values not valid for "
                          "protocol: %s") % r['protocol'])
                 raise q_exc.BadRequest(resource='security_group_rule',
index 092dfba326028d65d9371e29e696db81db42a538..c86343a66755600996370adcf3074fbb3e91c0ad 100644 (file)
@@ -96,8 +96,9 @@ def main(argv):
             if (default_gateways[svc_type] and
                 default_gateways[svc_type] not in gateway_services):
                 print("\t\t\tError: specified default %s gateway (%s) is "
-                      "missing from NVP Gateway Services!" % (svc_type,
-                      default_gateways[svc_type]))
+                      "missing from NVP Gateway Services!" % (
+                          svc_type,
+                          default_gateways[svc_type]))
                 errors += 1
         transport_zones = get_transport_zones(cluster)
         print("\tTransport zones: %s" % transport_zones)
index a84a9b5c7ce42179a75b73f31886fe98887bb08d..7b903c6e25aed89c89794c8c18cfebecd71939c6 100644 (file)
@@ -218,8 +218,8 @@ class EdgeFirewallDriver(db_base_plugin_v2.NeutronDbPluginV2):
         except vcns_exc.VcnsApiException as e:
             LOG.exception(_("Failed to get firewall rule: %(rule_id)s "
                             "with edge_id: %(edge_id)s"), {
-                          'rule_id': id,
-                          'edge_id': edge_id})
+                                'rule_id': id,
+                                'edge_id': edge_id})
             raise e
         return self._restore_firewall_rule(context, edge_id, response)
 
index 7e3ced5c8f214f479e942360ccd4008ddbdfe227..0fef33d47216441233116642d7ecb78d8465069e 100644 (file)
@@ -232,9 +232,7 @@ class EdgeLbDriver():
             context.session, id, edge_id)
         if not pool_binding:
             msg = (_("pool_binding not found with id: %(id)s "
-                     "edge_id: %(edge_id)s") % {
-                   'id': id,
-                   'edge_id': edge_id})
+                     "edge_id: %(edge_id)s") % {'id': id, 'edge_id': edge_id})
             LOG.error(msg)
             raise vcns_exc.VcnsNotFound(
                 resource='router_service_binding', msg=msg)
@@ -294,9 +292,7 @@ class EdgeLbDriver():
             context.session, id, edge_id)
         if not monitor_binding:
             msg = (_("monitor_binding not found with id: %(id)s "
-                     "edge_id: %(edge_id)s") % {
-                   'id': id,
-                   'edge_id': edge_id})
+                     "edge_id: %(edge_id)s") % {'id': id, 'edge_id': edge_id})
             LOG.error(msg)
             raise vcns_exc.VcnsNotFound(
                 resource='router_service_binding', msg=msg)
index e69982175cff504dc4add173282b7a11910e752e..393b94b5111748c6ea740b91a36e3c804731586e 100644 (file)
@@ -245,7 +245,7 @@ class FWaaSL3AgentRpcCallback(api.FWaaSAgentRpcCallbackMixin):
                             # install
                             LOG.debug(_("Apply fw on Router List: '%s'"),
                                       [ri.router['id']
-                                      for ri in router_info_list])
+                                          for ri in router_info_list])
                             # no need to apply sync data for ACTIVE fw
                             if fw['status'] != constants.ACTIVE:
                                 self._invoke_driver_for_sync_from_plugin(
index 827bbdc1237299992a49ae281469196b07672801..d7e4a97a781d7e2e283ecaf646aeb86fd9f70b31 100644 (file)
@@ -353,10 +353,10 @@ class RouterDBTestCase(test_l3_plugin.L3NatDBIntTestCase):
                                  'nexthops': ['4.4.4.4', '4.4.4.5']}]
                 body1 = self._update('routers', r1_id,
                                      {'router':
-                                     {'router_rules': router1_rules}})
+                                         {'router_rules': router1_rules}})
                 body2 = self._update('routers', r2_id,
                                      {'router':
-                                     {'router_rules': router2_rules}})
+                                         {'router_rules': router2_rules}})
 
                 body1 = self._show('routers', r1_id)
                 body2 = self._show('routers', r2_id)
index ef8ea11925d87294bbab7f26121332d344d227a0..8e4a0b40f4e71cf4ce815efc6958a601ba238b6e 100644 (file)
@@ -670,10 +670,11 @@ class NetworkProfileTests(base.BaseTestCase,
         _db_profile = (n1kv_db_v2.create_network_profile(
                        self.session, TEST_NETWORK_PROFILE_MULTI_SEGMENT))
         self.assertIsNotNone(_db_profile)
-        db_profile = (self.session.query(n1kv_models_v2.NetworkProfile).
-                      filter_by(
-                      name=TEST_NETWORK_PROFILE_MULTI_SEGMENT['name']).
-                      one())
+        db_profile = (
+            self.session.query(
+                n1kv_models_v2.NetworkProfile).filter_by(
+                    name=TEST_NETWORK_PROFILE_MULTI_SEGMENT['name'])
+            .one())
         self.assertIsNotNone(db_profile)
         self.assertEqual(_db_profile.id, db_profile.id)
         self.assertEqual(_db_profile.name, db_profile.name)
index 23c4fcd1930c8d09f6662f41eddf11b4478bcc11..70f72ee2914e8e41339833cb28a90eecf7b4060c 100644 (file)
@@ -386,7 +386,7 @@ class VPNPluginDbTestCase(test_l3_plugin.L3NatTestCaseMixin,
                     self._delete(
                         'ipsec-site-connections',
                         ipsec_site_connection[
-                        'ipsec_site_connection']['id']
+                            'ipsec_site_connection']['id']
                     )
 
 
@@ -1359,7 +1359,7 @@ class TestVpnaas(VPNPluginDbTestCase):
                     req = self.new_show_request(
                         'ipsec-site-connections',
                         ipsec_site_connection[
-                        'ipsec_site_connection']['id'],
+                            'ipsec_site_connection']['id'],
                         fmt=self.fmt
                     )
                     res = self.deserialize(
@@ -1476,7 +1476,7 @@ class TestVpnaas(VPNPluginDbTestCase):
                 '192.168.1.10',
                 '192.168.1.10',
                 ['192.168.2.0/24',
-                '192.168.3.0/24'],
+                 '192.168.3.0/24'],
                 1500,
                 'abcdef',
                 'bi-directional',
@@ -1573,7 +1573,7 @@ class TestVpnaas(VPNPluginDbTestCase):
                         '192.168.1.10',
                         '192.168.1.10',
                         ['192.168.2.0/24',
-                        '192.168.3.0/24'],
+                         '192.168.3.0/24'],
                         1500,
                         'abcdef',
                         'bi-directional',
index 46b7550d339afea39016a7ea2db6840480e8d10e..5334262a72b50bae516fa9cda23a22670ee2dced 100644 (file)
@@ -145,9 +145,9 @@ class TestMultiSegmentNetworks(Ml2PluginV2TestCase):
                             [{pnet.NETWORK_TYPE: 'vlan',
                               pnet.PHYSICAL_NETWORK: 'physnet1',
                               pnet.SEGMENTATION_ID: 1},
-                            {pnet.NETWORK_TYPE: 'vlan',
-                             pnet.PHYSICAL_NETWORK: 'physnet1',
-                             pnet.SEGMENTATION_ID: 2}],
+                             {pnet.NETWORK_TYPE: 'vlan',
+                              pnet.PHYSICAL_NETWORK: 'physnet1',
+                              pnet.SEGMENTATION_ID: 2}],
                             'tenant_id': 'tenant_one'}}
         network_req = self.new_create_request('networks', data)
         network = self.deserialize(self.fmt,
@@ -188,9 +188,9 @@ class TestMultiSegmentNetworks(Ml2PluginV2TestCase):
                             [{pnet.NETWORK_TYPE: 'vlan',
                               pnet.PHYSICAL_NETWORK: 'physnet1',
                               pnet.SEGMENTATION_ID: 1},
-                            {pnet.NETWORK_TYPE: 'vlan',
-                             pnet.PHYSICAL_NETWORK: 'physnet1',
-                             pnet.SEGMENTATION_ID: 1}],
+                             {pnet.NETWORK_TYPE: 'vlan',
+                              pnet.PHYSICAL_NETWORK: 'physnet1',
+                              pnet.SEGMENTATION_ID: 1}],
                             'tenant_id': 'tenant_one'}}
         network_req = self.new_create_request('networks', data)
         res = network_req.get_response(self.api)
index 7f4fd8baaabcad4075f87fbf02fca89bf734dd55..96a5b76562244a07d8f27f1577cf6084fb490fc7 100644 (file)
@@ -99,7 +99,7 @@ class VxlanTypeTest(base.BaseTestCase):
 
         self.assertIsNone(self.driver.
                           get_vxlan_allocation(self.session,
-                          (TUN_MIN + 5 - 1)))
+                                               (TUN_MIN + 5 - 1)))
         self.assertFalse(self.driver.
                          get_vxlan_allocation(self.session, (TUN_MIN + 5)).
                          allocated)
@@ -114,7 +114,7 @@ class VxlanTypeTest(base.BaseTestCase):
                          allocated)
         self.assertIsNone(self.driver.
                           get_vxlan_allocation(self.session,
-                          (TUN_MAX + 5 + 1)))
+                                               (TUN_MAX + 5 + 1)))
 
     def test_reserve_provider_segment(self):
         segment = {api.NETWORK_TYPE: 'vxlan',
index dbbbf8f1d12eeaad189e052d8cbc48c1771b6d93..4d2b2f65207905a7573409db11ad7e54e726d639 100644 (file)
@@ -1458,8 +1458,8 @@ class TestNiciraMultiProviderNetworks(NiciraPluginV2TestCase):
                             [{pnet.NETWORK_TYPE: 'vlan',
                               pnet.PHYSICAL_NETWORK: 'physnet1',
                               pnet.SEGMENTATION_ID: 1},
-                            {pnet.NETWORK_TYPE: 'stt',
-                             pnet.PHYSICAL_NETWORK: 'physnet1'}],
+                             {pnet.NETWORK_TYPE: 'stt',
+                              pnet.PHYSICAL_NETWORK: 'physnet1'}],
                             'tenant_id': 'tenant_one'}}
         network_req = self.new_create_request('networks', data)
         network = self.deserialize(self.fmt,
@@ -1500,9 +1500,9 @@ class TestNiciraMultiProviderNetworks(NiciraPluginV2TestCase):
                             [{pnet.NETWORK_TYPE: 'vlan',
                               pnet.PHYSICAL_NETWORK: 'physnet1',
                               pnet.SEGMENTATION_ID: 1},
-                            {pnet.NETWORK_TYPE: 'vlan',
-                             pnet.PHYSICAL_NETWORK: 'physnet1',
-                             pnet.SEGMENTATION_ID: 1}],
+                             {pnet.NETWORK_TYPE: 'vlan',
+                              pnet.PHYSICAL_NETWORK: 'physnet1',
+                              pnet.SEGMENTATION_ID: 1}],
                             'tenant_id': 'tenant_one'}}
         network_req = self.new_create_request('networks', data)
         res = network_req.get_response(self.api)
index eb0823f7b3810bff38942606738316d33bbee2a7..4dfbd23fc7a2dcef96ed9b01ab8f37e845951808 100644 (file)
@@ -140,7 +140,7 @@ class NvplibNegativeTests(base.BaseTestCase):
                           'fake-tenant',
                           'fake-gateway',
                           [{'id': _uuid(),
-                          'interface_name': 'xxx'}])
+                           'interface_name': 'xxx'}])
 
     def test_delete_l2_gw_service_on_failure(self):
         self.assertRaises(nvplib.NvpApiClient.NvpApiException,
@@ -437,7 +437,7 @@ class TestNvplibExplicitLRouters(NvplibTestCase):
                         'default_route_next_hop':
                         {'gateway_ip_address': 'fake_address',
                          'type': 'RouterNextHop'},
-                    'type': 'SingleDefaultRouteImplicitRoutingConfig'},
+                        'type': 'SingleDefaultRouteImplicitRoutingConfig'},
                     'tags': [{'scope': 'os_tid', 'tag': 'fake_tenant_id'},
                              {'scope': 'quantum',
                               'tag': nvplib.NEUTRON_VERSION}],
index 651041c03e271e90ca541b01aca19f0fed550735..f52b89d675f55b77d6dbb4427d47f0a292b0f407 100644 (file)
@@ -3409,7 +3409,7 @@ class TestSubnetsV2(NeutronDbPluginV2TestCase):
         host_routes = [{'destination': '135.207.0.0/16',
                        'nexthop': '1.2.3.4'},
                        {'destination': '12.0.0.0/8',
-                       'nexthop': '4.3.2.1'}]
+                        'nexthop': '4.3.2.1'}]
 
         self._test_create_subnet(gateway_ip=gateway_ip,
                                  cidr=cidr,
index e820c4d2a62e52064194be4d34c9923f6de3af95..9410d1a8986c19e16e7839f3d2add278a436658a 100644 (file)
@@ -201,8 +201,8 @@ class TestDebugCommands(base.BaseTestCase):
                                       mock.call.delete_port('fake_port')])
         self.driver.assert_has_calls([mock.call.get_device_name(mock.ANY),
                                       mock.call.unplug('tap12345678-12',
-                                      namespace=namespace,
-                                      bridge=None)])
+                                                       namespace=namespace,
+                                                       bridge=None)])
 
     def test_delete_probe_external(self):
         fake_network = {'network': {'id': 'fake_net',
@@ -222,8 +222,8 @@ class TestDebugCommands(base.BaseTestCase):
                                       mock.call.delete_port('fake_port')])
         self.driver.assert_has_calls([mock.call.get_device_name(mock.ANY),
                                       mock.call.unplug('tap12345678-12',
-                                      namespace=namespace,
-                                      bridge='br-ex')])
+                                                       namespace=namespace,
+                                                       bridge='br-ex')])
 
     def test_delete_probe_without_namespace(self):
         cfg.CONF.set_override('use_namespaces', False)
index 4cc6b2537ef2d5e3cef4509f1ce46976a36032a8..c3c665a1cf3aaf08da28335d2e259c9b3f15085d 100644 (file)
@@ -110,19 +110,19 @@ fake_network = dhcp.NetModel(True, dict(id='12345678-1234-5678-1234567890ab',
                              subnets=[fake_subnet1, fake_subnet2],
                              ports=[fake_port1]))
 
-fake_meta_network = dhcp.NetModel(True,
-                                  dict(id='12345678-1234-5678-1234567890ab',
-                                  tenant_id='aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa',
-                                  admin_state_up=True,
-                                  subnets=[fake_meta_subnet],
-                                  ports=[fake_meta_port]))
+fake_meta_network = dhcp.NetModel(
+    True, dict(id='12345678-1234-5678-1234567890ab',
+               tenant_id='aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa',
+               admin_state_up=True,
+               subnets=[fake_meta_subnet],
+               ports=[fake_meta_port]))
 
-fake_down_network = dhcp.NetModel(True,
-                                  dict(id='12345678-dddd-dddd-1234567890ab',
-                                  tenant_id='aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa',
-                                  admin_state_up=False,
-                                  subnets=[],
-                                  ports=[]))
+fake_down_network = dhcp.NetModel(
+    True, dict(id='12345678-dddd-dddd-1234567890ab',
+               tenant_id='aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa',
+               admin_state_up=False,
+               subnets=[],
+               ports=[]))
 
 
 class TestDhcpAgent(base.BaseTestCase):
@@ -934,11 +934,11 @@ class TestNetworkCache(base.BaseTestCase):
                          fake_network)
 
     def test_put_port(self):
-        fake_net = dhcp.NetModel(True,
-                                 dict(id='12345678-1234-5678-1234567890ab',
-                                 tenant_id='aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa',
-                                 subnets=[fake_subnet1],
-                                 ports=[fake_port1]))
+        fake_net = dhcp.NetModel(
+            True, dict(id='12345678-1234-5678-1234567890ab',
+                       tenant_id='aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa',
+                       subnets=[fake_subnet1],
+                       ports=[fake_port1]))
         nc = dhcp_agent.NetworkCache()
         nc.put(fake_net)
         nc.put_port(fake_port2)
@@ -946,11 +946,11 @@ class TestNetworkCache(base.BaseTestCase):
         self.assertIn(fake_port2, fake_net.ports)
 
     def test_put_port_existing(self):
-        fake_net = dhcp.NetModel(True,
-                                 dict(id='12345678-1234-5678-1234567890ab',
-                                 tenant_id='aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa',
-                                 subnets=[fake_subnet1],
-                                 ports=[fake_port1, fake_port2]))
+        fake_net = dhcp.NetModel(
+            True, dict(id='12345678-1234-5678-1234567890ab',
+                       tenant_id='aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa',
+                       subnets=[fake_subnet1],
+                       ports=[fake_port1, fake_port2]))
         nc = dhcp_agent.NetworkCache()
         nc.put(fake_net)
         nc.put_port(fake_port2)
@@ -959,11 +959,11 @@ class TestNetworkCache(base.BaseTestCase):
         self.assertIn(fake_port2, fake_net.ports)
 
     def test_remove_port_existing(self):
-        fake_net = dhcp.NetModel(True,
-                                 dict(id='12345678-1234-5678-1234567890ab',
-                                 tenant_id='aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa',
-                                 subnets=[fake_subnet1],
-                                 ports=[fake_port1, fake_port2]))
+        fake_net = dhcp.NetModel(
+            True, dict(id='12345678-1234-5678-1234567890ab',
+                       tenant_id='aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa',
+                       subnets=[fake_subnet1],
+                       ports=[fake_port1, fake_port2]))
         nc = dhcp_agent.NetworkCache()
         nc.put(fake_net)
         nc.remove_port(fake_port2)
@@ -1146,12 +1146,13 @@ class TestDeviceManager(base.BaseTestCase):
         self.assertFalse(plugin.update_dhcp_port.called)
 
     def test_destroy(self):
-        fake_net = dhcp.NetModel(True,
-                                 dict(id='12345678-1234-5678-1234567890ab',
-                                 tenant_id='aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa'))
+        fake_net = dhcp.NetModel(
+            True, dict(id='12345678-1234-5678-1234567890ab',
+                       tenant_id='aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa'))
 
-        fake_port = dhcp.DictModel(dict(id='12345678-1234-aaaa-1234567890ab',
-                                   mac_address='aa:bb:cc:dd:ee:ff'))
+        fake_port = dhcp.DictModel(
+            dict(id='12345678-1234-aaaa-1234567890ab',
+                 mac_address='aa:bb:cc:dd:ee:ff'))
 
         with mock.patch('neutron.agent.linux.interface.NullDriver') as dvr_cls:
             mock_driver = mock.MagicMock()
@@ -1172,12 +1173,13 @@ class TestDeviceManager(base.BaseTestCase):
                 [mock.call.release_dhcp_port(fake_net.id, mock.ANY)])
 
     def test_get_interface_name(self):
-        fake_net = dhcp.NetModel(True,
-                                 dict(id='12345678-1234-5678-1234567890ab',
-                                 tenant_id='aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa'))
+        fake_net = dhcp.NetModel(
+            True, dict(id='12345678-1234-5678-1234567890ab',
+                       tenant_id='aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa'))
 
-        fake_port = dhcp.DictModel(dict(id='12345678-1234-aaaa-1234567890ab',
-                                   mac_address='aa:bb:cc:dd:ee:ff'))
+        fake_port = dhcp.DictModel(
+            dict(id='12345678-1234-aaaa-1234567890ab',
+                 mac_address='aa:bb:cc:dd:ee:ff'))
 
         with mock.patch('neutron.agent.linux.interface.NullDriver') as dvr_cls:
             mock_driver = mock.MagicMock()
@@ -1197,9 +1199,9 @@ class TestDeviceManager(base.BaseTestCase):
             self.assertEqual(len(plugin.mock_calls), 0)
 
     def test_get_device_id(self):
-        fake_net = dhcp.NetModel(True,
-                                 dict(id='12345678-1234-5678-1234567890ab',
-                                 tenant_id='aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa'))
+        fake_net = dhcp.NetModel(
+            True, dict(id='12345678-1234-5678-1234567890ab',
+                       tenant_id='aaaaaaaa-aaaa-aaaa-aaaaaaaaaaaa'))
         expected = ('dhcp1ae5f96c-c527-5079-82ea-371a01645457-12345678-1234-'
                     '5678-1234567890ab')
 
index 8ba50ff80d3952c5da8d5365dd52be64eefbaa62..0d1eca44691cf296e20223c7f66a0078c996899f 100644 (file)
@@ -139,7 +139,7 @@ class PortSecurityTestPlugin(db_base_plugin_v2.NeutronDbPluginV2,
                 filters = {'port_id': [id]}
                 security_groups = (super(PortSecurityTestPlugin, self).
                                    _get_port_security_group_bindings(
-                                   context, filters))
+                                       context, filters))
                 if security_groups and not delete_security_groups:
                     raise psec.PortSecurityPortHasSecurityGroup()
 
index d0f6ae0bff6febaccafafba7ce8db203245d7c9d..67ca401949ee72ea47d38de282cf88d89e5661e6 100644 (file)
@@ -1073,7 +1073,7 @@ class TestSecurityGroups(SecurityGroupDBTestCase):
                 with self.security_group() as sg:
                     res = self._create_port(self.fmt, n['network']['id'],
                                             security_groups=(
-                                            [sg['security_group']['id']]))
+                                                [sg['security_group']['id']]))
                     port = self.deserialize(self.fmt, res)
 
                     data = {'port': {'fixed_ips': port['port']['fixed_ips'],
@@ -1094,7 +1094,7 @@ class TestSecurityGroups(SecurityGroupDBTestCase):
                 with self.security_group() as sg:
                     res = self._create_port(self.fmt, n['network']['id'],
                                             security_groups=(
-                                            [sg['security_group']['id']]))
+                                                [sg['security_group']['id']]))
                     port = self.deserialize(self.fmt, res)
 
                     data = {'port': {'fixed_ips': port['port']['fixed_ips'],
@@ -1124,7 +1124,7 @@ class TestSecurityGroups(SecurityGroupDBTestCase):
                 with self.security_group() as sg:
                     res = self._create_port(self.fmt, n['network']['id'],
                                             security_groups=(
-                                            [sg['security_group']['id']]))
+                                                [sg['security_group']['id']]))
                     port = self.deserialize(self.fmt, res)
                     self.assertEqual(port['port'][ext_sg.SECURITYGROUPS][0],
                                      sg['security_group']['id'])
index 004c533af4f9665d23cb0df265625d57a38fb54e..e03119278ae41957f028672ffe5b504f35528497 100644 (file)
@@ -786,8 +786,8 @@ class IptablesFirewallTestCase(base.BaseTestCase):
         calls += [call.add_rule(
                   'ofake_dev', '-m state --state INVALID -j DROP'),
                   call.add_rule(
-                  'ofake_dev',
-                  '-m state --state RELATED,ESTABLISHED -j RETURN')]
+                      'ofake_dev',
+                      '-m state --state RELATED,ESTABLISHED -j RETURN')]
 
         if egress_expected_call:
             calls.append(egress_expected_call)
index 86e43d600578b891820df5e57e14318ae37c7fda..75e5b26446f13cde8dfc74078e6deb59400c0d5b 100644 (file)
@@ -310,7 +310,7 @@ class TestBasicRouterOperations(base.BaseTestCase):
         expected = [['ip', 'route', 'replace', 'to', '110.100.30.0/24',
                     'via', '10.100.10.30'],
                     ['ip', 'route', 'replace', 'to', '110.100.31.0/24',
-                    'via', '10.100.10.30']]
+                     'via', '10.100.10.30']]
 
         self._check_agent_method_called(agent, expected, namespace)
 
index 7842acb6f0f1b404fcd89eb85b09d0fb90a0349d..54fde1a5c319c57e55165ea3b071cb8603863d4c 100644 (file)
@@ -429,7 +429,7 @@ class TestDhcpLocalProcess(TestBase):
     def test_enable(self):
         attrs_to_mock = dict(
             [(a, mock.DEFAULT) for a in
-            ['active', 'get_conf_file_name', 'interface_name']]
+                ['active', 'get_conf_file_name', 'interface_name']]
         )
 
         with mock.patch.multiple(LocalChild, **attrs_to_mock) as mocks:
@@ -586,7 +586,7 @@ class TestDnsmasq(TestBase):
 
         attrs_to_mock = dict(
             [(a, mock.DEFAULT) for a in
-            ['_output_opts_file', 'get_conf_file_name', 'interface_name']]
+                ['_output_opts_file', 'get_conf_file_name', 'interface_name']]
         )
 
         with mock.patch.multiple(dhcp.Dnsmasq, **attrs_to_mock) as mocks:
index 6c4eb5d0c6792259d4a61159d9c2d5cd45d64b5d..7bbbb3ddc2f5c8debb297d82f049706974fb2df0 100644 (file)
@@ -207,7 +207,7 @@ class TestIpWrapper(base.BaseTestCase):
         ip_lib.IPWrapper('sudo').add_veth('tap0', 'tap1')
         self.execute.assert_called_once_with('', 'link',
                                              ('add', 'tap0', 'type', 'veth',
-                                             'peer', 'name', 'tap1'),
+                                              'peer', 'name', 'tap1'),
                                              'sudo', None)
 
     def test_add_veth_with_namespaces(self):
index ca98a55be911d04f95e01209313364b038e59771..32fe1a5189a7f384a65bddcffe5078ce053a45f5 100644 (file)
@@ -610,8 +610,8 @@ class SecurityGroupServerRpcApiTestCase(base.BaseTestCase):
             [call(None,
              {'args':
                  {'devices': ['fake_device']},
-             'method': 'security_group_rules_for_devices',
-             'namespace': None},
+              'method': 'security_group_rules_for_devices',
+              'namespace': None},
              version=sg_rpc.SG_RPC_VERSION,
              topic='fake_topic')])