def _extend_port_dict_binding(self, context, port):
cfg_vif_type = cfg.CONF.NOVA.vif_type.lower()
- if not cfg_vif_type in (portbindings.VIF_TYPE_OVS,
+ if cfg_vif_type not in (portbindings.VIF_TYPE_OVS,
portbindings.VIF_TYPE_IVS):
LOG.warning(_("Unrecognized vif_type in configuration "
"[%s]. Defaulting to ovs."),
nets = []
for flavor, plugin in self.plugins.items():
if (filters and ext_flavor.FLAVOR_NETWORK in filters and
- not flavor in filters[ext_flavor.FLAVOR_NETWORK]):
+ flavor not in filters[ext_flavor.FLAVOR_NETWORK]):
continue
if filters:
#NOTE: copy each time since a target plugin may modify
if ('device_owner' in kwargs and
kwargs['device_owner'] == constants.DEVICE_OWNER_DHCP and
'host' in kwargs and
- not 'device_id' in kwargs):
+ 'device_id' not in kwargs):
device_id = utils.get_dhcp_agent_device_id(net_id, kwargs['host'])
data['port']['device_id'] = device_id
port_req = self.new_create_request('ports', data, fmt)
def _build_relation(self, src, dst, resource_type, relation):
if relation not in self.MANAGED_RELATIONS[resource_type]:
return # Relation is not desired in output
- if not '_relations' in src or not src['_relations'].get(relation):
+ if '_relations' not in src or not src['_relations'].get(relation):
return # Item does not have relation
relation_data = src['_relations'].get(relation)
dst_relations = dst.get('_relations', {})
def _lswitch_match(res_uuid):
# verify that the switch exist
- if parent_uuid and not parent_uuid in self._fake_lswitch_dict:
+ if parent_uuid and parent_uuid not in self._fake_lswitch_dict:
raise Exception(_("lswitch:%s not found") % parent_uuid)
if (not parent_uuid
or res_dict[res_uuid].get('ls_uuid') == parent_uuid):
def _lrouter_match(res_uuid):
# verify that the router exist
- if parent_uuid and not parent_uuid in self._fake_lrouter_dict:
+ if parent_uuid and parent_uuid not in self._fake_lrouter_dict:
raise Exception(_("lrouter:%s not found") % parent_uuid)
if (not parent_uuid or
res_dict[res_uuid].get('lr_uuid') == parent_uuid):
# E128 continuation line under-indented for visual indent
# E129 visually indented line with same indent as next logical line
# E265 block comment should start with ‘# ‘
-# E713 test for membership should be ‘not in’
# F402 import module shadowed by loop variable
# F811 redefinition of unused variable
# F812 list comprehension redefines name from line
# H405 multi line docstring summary not separated with an empty line
# H904 Wrap long lines in parentheses instead of a backslash
# TODO(marun) H404 multi line docstring should start with a summary
-ignore = E125,E126,E128,E129,E265,E713,F402,F811,F812,H237,H305,H307,H401,H402,H404,H405,H904
+ignore = E125,E126,E128,E129,E265,F402,F811,F812,H237,H305,H307,H401,H402,H404,H405,H904
show-source = true
builtins = _
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools,.ropeproject,rally-scenarios