nova/nova
Eric Fried 8899f8b5b5 Hacking N363: `in (not_a_tuple)`
A few places in the code had conditionals including:

 if something in (element):

which was clearly intended to be

 if something in (element,):

(I.e. `in $tuple`, not `in element` with redundant parens) or just

 if something == element:

Fix those [1] and introduce hacking rule N363 to disallow this kind of
thing in the future.

[1] NOTE: These weren't actually latent bugs because

 'foo' in ('foo')

which is the same as

 'foo' in 'foo'

returns True. In order to be a bug, the left operand would have to be
able to be a substring of the right:

 'foo' in ('foobar')  # True
 'foo' in ('foobar',) # False

...which I don't think is possible in any of the scenarios found.

Change-Id: I950d07eb533e0d43466c58e36b314aaaf8560251
2019-06-07 16:08:12 -05:00
..
api Merge "Avoid lazy-loading instance.flavor in cold migration" 2019-06-03 18:24:34 +00:00
cmd conf: Remove cells v1 options, group 2019-05-29 17:14:13 +01:00
common
compute Merge "Update usage in RT.drop_move_claim during confirm resize" 2019-06-07 12:35:46 +00:00
conductor Merge "Noop CantStartEngineError in targets_cell if API DB not configured" 2019-06-03 21:31:25 +00:00
conf Merge "conf: Remove cells v1 options, group" 2019-06-05 14:27:18 +00:00
console Stop handling cells v1 for console authentication 2019-04-16 18:26:17 +01:00
consoleauth Stop handling cells v1 for console authentication 2019-04-16 18:26:17 +01:00
db Hacking N363: `in (not_a_tuple)` 2019-06-07 16:08:12 -05:00
hacking Hacking N363: `in (not_a_tuple)` 2019-06-07 16:08:12 -05:00
image Share snapshot image membership with instance owner 2019-02-08 18:06:27 -05:00
ipv6
keymgr
locale Imported Translations from Zanata 2019-03-22 06:26:27 +00:00
network Move get_pci_mapping_for_migration to MigrationContext 2019-05-19 12:41:00 +03:00
notifications Remove cells code 2019-05-20 10:29:16 +01:00
objects Merge "Follow up for counting quota usage from placement" 2019-06-04 05:54:29 +00:00
pci Add get_instance_pci_request_from_vif 2019-03-07 11:37:53 +02:00
policies Remove cells code 2019-05-20 10:29:16 +01:00
privsep Add test coverage for nova.privsep.qemu. 2019-04-04 20:44:01 +00:00
scheduler Merge "Add extra logging to request filters" 2019-06-03 15:15:21 +00:00
servicegroup [Trivial fix]Remove unnecessary slash 2019-05-06 16:23:59 +08:00
tests Hacking N363: `in (not_a_tuple)` 2019-06-07 16:08:12 -05:00
virt Hacking N363: `in (not_a_tuple)` 2019-06-07 16:08:12 -05:00
vnc Deprecate the nova-xvpvncproxy service 2018-10-15 10:03:13 +01:00
volume Keep attach_mode as top-level field in _translate_attachment_ref 2019-05-22 09:09:37 +00:00
__init__.py Eventlet monkey patching should be as early as possible 2019-03-22 09:27:16 +00:00
availability_zones.py Always pass HostAPI to get_availability_zones 2019-04-26 15:30:48 -04:00
baserpc.py
block_device.py Add method to generate device names universally 2019-01-15 18:55:11 +00:00
cache_utils.py
config.py Delete the placement code 2019-04-28 20:06:15 +00:00
context.py Merge "Fix target used in nova.policy.check_is_admin" 2019-05-18 02:04:30 +00:00
crypto.py
debugger.py
exception.py Merge "db: Remove cell APIs" 2019-06-04 18:02:45 +00:00
exception_wrapper.py Add full traceback to ExceptionPayload in versioned notifications 2018-06-19 16:46:46 +08:00
filters.py
hooks.py
i18n.py
loadables.py
manager.py
monkey_patch.py Bump to hacking 1.1.0 2019-04-12 16:23:49 +01:00
policy.py Merge "Fix target used in nova.policy.check_is_admin" 2019-05-18 02:04:30 +00:00
profiler.py
quota.py Follow up for counting quota usage from placement 2019-05-31 21:23:58 +00:00
rpc.py Remove unnecessary wrapper 2019-05-29 17:14:13 +01:00
safe_utils.py
service.py Remove 'nova-cells' service 2019-04-09 17:15:37 +01:00
service_auth.py
test.py Merge "Use instance mappings to count server group members" 2019-06-01 02:32:20 +00:00
utils.py Eventlet monkey patching should be as early as possible 2019-03-22 09:27:16 +00:00
version.py
weights.py Per aggregate scheduling weight 2019-01-21 11:48:44 +08:00
wsgi.py