nova/nova/api/openstack/compute/plugins/v3
ChangBo Guo(gcb) 69fef14509 Performance: leverage dict comprehension in PEP-0274
PEP-0274 introduced dict comprehensions to replace dict constructor
with a sequence of length-2 sequences, these are benefits copied
from [1]:
  The dictionary constructor approach has two distinct disadvantages
  from the proposed syntax though.  First, it isn't as legible as a
  dict comprehension.  Second, it forces the programmer to create an
  in-core list object first, which could be expensive.
Nova dropped python 2.6 support, we can leverage this now.
There is deep dive about PEP-0274[2] and basic tests about
performance[3].
Note: This commit doesn't handle dict constructor with kwagrs.
This commit also adds a hacking rule.

[1]http://legacy.python.org/dev/peps/pep-0274/
[2]http://doughellmann.com/2012/11/12/the-performance-impact-of-using-dict-instead-of-in-cpython-2-7-2.html
[3]http://paste.openstack.org/show/154798/

Change-Id: Ifb5cb05b9cc2b8758d5a8e34f7792470a73d7c40
2015-01-16 10:06:13 +08:00
..
__init__.py API extensions framework for v3 API 2013-05-13 10:31:22 +09:30
access_ips.py Add API schema for v2.1 access_ips extension 2014-09-03 04:17:03 +00:00
admin_actions.py Cleanup in admin_actions(v2.1api) 2015-01-13 17:31:23 +00:00
admin_password.py Log id in raise_http_conflict_for_instance_invalid_state() 2014-10-07 10:22:14 -04:00
agents.py Cleanup v2.1 controller inheritance 2014-11-21 15:07:52 +10:30
aggregates.py Cleanup in ResourceExtension ALIAS(v2.1api) 2014-12-17 15:52:27 +08:00
assisted_volume_snapshots.py Port assisted-volume-snapshots extension to v2.1 2014-11-19 10:09:58 +08:00
attach_interfaces.py Cleanup v2.1 controller inheritance 2014-11-21 15:07:52 +10:30
availability_zone.py Add API schema for v2.1/v3 availability_zone extension 2014-09-02 21:08:08 +09:00
baremetal_nodes.py Nuke XML support from Nova REST API - Phase 2 2015-01-06 12:03:54 +00:00
block_device_mapping.py Add API schema for v2.1 block_device_mapping extension 2014-12-12 15:28:23 +09:00
block_device_mapping_v1.py Add API schema for v2.1 block_device_mapping_v1 2014-12-12 15:37:42 +09:00
cells.py Performance: leverage dict comprehension in PEP-0274 2015-01-16 10:06:13 +08:00
certificates.py Cleanup in ResourceExtension ALIAS(v2.1api) 2014-12-17 15:52:27 +08:00
cloudpipe.py Add API validation schema for cloudpipe api 2014-10-22 16:05:36 +08:00
config_drive.py Merge "Convert v3 config drive plugin to v2.1" 2014-08-25 02:43:16 +00:00
console_auth_tokens.py Performance: leverage dict comprehension in PEP-0274 2015-01-16 10:06:13 +08:00
console_output.py Convert console_output v3 plugin to v2.1 2014-08-28 09:35:40 +09:30
consoles.py Modify v21 alias name for compatible with v2 2014-12-09 12:57:36 +08:00
create_backup.py Log id in raise_http_conflict_for_instance_invalid_state() 2014-10-07 10:22:14 -04:00
deferred_delete.py Use wsgi.response for v2.1 API 2014-10-23 08:51:09 +00:00
disk_config.py Add API validation schema for disk_config 2014-10-28 13:31:26 +09:00
evacuate.py Merge "Use oslo.utils" 2014-10-08 10:59:09 +00:00
extended_availability_zone.py Convert v3 ExtendedAvailabilityZone api to v2.1 2014-09-02 11:54:09 +09:00
extended_server_attributes.py Change v3 extended_server_attibutes to v2.1 2014-08-24 09:09:58 +08:00
extended_status.py Remove unused compute_api in extend_status 2014-10-27 07:52:01 +08:00
extended_volumes.py Merge "Use wsgi.response for v2.1 API" 2014-10-30 00:02:58 +00:00
extension_info.py Cleanup in ResourceExtension ALIAS(v2.1api) 2014-12-17 15:52:27 +08:00
fixed_ips.py Port fixed_ip extention to v2.1 2014-10-21 09:33:49 +08:00
flavor_access.py Remove unused function _get_flavor_refs in flavor_access extension 2015-01-05 13:52:44 +08:00
flavor_manage.py Modify v21 alias name for compatible with v2 2014-12-09 12:57:36 +08:00
flavor_rxtx.py Change v3 flavor_rxtx to v2.1 2014-08-24 03:06:37 +08:00
flavors.py Use oslo.utils 2014-10-06 21:41:17 -04:00
flavors_extraspecs.py Modify v21 alias name for compatible with v2 2014-12-09 12:57:36 +08:00
floating_ip_dns.py Reuse methods from netutils 2014-12-29 14:47:20 +00:00
floating_ip_pools.py Cleanup v2.1 controller inheritance 2014-11-21 15:07:52 +10:30
floating_ips.py Improve error return code of floating_ips in v2/v2.1 api 2014-11-28 13:19:31 +08:00
floating_ips_bulk.py Merge "Error code for creating duplicate floating_ip_bulk" 2014-11-27 14:21:31 +00:00
fping.py Merge "Use common get_instance call in API plugins part 3" 2014-11-25 04:11:24 +00:00
hide_server_addresses.py Removes XML namespace definitions from V3 API plugins 2014-01-31 14:57:35 +10:30
hosts.py Fix the comment of host index api 2015-01-04 14:33:32 +08:00
hypervisors.py Cleanup v2.1 controller inheritance 2014-11-21 15:07:52 +10:30
image_metadata.py Merge "Add api validation schema for image_metadata" 2014-12-02 00:57:38 +00:00
image_size.py Port image-size extension to work in v2.1/v3 framework 2014-09-01 22:27:31 +08:00
images.py Port v2 images extension to work in v2.1(v3) framework 2014-09-01 22:22:06 +08:00
instance_actions.py Changes V3 server_actions extension into v2.1 2014-08-30 17:04:47 +08:00
instance_usage_audit_log.py Performance: leverage dict comprehension in PEP-0274 2015-01-16 10:06:13 +08:00
ips.py Use common get_instance call in API plugins part 3 2014-11-20 11:01:21 +10:30
keypairs.py Cleanup v2.1 controller inheritance 2014-11-21 15:07:52 +10:30
limits.py Performance: leverage dict comprehension in PEP-0274 2015-01-16 10:06:13 +08:00
lock_server.py Use wsgi.response for v2.1 API 2014-10-23 08:51:09 +00:00
migrate_server.py Fix live migration api stuck when migrate to old nova node 2014-11-13 18:25:08 +08:00
migrations.py Cleanup in ResourceExtension ALIAS(v2.1api) 2014-12-17 15:52:27 +08:00
multinic.py Use wsgi.response for v2.1 API 2014-10-23 08:51:09 +00:00
multiple_create.py Add API schema for v2.1/v3 multiple_create extension 2014-09-02 23:09:07 +09:00
networks.py Cleanup in ResourceExtension ALIAS(v2.1api) 2014-12-17 15:52:27 +08:00
networks_associate.py Remove LOG outputs from v2.1 API layer 2014-10-24 04:18:36 +00:00
pause_server.py Use wsgi.response for v2.1 API 2014-10-23 08:51:09 +00:00
pci.py Cleanup v2.1 controller inheritance 2014-11-21 15:07:52 +10:30
personality.py Implement 'personality' plugin for V2.1 2014-11-27 15:02:15 +09:00
quota_classes.py Port v2 quota_classes extension to work in v2.1(v3) framework 2014-11-26 13:56:13 +10:30
quota_sets.py Performance: leverage dict comprehension in PEP-0274 2015-01-16 10:06:13 +08:00
remote_consoles.py api: add serial console API calls v2.1/v3 2014-10-22 21:07:24 +11:00
rescue.py Use wsgi.response for v2.1 unrescue API 2014-10-23 07:51:26 +00:00
scheduler_hints.py Add API schema for v2.1/v3 scheduler_hints extension 2014-11-26 02:23:29 +00:00
security_group_default_rules.py Error code for creating secgroup default rule 2014-12-03 10:05:06 +05:30
security_groups.py Cleanup in ResourceExtension ALIAS(v2.1api) 2014-12-17 15:52:27 +08:00
server_diagnostics.py Merge "Use common get_instance call in API plugins part 3" 2014-11-25 04:11:24 +00:00
server_external_events.py Add API json schema for server_external_event(v2.1) 2014-11-26 12:24:33 +08:00
server_groups.py Merge "initialize objects with context in server groups api" 2014-11-25 22:44:14 +00:00
server_metadata.py Fix URL mapping of server metadata PUT request 2014-12-01 18:23:38 +09:00
server_password.py Cleanup v2.1 controller inheritance 2014-11-21 15:07:52 +10:30
server_usage.py Remove LOG outputs from v2.1 API layer 2014-10-24 04:18:36 +00:00
servers.py Catch InstanceInvalidState for start/stop action 2014-12-31 20:26:58 +00:00
services.py Add API validation schema for services v2.1 plugin 2014-11-20 10:36:25 +09:00
shelve.py Use wsgi.response for v2.1 API 2014-10-23 08:51:09 +00:00
simple_tenant_usage.py Merge "Limit InstanceList join to system_metadata in os-simple-tenant-usage" 2014-12-01 16:32:32 +00:00
suspend_server.py Merge "Use wsgi.response for v2.1 API" 2014-10-30 00:02:58 +00:00
tenant_networks.py Performance: leverage dict comprehension in PEP-0274 2015-01-16 10:06:13 +08:00
used_limits.py Add quotas for Server Groups (V2 API compatibility & V2.1 support) 2014-09-10 16:29:22 +00:00
user_data.py Add API schema for v2.1/v3 user_data extension 2014-09-01 10:00:51 +09:00
versions.py Cleanup v2.1 controller inheritance 2014-11-21 15:07:52 +10:30
virtual_interfaces.py Port virtual-interfaces plugin to v2.1(v3) API 2014-12-01 11:04:08 +08:00
volumes.py Add API validation schema for volume_attachments 2014-12-01 10:21:15 +09:00