From ac5c913d90ab60ddb50e7ec73d6782b9b6b7e40d Mon Sep 17 00:00:00 2001 From: Andrew Younge Date: Tue, 13 Aug 2013 13:01:47 -0400 Subject: [PATCH 1/3] test commit --- README.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.rst b/README.rst index 0e2a216f014..9c0f61ae085 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,5 @@ + + OpenStack Nova README ===================== From 5fb7ab862587aeb483e5761e6ae874df8dc2ec24 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 13 Aug 2013 14:23:07 -0400 Subject: [PATCH 2/3] Code for PCI-Passthrough with Xen. Tested on hp6 --- HACKING.rst | 107 +- README.rst | 15 +- bin/api-paste.ini | 1 - bin/nova-all | 79 - bin/nova-api | 52 - bin/nova-api-ec2 | 46 - bin/nova-api-metadata | 46 - bin/nova-api-os-compute | 46 - bin/nova-api-os-volume | 46 - bin/nova-cert | 46 - bin/nova-clear-rabbit-queues | 76 - bin/nova-compute | 48 - bin/nova-console | 45 - bin/nova-consoleauth | 46 - bin/nova-dhcpbridge | 128 - bin/nova-manage | 1400 -- bin/nova-network | 48 - bin/nova-novncproxy | 158 - bin/nova-objectstore | 50 - bin/nova-rootwrap | 94 - bin/nova-rpc-zmq-receiver | 78 - bin/nova-scheduler | 50 - bin/nova-volume | 48 - bin/nova-volume-usage-audit | 82 - bin/nova-xvpvncproxy | 48 - contrib/boto_v6/ec2/connection.py | 4 +- contrib/boto_v6/ec2/instance.py | 18 +- contrib/openstack-config | 65 - doc/README.rst | 12 +- .../extended-server-attrs-get.json | 57 - .../extended-server-attrs-get.xml | 19 - .../extended-server-attrs-list.json | 59 - .../extended-server-attrs-list.xml | 21 - .../flavors-extra-data-get-resp.json | 4 +- .../flavors-extra-data-get-resp.xml | 4 +- .../flavors-extra-data-list-resp.json | 4 +- .../flavors-extra-data-list-resp.xml | 4 +- .../flavors-extra-data-post-req.json | 12 +- .../flavors-extra-data-post-req.xml | 4 +- .../flavors-extra-data-post-resp.xml | 2 +- .../all_extensions/extensions-get-resp.json | 306 +- .../all_extensions/extensions-get-resp.xml | 165 +- .../all_extensions/flavor-get-resp.json | 4 +- .../all_extensions/flavor-get-resp.xml | 4 +- .../all_extensions/server-get-resp.json | 21 +- .../all_extensions/server-get-resp.xml | 8 +- .../all_extensions/servers-details-resp.json | 22 +- .../all_extensions/servers-details-resp.xml | 10 +- doc/api_samples/flavor-get-resp.json | 4 +- doc/api_samples/flavor-get-resp.xml | 4 +- doc/api_samples/limit-get-resp.json | 33 +- doc/api_samples/limit-get-resp.xml | 23 +- .../os-cloudpipe/cloud-pipe-create-resp.json | 4 +- .../os-cloudpipe/cloud-pipe-get-resp.json | 16 +- .../security-group-post-req.json | 2 +- .../security-group-post-req.xml | 2 +- .../security-groups-create-resp.json | 2 +- .../security-groups-create-resp.xml | 2 +- .../server_start_stop.xml | 2 +- doc/ext/nova_todo.py | 8 +- doc/source/_ga/layout.html | 6 +- doc/source/conf.py | 21 +- doc/source/devref/addmethod.openstackapi.rst | 2 +- doc/source/devref/aggregates.rst | 6 +- doc/source/devref/architecture.rst | 7 +- doc/source/devref/cloudpipe.rst | 166 - doc/source/devref/compute.rst | 4 +- doc/source/devref/development.environment.rst | 45 +- doc/source/devref/down.sh | 7 - doc/source/devref/filter_scheduler.rst | 124 +- doc/source/devref/il8n.rst | 26 +- doc/source/devref/index.rst | 5 +- doc/source/devref/interfaces | 17 - doc/source/devref/multinic.rst | 39 - doc/source/devref/network.rst | 79 - doc/source/devref/rpc.rst | 10 +- doc/source/devref/scheduler.rst | 10 - doc/source/devref/server.conf.template | 34 - doc/source/devref/threading.rst | 2 +- doc/source/devref/unit_tests.rst | 2 +- doc/source/devref/up.sh | 7 - doc/source/devref/volume.rst | 52 - doc/source/devref/xensmvolume.rst | 88 - doc/source/image_src/multinic_1.odg | Bin 12363 -> 0 bytes doc/source/image_src/multinic_2.odg | Bin 13425 -> 0 bytes doc/source/image_src/multinic_3.odg | Bin 13598 -> 0 bytes doc/source/images/multinic_dhcp.png | Bin 54531 -> 0 bytes doc/source/images/multinic_flat.png | Bin 40871 -> 0 bytes doc/source/images/multinic_vlan.png | Bin 58552 -> 0 bytes doc/source/index.rst | 5 - doc/source/man/nova-all.rst | 2 +- doc/source/man/nova-api-ec2.rst | 2 +- doc/source/man/nova-api-metadata.rst | 2 +- doc/source/man/nova-api-os-compute.rst | 2 +- doc/source/man/nova-api-os-volume.rst | 49 - doc/source/man/nova-api.rst | 2 +- doc/source/man/nova-cert.rst | 4 +- doc/source/man/nova-compute.rst | 2 +- doc/source/man/nova-console.rst | 2 +- doc/source/man/nova-consoleauth.rst | 2 +- doc/source/man/nova-dhcpbridge.rst | 2 +- doc/source/man/nova-manage.rst | 2 +- doc/source/man/nova-network.rst | 2 +- doc/source/man/nova-novncproxy.rst | 12 +- doc/source/man/nova-objectstore.rst | 2 +- doc/source/man/nova-rootwrap.rst | 6 +- doc/source/man/nova-rpc-zmq-receiver.rst | 2 +- doc/source/man/nova-scheduler.rst | 2 +- doc/source/man/nova-volume-usage-audit.rst | 61 - doc/source/man/nova-volume.rst | 54 - doc/source/man/nova-xvpvncproxy.rst | 2 +- etc/nova/api-paste.ini | 35 +- etc/nova/logging_sample.conf | 16 +- etc/nova/nova.conf.sample | 3609 ++-- etc/nova/policy.json | 276 +- etc/nova/rootwrap.conf | 20 + etc/nova/rootwrap.d/api-metadata.filters | 12 +- etc/nova/rootwrap.d/compute.filters | 175 +- etc/nova/rootwrap.d/network.filters | 45 +- etc/nova/rootwrap.d/volume.filters | 33 - nova/__init__.py | 11 - nova/api/auth.py | 38 +- nova/api/ec2/__init__.py | 89 +- nova/api/ec2/apirequest.py | 17 +- nova/api/ec2/cloud.py | 646 +- nova/api/ec2/ec2utils.py | 141 +- nova/api/ec2/faults.py | 6 +- nova/api/manager.py | 7 +- nova/api/metadata/__init__.py | 2 +- nova/api/metadata/base.py | 129 +- nova/api/metadata/handler.py | 151 +- nova/api/openstack/__init__.py | 250 +- nova/api/openstack/auth.py | 12 +- nova/api/openstack/common.py | 112 +- nova/api/openstack/compute/__init__.py | 161 +- nova/api/openstack/compute/consoles.py | 19 +- .../api/openstack/compute/contrib/__init__.py | 15 +- .../compute/contrib/admin_actions.py | 61 +- .../openstack/compute/contrib/aggregates.py | 82 +- .../compute/contrib/availability_zone.py | 161 +- .../openstack/compute/contrib/certificates.py | 24 +- .../openstack/compute/contrib/cloudpipe.py | 21 +- .../openstack/compute/contrib/config_drive.py | 9 +- .../compute/contrib/console_output.py | 10 +- .../api/openstack/compute/contrib/consoles.py | 36 +- .../compute/contrib/createserverext.py | 6 +- .../compute/contrib/deferred_delete.py | 10 +- .../openstack/compute/contrib/disk_config.py | 10 +- .../contrib/extended_server_attributes.py | 24 +- .../compute/contrib/extended_status.py | 9 +- .../compute/contrib/flavor_access.py | 40 +- .../compute/contrib/flavor_disabled.py | 2 +- .../openstack/compute/contrib/flavor_rxtx.py | 2 +- .../openstack/compute/contrib/flavor_swap.py | 2 +- .../compute/contrib/flavorextradata.py | 4 +- .../compute/contrib/flavorextraspecs.py | 56 +- .../openstack/compute/contrib/flavormanage.py | 34 +- .../compute/contrib/floating_ip_dns.py | 66 +- .../compute/contrib/floating_ip_pools.py | 6 +- .../openstack/compute/contrib/floating_ips.py | 130 +- nova/api/openstack/compute/contrib/hosts.py | 393 +- .../openstack/compute/contrib/hypervisors.py | 45 +- .../contrib/instance_usage_audit_log.py | 22 +- .../api/openstack/compute/contrib/keypairs.py | 23 +- .../api/openstack/compute/contrib/multinic.py | 4 +- .../compute/contrib/multiple_create.py | 6 +- .../api/openstack/compute/contrib/networks.py | 182 - .../compute/contrib/quota_classes.py | 9 +- nova/api/openstack/compute/contrib/quotas.py | 113 +- nova/api/openstack/compute/contrib/rescue.py | 20 +- .../compute/contrib/scheduler_hints.py | 9 +- .../compute/contrib/security_groups.py | 343 +- .../compute/contrib/server_diagnostics.py | 4 +- .../compute/contrib/server_start_stop.py | 21 +- .../compute/contrib/simple_tenant_usage.py | 61 +- .../openstack/compute/contrib/used_limits.py | 46 +- .../openstack/compute/contrib/user_data.py | 6 +- .../compute/contrib/virtual_interfaces.py | 4 +- nova/api/openstack/compute/contrib/volumes.py | 139 +- .../openstack/compute/contrib/volumetypes.py | 225 - nova/api/openstack/compute/extensions.py | 22 +- nova/api/openstack/compute/flavors.py | 44 +- nova/api/openstack/compute/image_metadata.py | 14 +- nova/api/openstack/compute/images.py | 18 +- nova/api/openstack/compute/ips.py | 8 +- nova/api/openstack/compute/limits.py | 63 +- nova/api/openstack/compute/server_metadata.py | 30 +- nova/api/openstack/compute/servers.py | 339 +- nova/api/openstack/compute/versions.py | 6 +- nova/api/openstack/compute/views/addresses.py | 8 +- nova/api/openstack/compute/views/flavors.py | 2 +- nova/api/openstack/compute/views/images.py | 13 +- nova/api/openstack/compute/views/limits.py | 4 +- nova/api/openstack/compute/views/servers.py | 48 +- nova/api/openstack/compute/views/versions.py | 9 +- nova/api/openstack/extensions.py | 146 +- nova/api/openstack/urlmap.py | 5 +- nova/api/openstack/volume/__init__.py | 64 - nova/api/openstack/volume/contrib/__init__.py | 39 - .../openstack/volume/contrib/admin_actions.py | 129 - .../openstack/volume/contrib/image_create.py | 31 - .../volume/contrib/types_extra_specs.py | 149 - .../openstack/volume/contrib/types_manage.py | 91 - .../volume/contrib/volume_actions.py | 131 - nova/api/openstack/volume/extensions.py | 34 - nova/api/openstack/volume/snapshots.py | 185 - nova/api/openstack/volume/types.py | 80 - nova/api/openstack/volume/versions.py | 83 - nova/api/openstack/volume/views/__init__.py | 16 - nova/api/openstack/volume/views/types.py | 34 - nova/api/openstack/volume/views/versions.py | 36 - nova/api/openstack/volume/volumes.py | 364 - nova/api/openstack/wsgi.py | 121 +- nova/api/openstack/xmlutil.py | 78 +- nova/api/sizelimit.py | 54 +- nova/api/validator.py | 15 +- nova/block_device.py | 218 +- nova/cert/__init__.py | 2 +- nova/cert/manager.py | 24 +- nova/cert/rpcapi.py | 32 +- nova/cloudpipe/__init__.py | 3 - nova/cloudpipe/pipelib.py | 74 +- nova/common/deprecated.py | 55 - nova/common/eventlet_backdoor.py | 80 - nova/common/memorycache.py | 64 - nova/common/sqlalchemyutils.py | 128 - nova/compat/__init__.py | 15 - nova/compat/flagfile.py | 188 - nova/compute/__init__.py | 87 +- nova/compute/api.py | 2130 ++- nova/compute/instance_types.py | 187 - nova/compute/manager.py | 3821 ++-- nova/compute/resource_tracker.py | 640 +- nova/compute/rpcapi.py | 273 +- nova/compute/stats.py | 10 +- nova/compute/task_states.py | 16 +- nova/compute/utils.py | 215 +- nova/compute/vm_mode.py | 4 +- nova/compute/vm_states.py | 3 +- nova/console/api.py | 15 +- nova/console/fake.py | 2 +- nova/console/manager.py | 30 +- nova/console/rpcapi.py | 32 +- nova/console/vmrc.py | 12 +- nova/console/vmrc_manager.py | 32 +- nova/console/xvp.py | 46 +- nova/consoleauth/__init__.py | 9 +- nova/consoleauth/manager.py | 83 +- nova/consoleauth/rpcapi.py | 39 +- nova/context.py | 93 +- nova/crypto.py | 181 +- nova/db/api.py | 1101 +- nova/db/base.py | 11 +- nova/db/migration.py | 2 +- nova/db/sqlalchemy/__init__.py | 8 + nova/db/sqlalchemy/api.py | 5079 +++--- nova/db/sqlalchemy/migrate_repo/__init__.py | 2 +- nova/db/sqlalchemy/migrate_repo/manage.py | 2 +- .../migrate_repo/versions/082_essex.py | 1059 -- .../migrate_repo/versions/083_quota_class.py | 63 - .../versions/084_quotas_unlimited.py | 42 - .../085_add_index_to_fixed_ips_by_address.py | 33 - .../versions/086_set_engine_mysql_innodb.py | 44 - .../087_add_uuid_to_bw_usage_cache.py | 58 - ...ance_id_to_uuid_in_block_device_mapping.py | 80 - .../versions/088_sqlite_downgrade.sql | 97 - .../versions/088_sqlite_upgrade.sql | 97 - .../versions/089_add_volume_id_mappings.py | 117 - .../versions/090_modify_volume_id_datatype.py | 237 - .../versions/090_sqlite_downgrade.sql | 226 - .../versions/090_sqlite_upgrade.sql | 226 - .../091_convert_volume_ids_to_uuid.py | 218 - .../092_add_instance_system_metadata.py | 73 - .../093_drop_instance_actions_table.py | 54 - .../094_update_postgresql_sequence_names.py | 54 - .../095_change_fk_instance_id_to_uuid.py | 94 - .../versions/095_sqlite_downgrade.sql | 133 - .../versions/095_sqlite_upgrade.sql | 132 - .../versions/096_recreate_dns_domains.py | 145 - .../versions/097_quota_usages_reservations.py | 106 - .../versions/098_update_volume_attach_time.py | 72 - .../099_add_disabled_instance_types.py | 40 - .../100_instance_metadata_uses_uuid.py | 80 - .../versions/100_sqlite_downgrade.sql | 64 - .../versions/100_sqlite_upgrade.sql | 64 - ...ty_group_instance_association_uses_uuid.py | 80 - .../versions/101_sqlite_downgrade.sql | 61 - .../versions/101_sqlite_upgrade.sql | 61 - .../versions/102_consoles_uses_uuid.py | 80 - .../versions/102_sqlite_downgrade.sql | 72 - .../versions/102_sqlite_upgrade.sql | 72 - .../versions/103_instance_indexes.py | 43 - .../versions/104_instance_indexes_2.py | 43 - .../versions/104_sqlite_downgrade.sql | 1 - .../versions/104_sqlite_upgrade.sql | 1 - .../105_instance_info_caches_uses_uuid.py | 70 - .../versions/105_sqlite_downgrade.sql | 50 - .../versions/105_sqlite_upgrade.sql | 50 - .../versions/106_add_foreign_keys.py | 67 - .../versions/106_sqlite_downgrade.sql | 1 - .../versions/106_sqlite_upgrade.sql | 1 - .../versions/107_add_instance_id_mappings.py | 67 - .../migrate_repo/versions/108_task_log.py | 62 - .../109_drop_dns_domains_project_id_fkey.py | 63 - .../versions/109_sqlite_downgrade.sql | 53 - .../versions/109_sqlite_upgrade.sql | 52 - .../versions/110_drop_deprecated_auth.py | 189 - .../versions/111_general_aggregates.py | 72 - .../112_update_deleted_instance_data.py | 69 - .../versions/113_fixed_ips_uses_uuid.py | 108 - .../versions/113_sqlite_downgrade.sql | 85 - .../versions/113_sqlite_upgrade.sql | 85 - .../versions/114_sqlite_downgrade.sql | 71 - .../versions/114_sqlite_upgrade.sql | 71 - .../versions/114_vifs_uses_uuid.py | 108 - .../115_make_user_quotas_key_and_value.py | 94 - .../116_drop_user_quotas_key_and_value.py | 98 - .../versions/117_add_compute_node_stats.py | 61 - .../118_add_indexes_to_agent_builds.py | 44 - .../119_add_indexes_to_aggregate_metadata.py | 42 - ...120_add_indexes_to_block_device_mapping.py | 71 - .../121_add_indexes_to_bw_usage_cache.py | 59 - .../122_add_indexes_to_certificates.py | 59 - .../123_add_indexes_to_dns_domains.py | 44 - .../versions/124_add_indexes_to_fixed_ips.py | 76 - .../125_add_indexes_to_floating_ips.py | 68 - .../126_add_indexes_to_instance_faults.py | 44 - ...dd_indexes_to_instance_type_extra_specs.py | 44 - .../versions/128_add_indexes_to_instances.py | 96 - .../129_add_indexes_to_iscsi_targets.py | 57 - .../versions/130_add_indexes_to_key_pairs.py | 44 - .../versions/131_add_indexes_to_networks.py | 107 - .../132_add_instance_type_projects.py | 149 - .../versions/133_aggregate_delete_fix.py | 48 - .../134_add_counters_to_bw_usage_cache.py | 6 +- .../migrate_repo/versions/__init__.py | 2 +- nova/db/sqlalchemy/migration.py | 11 +- nova/db/sqlalchemy/models.py | 832 +- nova/db/sqlalchemy/session.py | 222 - nova/exception.py | 571 +- nova/flags.py | 427 - nova/image/glance.py | 110 +- nova/image/s3.py | 195 +- nova/ipv6/__init__.py | 2 +- nova/ipv6/account_identifier.py | 2 +- nova/ipv6/api.py | 11 +- nova/ipv6/rfc2462.py | 2 +- nova/locale/bs/LC_MESSAGES/nova.po | 10586 +++++++----- nova/locale/cs/LC_MESSAGES/nova.po | 14015 ++++++++------- nova/locale/da/LC_MESSAGES/nova.po | 10519 ++++++----- nova/locale/de/LC_MESSAGES/nova.po | 10814 +++++++----- nova/locale/en_AU/LC_MESSAGES/nova.po | 11920 +++++++------ nova/locale/en_GB/LC_MESSAGES/nova.po | 11339 +++++++----- nova/locale/en_US/LC_MESSAGES/nova.po | 14372 +++++++++------- nova/locale/es/LC_MESSAGES/nova.po | 11724 +++++++------ nova/locale/fr/LC_MESSAGES/nova.po | 11890 +++++++------ nova/locale/it/LC_MESSAGES/nova.po | 10938 +++++++----- nova/locale/ja/LC_MESSAGES/nova.po | 11885 +++++++------ nova/locale/ko/LC_MESSAGES/nova.po | 10885 +++++++----- nova/locale/nb/LC_MESSAGES/nova.po | 10607 +++++++----- nova/locale/nova.pot | 10499 ++++++----- nova/locale/pt_BR/LC_MESSAGES/nova.po | 11777 +++++++------ nova/locale/ru/LC_MESSAGES/nova.po | 13180 ++++++++------ nova/locale/tl/LC_MESSAGES/nova.po | 10539 ++++++----- nova/locale/tr/LC_MESSAGES/nova.po | 10505 ++++++----- nova/locale/uk/LC_MESSAGES/nova.po | 10718 +++++++----- nova/locale/zh_CN/LC_MESSAGES/nova.po | 13810 ++++++++------- nova/locale/zh_TW/LC_MESSAGES/nova.po | 10783 +++++++----- nova/manager.py | 169 +- nova/network/__init__.py | 21 +- nova/network/api.py | 531 +- nova/network/dns_driver.py | 18 +- nova/network/l3.py | 69 +- nova/network/ldapdns.py | 58 +- nova/network/linux_net.py | 766 +- nova/network/manager.py | 1393 +- nova/network/minidns.py | 84 +- nova/network/model.py | 163 +- nova/network/nova_ipam_lib.py | 6 +- nova/network/quantum/nova_ipam_lib.py | 277 - nova/network/quantumv2/__init__.py | 68 +- nova/network/quantumv2/api.py | 679 +- nova/network/sg.py | 159 - nova/notifications.py | 101 +- nova/objectstore/__init__.py | 6 - nova/objectstore/s3server.py | 42 +- nova/openstack/__init__.py | 15 - nova/openstack/common/__init__.py | 15 - nova/openstack/common/cfg.py | 1653 -- nova/openstack/common/context.py | 13 +- nova/openstack/common/excutils.py | 8 +- nova/openstack/common/gettextutils.py | 201 +- nova/openstack/common/importutils.py | 12 +- nova/openstack/common/iniparser.py | 130 - nova/openstack/common/jsonutils.py | 100 +- nova/openstack/common/local.py | 13 +- nova/openstack/common/log.py | 245 +- nova/openstack/common/network_utils.py | 5 +- nova/openstack/common/notifier/__init__.py | 2 +- nova/openstack/common/notifier/api.py | 17 +- .../openstack/common/notifier/log_notifier.py | 4 +- .../common/notifier/no_op_notifier.py | 2 +- .../common/notifier/rabbit_notifier.py | 31 +- .../common/notifier/test_notifier.py | 2 +- nova/openstack/common/plugin/__init__.py | 14 - .../openstack/common/plugin/callbackplugin.py | 93 - nova/openstack/common/plugin/plugin.py | 86 - nova/openstack/common/plugin/pluginmanager.py | 76 - nova/openstack/common/policy.py | 841 +- nova/openstack/common/rpc/__init__.py | 85 +- nova/openstack/common/rpc/amqp.py | 325 +- nova/openstack/common/rpc/common.py | 243 +- nova/openstack/common/rpc/dispatcher.py | 74 +- nova/openstack/common/rpc/impl_fake.py | 27 +- nova/openstack/common/rpc/impl_kombu.py | 131 +- nova/openstack/common/rpc/impl_qpid.py | 352 +- nova/openstack/common/rpc/impl_zmq.py | 385 +- nova/openstack/common/rpc/matchmaker.py | 191 +- nova/openstack/common/rpc/proxy.py | 82 +- nova/openstack/common/setup.py | 358 - nova/openstack/common/timeutils.py | 90 +- nova/policy.py | 83 +- nova/quota.py | 406 +- nova/rootwrap/__init__.py | 16 - nova/rootwrap/filters.py | 151 - nova/rootwrap/wrapper.py | 72 - nova/scheduler/__init__.py | 2 +- nova/scheduler/arch.py | 325 - nova/scheduler/chance.py | 42 +- nova/scheduler/driver.py | 265 +- nova/scheduler/filter_scheduler.py | 347 +- nova/scheduler/filters/__init__.py | 76 +- nova/scheduler/filters/affinity_filter.py | 44 +- .../filters/aggregate_instance_extra_specs.py | 10 +- nova/scheduler/filters/all_hosts_filter.py | 2 +- .../filters/availability_zone_filter.py | 23 +- .../filters/compute_capabilities_filter.py | 26 +- nova/scheduler/filters/compute_filter.py | 24 +- nova/scheduler/filters/core_filter.py | 70 +- nova/scheduler/filters/disk_filter.py | 20 +- nova/scheduler/filters/extra_specs_ops.py | 2 +- nova/scheduler/filters/image_props_filter.py | 16 +- nova/scheduler/filters/io_ops_filter.py | 18 +- .../filters/isolated_hosts_filter.py | 38 +- nova/scheduler/filters/json_filter.py | 6 +- nova/scheduler/filters/ram_filter.py | 74 +- nova/scheduler/filters/retry_filter.py | 19 +- nova/scheduler/filters/trusted_filter.py | 176 +- nova/scheduler/filters/type_filter.py | 4 +- nova/scheduler/host_manager.py | 288 +- nova/scheduler/least_cost.py | 117 - nova/scheduler/manager.py | 259 +- nova/scheduler/multi.py | 81 - nova/scheduler/rpcapi.py | 61 +- nova/scheduler/scheduler_options.py | 27 +- nova/scheduler/simple.py | 97 - nova/service.py | 541 +- nova/test.py | 501 +- nova/testing/README.rst | 86 - nova/testing/__init__.py | 0 nova/tests/__init__.py | 100 +- nova/tests/api/__init__.py | 2 +- nova/tests/api/ec2/__init__.py | 2 +- nova/tests/api/ec2/test_cinder_cloud.py | 258 +- nova/tests/api/ec2/test_cloud.py | 1483 +- nova/tests/api/ec2/test_ec2_validate.py | 111 +- nova/tests/api/ec2/test_faults.py | 4 +- nova/tests/api/ec2/test_middleware.py | 29 +- nova/tests/api/openstack/__init__.py | 2 +- nova/tests/api/openstack/common.py | 4 +- nova/tests/api/openstack/compute/__init__.py | 2 +- .../api/openstack/compute/contrib/__init__.py | 2 +- .../compute/contrib/test_admin_actions.py | 273 +- .../compute/contrib/test_aggregates.py | 79 +- .../compute/contrib/test_certificates.py | 2 +- .../compute/contrib/test_cloudpipe.py | 17 +- .../compute/contrib/test_config_drive.py | 17 +- .../compute/contrib/test_console_output.py | 47 +- .../compute/contrib/test_consoles.py | 127 +- .../compute/contrib/test_createserverext.py | 166 +- .../compute/contrib/test_deferred_delete.py | 52 +- .../compute/contrib/test_disk_config.py | 14 +- .../test_extended_server_attributes.py | 34 +- .../compute/contrib/test_extended_status.py | 15 +- .../compute/contrib/test_flavor_access.py | 139 +- .../compute/contrib/test_flavor_disabled.py | 21 +- .../compute/contrib/test_flavor_manage.py | 53 +- .../compute/contrib/test_flavor_rxtx.py | 21 +- .../compute/contrib/test_flavor_swap.py | 22 +- .../compute/contrib/test_flavorextradata.py | 22 +- .../contrib/test_flavors_extra_specs.py | 73 +- .../compute/contrib/test_floating_ip_dns.py | 104 +- .../compute/contrib/test_floating_ips.py | 342 +- .../openstack/compute/contrib/test_hosts.py | 252 +- .../compute/contrib/test_hypervisors.py | 16 +- .../contrib/test_instance_usage_audit_log.py | 18 +- .../compute/contrib/test_keypairs.py | 84 +- .../compute/contrib/test_multinic_xs.py | 15 +- .../compute/contrib/test_networks.py | 91 +- .../compute/contrib/test_quota_classes.py | 45 +- .../openstack/compute/contrib/test_quotas.py | 244 +- .../openstack/compute/contrib/test_rescue.py | 39 +- .../compute/contrib/test_scheduler_hints.py | 8 +- .../compute/contrib/test_security_groups.py | 408 +- .../contrib/test_server_diagnostics.py | 19 +- .../compute/contrib/test_server_start_stop.py | 53 +- .../contrib/test_simple_tenant_usage.py | 141 +- .../compute/contrib/test_snapshots.py | 158 +- .../compute/contrib/test_used_limits.py | 160 +- .../contrib/test_virtual_interfaces.py | 8 +- .../compute/contrib/test_volume_types.py | 224 - .../contrib/test_volume_types_extra_specs.py | 198 - .../openstack/compute/contrib/test_volumes.py | 204 +- .../openstack/compute/extensions/__init__.py | 2 +- .../compute/extensions/foxinsocks.py | 4 +- nova/tests/api/openstack/compute/test_api.py | 4 +- nova/tests/api/openstack/compute/test_auth.py | 2 +- .../api/openstack/compute/test_consoles.py | 15 +- .../api/openstack/compute/test_extensions.py | 108 +- .../api/openstack/compute/test_flavors.py | 93 +- .../openstack/compute/test_image_metadata.py | 11 +- .../api/openstack/compute/test_images.py | 57 +- .../api/openstack/compute/test_limits.py | 128 +- .../openstack/compute/test_server_actions.py | 337 +- .../openstack/compute/test_server_metadata.py | 114 +- .../api/openstack/compute/test_servers.py | 1546 +- .../api/openstack/compute/test_urlmap.py | 37 +- .../api/openstack/compute/test_versions.py | 63 +- nova/tests/api/openstack/fakes.py | 155 +- nova/tests/api/openstack/test_common.py | 77 +- nova/tests/api/openstack/test_faults.py | 18 +- nova/tests/api/openstack/test_wsgi.py | 134 +- nova/tests/api/openstack/test_xmlutil.py | 63 +- nova/tests/api/openstack/volume/__init__.py | 19 - .../api/openstack/volume/contrib/__init__.py | 19 - .../volume/contrib/test_admin_actions.py | 184 - .../volume/contrib/test_types_extra_specs.py | 226 - .../volume/contrib/test_types_manage.py | 122 - .../volume/contrib/test_volume_actions.py | 162 - .../openstack/volume/extensions/__init__.py | 15 - .../openstack/volume/extensions/foxinsocks.py | 94 - .../api/openstack/volume/test_extensions.py | 155 - .../tests/api/openstack/volume/test_router.py | 112 - .../api/openstack/volume/test_snapshots.py | 299 - nova/tests/api/openstack/volume/test_types.py | 194 - .../api/openstack/volume/test_volumes.py | 602 - nova/tests/api/test_auth.py | 8 +- nova/tests/api/test_sizelimit.py | 67 +- nova/tests/api/test_validator.py | 8 - nova/tests/api/test_wsgi.py | 2 +- nova/tests/baremetal/__init__.py | 0 nova/tests/baremetal/test_proxy_bare_metal.py | 269 - nova/tests/baremetal/test_tilera.py | 84 - nova/tests/cert/__init__.py | 2 +- nova/tests/cert/test_rpcapi.py | 11 +- nova/tests/compute/__init__.py | 2 +- nova/tests/compute/fake_resource_tracker.py | 5 +- nova/tests/compute/test_compute.py | 7125 ++++++-- nova/tests/compute/test_compute_utils.py | 174 +- nova/tests/compute/test_resource_tracker.py | 847 +- nova/tests/compute/test_rpcapi.py | 112 +- nova/tests/compute/test_stats.py | 6 +- nova/tests/console/__init__.py | 2 +- nova/tests/console/test_console.py | 21 +- nova/tests/console/test_rpcapi.py | 43 +- nova/tests/consoleauth/__init__.py | 2 +- nova/tests/consoleauth/test_consoleauth.py | 137 +- nova/tests/consoleauth/test_rpcapi.py | 31 +- nova/tests/db/fakes.py | 89 +- nova/tests/declare_flags.py | 23 - nova/tests/fake_flags.py | 52 - nova/tests/fake_imagebackend.py | 52 - nova/tests/fake_ldap.py | 18 +- nova/tests/fake_libvirt_utils.py | 120 - nova/tests/fake_network.py | 91 +- nova/tests/fake_network_cache_model.py | 3 +- nova/tests/fake_utils.py | 98 +- nova/tests/fake_volume.py | 89 +- nova/tests/fakelibvirt.py | 864 - nova/tests/glance/stubs.py | 8 +- nova/tests/hyperv/__init__.py | 0 nova/tests/hyperv/basetestcase.py | 96 - nova/tests/hyperv/db_fakes.py | 166 - nova/tests/hyperv/hypervutils.py | 245 - nova/tests/hyperv/mockproxy.py | 234 - nova/tests/hyperv/stubs/README.rst | 2 - ...perVAPITestCase.test_attach_volume_os.p.gz | Bin 670 -> 0 bytes ...estCase.test_attach_volume_subprocess.p.gz | Bin 2768 -> 0 bytes ...rVAPITestCase.test_attach_volume_time.p.gz | Bin 257 -> 0 bytes ...rVAPITestCase.test_attach_volume_uuid.p.gz | Bin 660 -> 0 bytes ...ume_with_target_connection_failure_os.p.gz | Bin 702 -> 0 bytes ..._target_connection_failure_subprocess.p.gz | Bin 571 -> 0 bytes ...e_with_target_connection_failure_time.p.gz | Bin 277 -> 0 bytes ...e_with_target_connection_failure_uuid.p.gz | Bin 652 -> 0 bytes ...me_with_target_connection_failure_wmi.p.gz | Bin 23220 -> 0 bytes ...erVAPITestCase.test_attach_volume_wmi.p.gz | Bin 28631 -> 0 bytes ...Case.test_boot_from_volume_subprocess.p.gz | Bin 385 -> 0 bytes ...PITestCase.test_boot_from_volume_time.p.gz | Bin 260 -> 0 bytes ...PITestCase.test_boot_from_volume_uuid.p.gz | Bin 578 -> 0 bytes ...APITestCase.test_boot_from_volume_wmi.p.gz | Bin 20274 -> 0 bytes ...perVAPITestCase.test_detach_volume_os.p.gz | Bin 725 -> 0 bytes ...estCase.test_detach_volume_subprocess.p.gz | Bin 426 -> 0 bytes ...rVAPITestCase.test_detach_volume_time.p.gz | Bin 257 -> 0 bytes ...rVAPITestCase.test_detach_volume_uuid.p.gz | Bin 660 -> 0 bytes ...erVAPITestCase.test_detach_volume_wmi.p.gz | Bin 31833 -> 0 bytes ...erVAPITestCase.test_live_migration_os.p.gz | Bin 726 -> 0 bytes ...VAPITestCase.test_live_migration_time.p.gz | Bin 250 -> 0 bytes ...VAPITestCase.test_live_migration_uuid.p.gz | Bin 621 -> 0 bytes ...live_migration_with_target_failure_os.p.gz | Bin 744 -> 0 bytes ...ve_migration_with_target_failure_time.p.gz | Bin 267 -> 0 bytes ...ve_migration_with_target_failure_uuid.p.gz | Bin 640 -> 0 bytes ...ive_migration_with_target_failure_wmi.p.gz | Bin 25238 -> 0 bytes ...rVAPITestCase.test_live_migration_wmi.p.gz | Bin 29404 -> 0 bytes ...perVAPITestCase.test_attach_volume_os.p.gz | Bin 722 -> 0 bytes ...APITestCase.test_attach_volume_shutil.p.gz | Bin 289 -> 0 bytes ...estCase.test_attach_volume_subprocess.p.gz | Bin 2797 -> 0 bytes ...rVAPITestCase.test_attach_volume_time.p.gz | Bin 276 -> 0 bytes ...rVAPITestCase.test_attach_volume_uuid.p.gz | Bin 674 -> 0 bytes ...ume_with_target_connection_failure_os.p.gz | Bin 755 -> 0 bytes ...with_target_connection_failure_shutil.p.gz | Bin 320 -> 0 bytes ..._target_connection_failure_subprocess.p.gz | Bin 591 -> 0 bytes ...e_with_target_connection_failure_time.p.gz | Bin 290 -> 0 bytes ...e_with_target_connection_failure_uuid.p.gz | Bin 658 -> 0 bytes ...me_with_target_connection_failure_wmi.p.gz | Bin 22780 -> 0 bytes ...erVAPITestCase.test_attach_volume_wmi.p.gz | Bin 28844 -> 0 bytes ...TestCase.test_boot_from_volume_shutil.p.gz | Bin 292 -> 0 bytes ...Case.test_boot_from_volume_subprocess.p.gz | Bin 2800 -> 0 bytes ...PITestCase.test_boot_from_volume_time.p.gz | Bin 275 -> 0 bytes ...PITestCase.test_boot_from_volume_uuid.p.gz | Bin 592 -> 0 bytes ...APITestCase.test_boot_from_volume_wmi.p.gz | Bin 19845 -> 0 bytes ...api.HyperVAPITestCase.test_destroy_os.p.gz | Bin 748 -> 0 bytes ...HyperVAPITestCase.test_destroy_shutil.p.gz | Bin 283 -> 0 bytes ...i.HyperVAPITestCase.test_destroy_time.p.gz | Bin 253 -> 0 bytes ...i.HyperVAPITestCase.test_destroy_uuid.p.gz | Bin 627 -> 0 bytes ...pi.HyperVAPITestCase.test_destroy_wmi.p.gz | Bin 24040 -> 0 bytes ...perVAPITestCase.test_detach_volume_os.p.gz | Bin 723 -> 0 bytes ...APITestCase.test_detach_volume_shutil.p.gz | Bin 289 -> 0 bytes ...estCase.test_detach_volume_subprocess.p.gz | Bin 2798 -> 0 bytes ...rVAPITestCase.test_detach_volume_time.p.gz | Bin 275 -> 0 bytes ...rVAPITestCase.test_detach_volume_uuid.p.gz | Bin 671 -> 0 bytes ...erVAPITestCase.test_detach_volume_wmi.p.gz | Bin 29537 -> 0 bytes ...et_available_resource_multiprocessing.p.gz | Bin 270 -> 0 bytes ...se.test_get_available_resource_shutil.p.gz | Bin 298 -> 0 bytes ...tCase.test_get_available_resource_wmi.p.gz | Bin 1013 -> 0 bytes ...pi.HyperVAPITestCase.test_get_info_os.p.gz | Bin 717 -> 0 bytes ...yperVAPITestCase.test_get_info_shutil.p.gz | Bin 284 -> 0 bytes ....HyperVAPITestCase.test_get_info_time.p.gz | Bin 254 -> 0 bytes ....HyperVAPITestCase.test_get_info_uuid.p.gz | Bin 626 -> 0 bytes ...i.HyperVAPITestCase.test_get_info_wmi.p.gz | Bin 23400 -> 0 bytes ...ase.test_list_instances_detail_shutil.p.gz | Bin 277 -> 0 bytes ...stCase.test_list_instances_detail_wmi.p.gz | Bin 7893 -> 0 bytes ...PITestCase.test_list_instances_shutil.p.gz | Bin 290 -> 0 bytes ...rVAPITestCase.test_list_instances_wmi.p.gz | Bin 1300 -> 0 bytes ...erVAPITestCase.test_live_migration_os.p.gz | Bin 603 -> 0 bytes ...PITestCase.test_live_migration_shutil.p.gz | Bin 290 -> 0 bytes ...VAPITestCase.test_live_migration_time.p.gz | Bin 260 -> 0 bytes ...VAPITestCase.test_live_migration_uuid.p.gz | Bin 631 -> 0 bytes ...live_migration_with_target_failure_os.p.gz | Bin 621 -> 0 bytes ..._migration_with_target_failure_shutil.p.gz | Bin 310 -> 0 bytes ...ve_migration_with_target_failure_time.p.gz | Bin 280 -> 0 bytes ...ve_migration_with_target_failure_uuid.p.gz | Bin 649 -> 0 bytes ...ive_migration_with_target_failure_wmi.p.gz | Bin 23876 -> 0 bytes ...rVAPITestCase.test_live_migration_wmi.p.gz | Bin 26172 -> 0 bytes ...TestCase.test_pause_already_paused_os.p.gz | Bin 728 -> 0 bytes ...Case.test_pause_already_paused_shutil.p.gz | Bin 296 -> 0 bytes ...stCase.test_pause_already_paused_time.p.gz | Bin 266 -> 0 bytes ...stCase.test_pause_already_paused_uuid.p.gz | Bin 638 -> 0 bytes ...estCase.test_pause_already_paused_wmi.p.gz | Bin 23490 -> 0 bytes ...rvapi.HyperVAPITestCase.test_pause_os.p.gz | Bin 716 -> 0 bytes ...i.HyperVAPITestCase.test_pause_shutil.p.gz | Bin 281 -> 0 bytes ...api.HyperVAPITestCase.test_pause_time.p.gz | Bin 251 -> 0 bytes ...api.HyperVAPITestCase.test_pause_uuid.p.gz | Bin 624 -> 0 bytes ...vapi.HyperVAPITestCase.test_pause_wmi.p.gz | Bin 23350 -> 0 bytes ...test_power_off_already_powered_off_os.p.gz | Bin 740 -> 0 bytes ..._power_off_already_powered_off_shutil.p.gz | Bin 305 -> 0 bytes ...st_power_off_already_powered_off_time.p.gz | Bin 275 -> 0 bytes ...st_power_off_already_powered_off_uuid.p.gz | Bin 646 -> 0 bytes ...est_power_off_already_powered_off_wmi.p.gz | Bin 23323 -> 0 bytes ...i.HyperVAPITestCase.test_power_off_os.p.gz | Bin 719 -> 0 bytes ...perVAPITestCase.test_power_off_shutil.p.gz | Bin 285 -> 0 bytes ...HyperVAPITestCase.test_power_off_time.p.gz | Bin 255 -> 0 bytes ...HyperVAPITestCase.test_power_off_uuid.p.gz | Bin 625 -> 0 bytes ....HyperVAPITestCase.test_power_off_wmi.p.gz | Bin 23258 -> 0 bytes ...Case.test_power_on_already_running_os.p.gz | Bin 734 -> 0 bytes ....test_power_on_already_running_shutil.p.gz | Bin 300 -> 0 bytes ...se.test_power_on_already_running_time.p.gz | Bin 270 -> 0 bytes ...se.test_power_on_already_running_uuid.p.gz | Bin 640 -> 0 bytes ...ase.test_power_on_already_running_wmi.p.gz | Bin 23305 -> 0 bytes ...pi.HyperVAPITestCase.test_power_on_os.p.gz | Bin 718 -> 0 bytes ...yperVAPITestCase.test_power_on_shutil.p.gz | Bin 284 -> 0 bytes ....HyperVAPITestCase.test_power_on_time.p.gz | Bin 254 -> 0 bytes ....HyperVAPITestCase.test_power_on_uuid.p.gz | Bin 626 -> 0 bytes ...i.HyperVAPITestCase.test_power_on_wmi.p.gz | Bin 23962 -> 0 bytes ....test_pre_live_migration_cow_image_os.p.gz | Bin 536 -> 0 bytes ...t_pre_live_migration_cow_image_shutil.p.gz | Bin 304 -> 0 bytes ...est_pre_live_migration_cow_image_time.p.gz | Bin 273 -> 0 bytes ...est_pre_live_migration_cow_image_uuid.p.gz | Bin 335 -> 0 bytes ...test_pre_live_migration_cow_image_wmi.p.gz | Bin 1382 -> 0 bytes ...re_live_migration_no_cow_image_shutil.p.gz | Bin 307 -> 0 bytes ..._pre_live_migration_no_cow_image_uuid.p.gz | Bin 337 -> 0 bytes ...t_pre_live_migration_no_cow_image_wmi.p.gz | Bin 849 -> 0 bytes ...vapi.HyperVAPITestCase.test_reboot_os.p.gz | Bin 717 -> 0 bytes ....HyperVAPITestCase.test_reboot_shutil.p.gz | Bin 282 -> 0 bytes ...pi.HyperVAPITestCase.test_reboot_time.p.gz | Bin 252 -> 0 bytes ...pi.HyperVAPITestCase.test_reboot_uuid.p.gz | Bin 623 -> 0 bytes ...api.HyperVAPITestCase.test_reboot_wmi.p.gz | Bin 23931 -> 0 bytes ...stCase.test_resume_already_running_os.p.gz | Bin 733 -> 0 bytes ...se.test_resume_already_running_shutil.p.gz | Bin 298 -> 0 bytes ...Case.test_resume_already_running_time.p.gz | Bin 268 -> 0 bytes ...Case.test_resume_already_running_uuid.p.gz | Bin 640 -> 0 bytes ...tCase.test_resume_already_running_wmi.p.gz | Bin 23341 -> 0 bytes ...vapi.HyperVAPITestCase.test_resume_os.p.gz | Bin 716 -> 0 bytes ....HyperVAPITestCase.test_resume_shutil.p.gz | Bin 282 -> 0 bytes ...pi.HyperVAPITestCase.test_resume_time.p.gz | Bin 252 -> 0 bytes ...pi.HyperVAPITestCase.test_resume_uuid.p.gz | Bin 623 -> 0 bytes ...api.HyperVAPITestCase.test_resume_wmi.p.gz | Bin 24291 -> 0 bytes ...pi.HyperVAPITestCase.test_snapshot_os.p.gz | Bin 1012 -> 0 bytes ...yperVAPITestCase.test_snapshot_shutil.p.gz | Bin 416 -> 0 bytes ....HyperVAPITestCase.test_snapshot_time.p.gz | Bin 254 -> 0 bytes ....HyperVAPITestCase.test_snapshot_uuid.p.gz | Bin 667 -> 0 bytes ....test_snapshot_with_update_failure_os.p.gz | Bin 1033 -> 0 bytes ...t_snapshot_with_update_failure_shutil.p.gz | Bin 437 -> 0 bytes ...est_snapshot_with_update_failure_time.p.gz | Bin 274 -> 0 bytes ...est_snapshot_with_update_failure_uuid.p.gz | Bin 688 -> 0 bytes ...test_snapshot_with_update_failure_wmi.p.gz | Bin 24794 -> 0 bytes ...i.HyperVAPITestCase.test_snapshot_wmi.p.gz | Bin 24505 -> 0 bytes ...rVAPITestCase.test_spawn_cow_image_os.p.gz | Bin 724 -> 0 bytes ...ITestCase.test_spawn_cow_image_shutil.p.gz | Bin 291 -> 0 bytes ...APITestCase.test_spawn_cow_image_time.p.gz | Bin 261 -> 0 bytes ...APITestCase.test_spawn_cow_image_uuid.p.gz | Bin 631 -> 0 bytes ...VAPITestCase.test_spawn_cow_image_wmi.p.gz | Bin 24716 -> 0 bytes ...PITestCase.test_spawn_no_cow_image_os.p.gz | Bin 607 -> 0 bytes ...stCase.test_spawn_no_cow_image_shutil.p.gz | Bin 294 -> 0 bytes ...TestCase.test_spawn_no_cow_image_time.p.gz | Bin 264 -> 0 bytes ...TestCase.test_spawn_no_cow_image_uuid.p.gz | Bin 635 -> 0 bytes ...ITestCase.test_spawn_no_cow_image_wmi.p.gz | Bin 24420 -> 0 bytes ...se.test_spawn_no_vswitch_exception_os.p.gz | Bin 737 -> 0 bytes ...est_spawn_no_vswitch_exception_shutil.p.gz | Bin 302 -> 0 bytes ....test_spawn_no_vswitch_exception_time.p.gz | Bin 271 -> 0 bytes ....test_spawn_no_vswitch_exception_uuid.p.gz | Bin 558 -> 0 bytes ...e.test_spawn_no_vswitch_exception_wmi.p.gz | Bin 17307 -> 0 bytes ...ase.test_suspend_already_suspended_os.p.gz | Bin 734 -> 0 bytes ...test_suspend_already_suspended_shutil.p.gz | Bin 301 -> 0 bytes ...e.test_suspend_already_suspended_time.p.gz | Bin 271 -> 0 bytes ...e.test_suspend_already_suspended_uuid.p.gz | Bin 643 -> 0 bytes ...se.test_suspend_already_suspended_wmi.p.gz | Bin 24133 -> 0 bytes ...api.HyperVAPITestCase.test_suspend_os.p.gz | Bin 717 -> 0 bytes ...HyperVAPITestCase.test_suspend_shutil.p.gz | Bin 283 -> 0 bytes ...i.HyperVAPITestCase.test_suspend_time.p.gz | Bin 253 -> 0 bytes ...i.HyperVAPITestCase.test_suspend_uuid.p.gz | Bin 623 -> 0 bytes ...pi.HyperVAPITestCase.test_suspend_wmi.p.gz | Bin 23864 -> 0 bytes ...tCase.test_unpause_already_running_os.p.gz | Bin 735 -> 0 bytes ...e.test_unpause_already_running_shutil.p.gz | Bin 299 -> 0 bytes ...ase.test_unpause_already_running_time.p.gz | Bin 269 -> 0 bytes ...ase.test_unpause_already_running_uuid.p.gz | Bin 640 -> 0 bytes ...Case.test_unpause_already_running_wmi.p.gz | Bin 23690 -> 0 bytes ...api.HyperVAPITestCase.test_unpause_os.p.gz | Bin 717 -> 0 bytes ...HyperVAPITestCase.test_unpause_shutil.p.gz | Bin 283 -> 0 bytes ...i.HyperVAPITestCase.test_unpause_time.p.gz | Bin 253 -> 0 bytes ...i.HyperVAPITestCase.test_unpause_uuid.p.gz | Bin 626 -> 0 bytes ...pi.HyperVAPITestCase.test_unpause_wmi.p.gz | Bin 24099 -> 0 bytes nova/tests/image/__init__.py | 2 +- nova/tests/image/fake.py | 50 +- nova/tests/image/test_fake.py | 7 +- nova/tests/image/test_glance.py | 80 +- nova/tests/image/test_s3.py | 79 +- nova/tests/integrated/api/client.py | 2 +- .../extended-server-attrs-get.json.tpl | 57 - .../extended-server-attrs-get.xml.tpl | 19 - .../extended-server-attrs-list.json.tpl | 59 - .../extended-server-attrs-list.xml.tpl | 21 - .../flavors-extra-data-get-resp.json.tpl | 12 +- .../flavors-extra-data-get-resp.xml.tpl | 8 +- .../flavors-extra-data-list-resp.json.tpl | 24 +- .../flavors-extra-data-list-resp.xml.tpl | 24 +- .../flavors-extra-data-post-req.json.tpl | 16 +- .../flavors-extra-data-post-req.xml.tpl | 8 +- .../flavors-extra-data-post-resp.json.tpl | 10 +- .../flavors-extra-data-post-resp.xml.tpl | 8 +- nova/tests/integrated/api_samples/README.rst | 20 +- .../extensions-get-resp.json.tpl | 230 +- .../extensions-get-resp.xml.tpl | 87 +- .../all_extensions/flavor-get-resp.json.tpl | 4 +- .../all_extensions/flavor-get-resp.xml.tpl | 2 +- .../server-action-reboot.json.tpl | 2 +- .../server-action-rebuild-resp.xml.tpl | 8 +- .../server-action-rebuild.xml.tpl | 2 +- .../all_extensions/server-get-resp.json.tpl | 9 +- .../all_extensions/server-get-resp.xml.tpl | 5 +- .../servers-details-resp.json.tpl | 9 +- .../servers-details-resp.xml.tpl | 7 +- .../api_samples/flavor-get-resp.json.tpl | 2 +- .../api_samples/flavor-get-resp.xml.tpl | 2 +- .../api_samples/flavors-list-resp.json.tpl | 2 +- .../api_samples/limit-get-resp.json.tpl | 15 +- .../api_samples/limit-get-resp.xml.tpl | 5 +- .../api_samples/server-action-reboot.json.tpl | 2 +- .../server-action-rebuild-resp.xml.tpl | 10 +- nova/tests/integrated/integrated_helpers.py | 26 +- nova/tests/integrated/test_api_samples.py | 3353 +++- nova/tests/integrated/test_extensions.py | 13 +- nova/tests/integrated/test_login.py | 4 +- .../tests/integrated/test_multiprocess_api.py | 81 +- nova/tests/integrated/test_servers.py | 78 +- nova/tests/integrated/test_volumes.py | 181 - nova/tests/integrated/test_xml.py | 4 +- nova/tests/monkey_patch_example/__init__.py | 4 +- nova/tests/monkey_patch_example/example_a.py | 2 +- nova/tests/monkey_patch_example/example_b.py | 2 +- nova/tests/network/__init__.py | 2 +- nova/tests/network/test_api.py | 203 +- nova/tests/network/test_linux_net.py | 417 +- nova/tests/network/test_manager.py | 1136 +- nova/tests/network/test_network_info.py | 143 +- nova/tests/network/test_quantumv2.py | 872 +- nova/tests/policy.json | 198 - nova/tests/rpc/test_kombu.py | 395 - nova/tests/runtime_flags.py | 23 - nova/tests/scheduler/__init__.py | 2 +- nova/tests/scheduler/fakes.py | 64 +- nova/tests/scheduler/test_chance_scheduler.py | 78 +- nova/tests/scheduler/test_filter_scheduler.py | 444 +- nova/tests/scheduler/test_host_filters.py | 735 +- nova/tests/scheduler/test_host_manager.py | 481 +- nova/tests/scheduler/test_least_cost.py | 103 - nova/tests/scheduler/test_multi_scheduler.py | 127 - nova/tests/scheduler/test_rpcapi.py | 27 +- nova/tests/scheduler/test_scheduler.py | 787 +- .../tests/scheduler/test_scheduler_options.py | 5 +- nova/tests/test_api.py | 616 - nova/tests/test_bdm.py | 22 +- nova/tests/test_block_device.py | 158 + nova/tests/test_cinder.py | 78 +- nova/tests/test_compat_flagfile.py | 175 - nova/tests/test_configdrive2.py | 45 +- nova/tests/test_context.py | 29 +- nova/tests/test_crypto.py | 97 +- nova/tests/test_db_api.py | 1265 -- nova/tests/test_deprecated.py | 46 - nova/tests/test_exception.py | 67 +- nova/tests/test_fakelibvirt.py | 405 - nova/tests/test_flags.py | 90 - nova/tests/test_gpu.py | 133 - nova/tests/test_hypervapi.py | 471 - nova/tests/test_imagebackend.py | 389 - nova/tests/test_imagecache.py | 900 - nova/tests/test_instance_types.py | 365 - nova/tests/test_instance_types_extra_specs.py | 98 +- nova/tests/test_iptables_network.py | 179 +- nova/tests/test_ipv6.py | 5 +- nova/tests/test_iscsi.py | 121 - nova/tests/test_libvirt.py | 3920 ----- nova/tests/test_libvirt_config.py | 707 - nova/tests/test_libvirt_vif.py | 172 - nova/tests/test_metadata.py | 288 +- nova/tests/test_migrations.conf | 9 - nova/tests/test_migrations.py | 505 - nova/tests/test_misc.py | 158 - nova/tests/test_netapp.py | 1380 -- nova/tests/test_netapp_nfs.py | 234 - nova/tests/test_nexenta.py | 278 - nova/tests/test_nfs.py | 569 - nova/tests/test_notifications.py | 50 +- nova/tests/test_nova_manage.py | 91 +- nova/tests/test_nova_rootwrap.py | 129 - nova/tests/test_objectstore.py | 26 +- nova/tests/test_pipelib.py | 20 +- nova/tests/test_plugin_api_extensions.py | 88 - nova/tests/test_policy.py | 110 +- nova/tests/test_powervm.py | 165 - nova/tests/test_quota.py | 341 +- nova/tests/test_rbd.py | 161 - nova/tests/test_service.py | 143 +- nova/tests/test_skip_examples.py | 47 - nova/tests/test_solidfire.py | 208 - nova/tests/test_storwize_svc.py | 1376 -- nova/tests/test_test.py | 9 +- nova/tests/test_test_utils.py | 8 +- nova/tests/test_utils.py | 547 +- nova/tests/test_versions.py | 77 +- nova/tests/test_virt.py | 196 - nova/tests/test_virt_drivers.py | 565 - nova/tests/test_vmmode.py | 49 - nova/tests/test_vmwareapi.py | 268 - nova/tests/test_volume.py | 929 - nova/tests/test_volume_types.py | 167 - nova/tests/test_volume_types_extra_specs.py | 130 - nova/tests/test_volume_utils.py | 91 - nova/tests/test_wsgi.py | 137 +- nova/tests/test_xenapi.py | 2916 ---- nova/tests/test_xensm.py | 143 - nova/tests/utils.py | 179 +- nova/tests/vmwareapi/__init__.py | 21 - nova/tests/vmwareapi/db_fakes.py | 104 - nova/tests/vmwareapi/stubs.py | 51 - nova/tests/volume/__init__.py | 2 +- nova/tests/volume/test_HpSanISCSIDriver.py | 209 - nova/tests/xenapi/__init__.py | 20 - nova/tests/xenapi/stubs.py | 380 - nova/tests/xenapi/test_vm_utils.py | 45 - nova/tests/xenapi/vm_rrd.xml | 1101 -- nova/utils.py | 945 +- nova/version.py | 82 +- nova/virt/baremetal/__init__.py | 9 +- nova/virt/baremetal/dom.py | 266 - nova/virt/baremetal/driver.py | 1120 +- nova/virt/baremetal/fake.py | 155 +- nova/virt/baremetal/nodes.py | 42 - nova/virt/baremetal/tilera.py | 607 +- nova/virt/configdrive.py | 92 +- nova/virt/connection.py | 85 - nova/virt/disk/api.py | 466 +- nova/virt/disk/guestfs.py | 121 - nova/virt/disk/loop.py | 42 - nova/virt/disk/mount.py | 162 - nova/virt/disk/nbd.py | 111 - nova/virt/driver.py | 421 +- nova/virt/fake.py | 261 +- nova/virt/firewall.py | 168 +- nova/virt/gpu/__init__.py | 18 - nova/virt/gpu/driver.py | 714 - nova/virt/gpu/utils.py | 339 - nova/virt/hyperv/__init__.py | 16 + nova/virt/hyperv/baseops.py | 61 - nova/virt/hyperv/constants.py | 32 +- nova/virt/hyperv/driver.py | 196 +- nova/virt/hyperv/ioutils.py | 26 - nova/virt/hyperv/livemigrationops.py | 161 +- nova/virt/hyperv/snapshotops.py | 201 +- nova/virt/hyperv/vmops.py | 821 +- nova/virt/hyperv/vmutils.py | 536 +- nova/virt/hyperv/volumeops.py | 384 +- nova/virt/hyperv/volumeutils.py | 136 +- nova/virt/images.py | 167 +- nova/virt/libvirt/__init__.py | 6 +- nova/virt/libvirt/config.py | 311 +- nova/virt/libvirt/driver.py | 3009 ++-- nova/virt/libvirt/firewall.py | 159 +- nova/virt/libvirt/imagebackend.py | 278 +- nova/virt/libvirt/imagecache.py | 380 +- nova/virt/libvirt/utils.py | 475 +- nova/virt/libvirt/vif.py | 825 +- nova/virt/libvirt/volume.py | 845 +- nova/virt/libvirt/volume_nfs.py | 96 - nova/virt/netutils.py | 131 +- nova/virt/powervm/__init__.py | 6 +- nova/virt/powervm/command.py | 17 +- nova/virt/powervm/common.py | 168 +- nova/virt/powervm/constants.py | 16 +- nova/virt/powervm/driver.py | 261 +- nova/virt/powervm/exception.py | 15 +- nova/virt/powervm/lpar.py | 8 +- nova/virt/powervm/operator.py | 748 +- nova/virt/vif.py | 34 - nova/virt/vmwareapi/__init__.py | 7 +- nova/virt/vmwareapi/driver.py | 367 +- nova/virt/vmwareapi/error_util.py | 2 +- nova/virt/vmwareapi/fake.py | 229 +- nova/virt/vmwareapi/io_util.py | 37 +- nova/virt/vmwareapi/network_utils.py | 170 - nova/virt/vmwareapi/read_write_util.py | 34 +- nova/virt/vmwareapi/vif.py | 95 +- nova/virt/vmwareapi/vim.py | 184 +- nova/virt/vmwareapi/vim_util.py | 2 +- nova/virt/vmwareapi/vm_util.py | 483 +- nova/virt/vmwareapi/vmops.py | 1020 +- nova/virt/vmwareapi/vmware_images.py | 37 +- nova/virt/xenapi/__init__.py | 4 +- nova/virt/xenapi/agent.py | 391 +- nova/virt/xenapi/driver.py | 286 +- nova/virt/xenapi/fake.py | 111 +- nova/virt/xenapi/firewall.py | 30 +- nova/virt/xenapi/host.py | 96 +- nova/virt/xenapi/pool.py | 141 +- nova/virt/xenapi/pool_states.py | 18 +- nova/virt/xenapi/vif.py | 32 +- nova/virt/xenapi/vm_utils.py | 999 +- nova/virt/xenapi/vmops.py | 1138 +- nova/virt/xenapi/volume_utils.py | 280 +- nova/virt/xenapi/volumeops.py | 342 +- nova/vnc/__init__.py | 11 +- nova/vnc/xvp_proxy.py | 20 +- nova/volume/__init__.py | 15 +- nova/volume/api.py | 511 - nova/volume/cinder.py | 194 +- nova/volume/driver.py | 958 - nova/volume/iscsi.py | 233 - nova/volume/manager.py | 452 - nova/volume/netapp.py | 1291 -- nova/volume/netapp_nfs.py | 267 - nova/volume/nexenta/__init__.py | 33 - nova/volume/nexenta/jsonrpc.py | 84 - nova/volume/nexenta/volume.py | 282 - nova/volume/nfs.py | 293 - nova/volume/san.py | 649 - nova/volume/solidfire.py | 424 - nova/volume/storwize_svc.py | 1233 -- nova/volume/utils.py | 84 - nova/volume/volume_types.py | 125 - nova/volume/xensm.py | 249 - nova/wsgi.py | 141 +- openstack-common.conf | 36 +- .../networking/etc/init.d/host-rules | 2 +- .../networking/etc/init.d/openvswitch-nova | 2 +- .../etc/xensource/scripts/novalib.py | 6 +- .../scripts/ovs_configure_base_flows.py | 2 +- .../scripts/ovs_configure_vif_flows.py | 2 +- .../etc/xensource/scripts/vif_rules.py | 2 +- plugins/xenserver/xenapi/contrib/build-rpm.sh | 6 +- .../rpmbuild/SPECS/openstack-xen-plugins.spec | 6 +- .../xenserver/xenapi/etc/xapi.d/plugins/agent | 2 +- .../xenapi/etc/xapi.d/plugins/bandwidth | 4 +- .../xenapi/etc/xapi.d/plugins/glance | 34 +- .../xenapi/etc/xapi.d/plugins/kernel | 4 +- .../xenapi/etc/xapi.d/plugins/migration | 25 +- .../xenapi/etc/xapi.d/plugins/utils.py | 101 +- .../xenapi/etc/xapi.d/plugins/workarounds | 2 +- .../xenapi/etc/xapi.d/plugins/xenhost | 4 +- .../xenapi/etc/xapi.d/plugins/xenstore.py | 12 +- root@bespin101 | 1 - run_tests.sh | 231 +- scripts/nova-install.sh | 292 - scripts/openrc | 23 - scripts/openrc.example | 52 - scripts/openstack-nova-api | 126 - scripts/openstack-nova-compute | 132 - scripts/openstack-nova-network | 131 - scripts/openstack-nova-objectstore | 117 - scripts/openstack-nova-scheduler | 117 - scripts/openstack-nova-volume | 123 - scripts/placeholder | 1 - setup.cfg | 84 +- setup.py | 72 +- smoketests/__init__.py | 6 - smoketests/base.py | 33 +- smoketests/public_network_smoketests.py | 3 +- smoketests/run_tests.py | 6 +- smoketests/test_netadmin.py | 2 +- smoketests/test_sysadmin.py | 19 +- tools/conf/analyze_opts.py | 6 +- tools/conf/extract_opts.py | 188 - tools/conf/generate_sample.sh | 16 +- tools/db/schema_diff.py | 4 +- tools/enable-pre-commit-hook.sh | 2 +- tools/esx/guest_tool.py | 4 +- tools/hacking.py | 484 - tools/install_venv.py | 233 +- tools/lintstack.py | 6 +- tools/lintstack.sh | 41 +- tools/pip-requires | 23 - tools/test-requires | 15 - tools/with_venv.sh | 9 +- tools/xenserver/destroy_cached_images.py | 15 +- tools/xenserver/vdi_chain_cleanup.py | 2 +- tools/xenserver/vm_vdi_cleaner.py | 39 +- tox.ini | 41 +- 1056 files changed, 200973 insertions(+), 189815 deletions(-) delete mode 120000 bin/api-paste.ini delete mode 100755 bin/nova-all delete mode 100755 bin/nova-api delete mode 100755 bin/nova-api-ec2 delete mode 100755 bin/nova-api-metadata delete mode 100755 bin/nova-api-os-compute delete mode 100755 bin/nova-api-os-volume delete mode 100755 bin/nova-cert delete mode 100755 bin/nova-clear-rabbit-queues delete mode 100755 bin/nova-compute delete mode 100755 bin/nova-console delete mode 100755 bin/nova-consoleauth delete mode 100755 bin/nova-dhcpbridge delete mode 100755 bin/nova-manage delete mode 100755 bin/nova-network delete mode 100755 bin/nova-novncproxy delete mode 100755 bin/nova-objectstore delete mode 100755 bin/nova-rootwrap delete mode 100755 bin/nova-rpc-zmq-receiver delete mode 100755 bin/nova-scheduler delete mode 100755 bin/nova-volume delete mode 100755 bin/nova-volume-usage-audit delete mode 100755 bin/nova-xvpvncproxy delete mode 100755 contrib/openstack-config delete mode 100644 doc/api_samples/OS-EXT-SRV-ATTR/extended-server-attrs-get.json delete mode 100644 doc/api_samples/OS-EXT-SRV-ATTR/extended-server-attrs-get.xml delete mode 100644 doc/api_samples/OS-EXT-SRV-ATTR/extended-server-attrs-list.json delete mode 100644 doc/api_samples/OS-EXT-SRV-ATTR/extended-server-attrs-list.xml delete mode 100644 doc/source/devref/cloudpipe.rst delete mode 100644 doc/source/devref/down.sh delete mode 100644 doc/source/devref/interfaces delete mode 100644 doc/source/devref/multinic.rst delete mode 100644 doc/source/devref/server.conf.template delete mode 100644 doc/source/devref/up.sh delete mode 100644 doc/source/devref/volume.rst delete mode 100644 doc/source/devref/xensmvolume.rst delete mode 100644 doc/source/image_src/multinic_1.odg delete mode 100644 doc/source/image_src/multinic_2.odg delete mode 100644 doc/source/image_src/multinic_3.odg delete mode 100644 doc/source/images/multinic_dhcp.png delete mode 100644 doc/source/images/multinic_flat.png delete mode 100644 doc/source/images/multinic_vlan.png delete mode 100644 doc/source/man/nova-api-os-volume.rst delete mode 100644 doc/source/man/nova-volume-usage-audit.rst delete mode 100644 doc/source/man/nova-volume.rst delete mode 100644 etc/nova/rootwrap.d/volume.filters delete mode 100644 nova/api/openstack/compute/contrib/networks.py delete mode 100644 nova/api/openstack/compute/contrib/volumetypes.py delete mode 100644 nova/api/openstack/volume/__init__.py delete mode 100644 nova/api/openstack/volume/contrib/__init__.py delete mode 100644 nova/api/openstack/volume/contrib/admin_actions.py delete mode 100644 nova/api/openstack/volume/contrib/image_create.py delete mode 100644 nova/api/openstack/volume/contrib/types_extra_specs.py delete mode 100644 nova/api/openstack/volume/contrib/types_manage.py delete mode 100644 nova/api/openstack/volume/contrib/volume_actions.py delete mode 100644 nova/api/openstack/volume/extensions.py delete mode 100644 nova/api/openstack/volume/snapshots.py delete mode 100644 nova/api/openstack/volume/types.py delete mode 100644 nova/api/openstack/volume/versions.py delete mode 100644 nova/api/openstack/volume/views/__init__.py delete mode 100644 nova/api/openstack/volume/views/types.py delete mode 100644 nova/api/openstack/volume/views/versions.py delete mode 100644 nova/api/openstack/volume/volumes.py delete mode 100644 nova/common/deprecated.py delete mode 100644 nova/common/eventlet_backdoor.py delete mode 100644 nova/common/memorycache.py delete mode 100644 nova/common/sqlalchemyutils.py delete mode 100644 nova/compat/__init__.py delete mode 100644 nova/compat/flagfile.py delete mode 100644 nova/compute/instance_types.py mode change 100644 => 100755 nova/compute/manager.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/082_essex.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/083_quota_class.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/084_quotas_unlimited.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/085_add_index_to_fixed_ips_by_address.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/086_set_engine_mysql_innodb.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/087_add_uuid_to_bw_usage_cache.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/088_change_instance_id_to_uuid_in_block_device_mapping.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/088_sqlite_downgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/088_sqlite_upgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/089_add_volume_id_mappings.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/090_modify_volume_id_datatype.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/090_sqlite_downgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/090_sqlite_upgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/091_convert_volume_ids_to_uuid.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/092_add_instance_system_metadata.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/093_drop_instance_actions_table.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/094_update_postgresql_sequence_names.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/095_change_fk_instance_id_to_uuid.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/095_sqlite_downgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/095_sqlite_upgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/096_recreate_dns_domains.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/097_quota_usages_reservations.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/098_update_volume_attach_time.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/099_add_disabled_instance_types.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/100_instance_metadata_uses_uuid.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/100_sqlite_downgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/100_sqlite_upgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/101_security_group_instance_association_uses_uuid.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/101_sqlite_downgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/101_sqlite_upgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/102_consoles_uses_uuid.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/102_sqlite_downgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/102_sqlite_upgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/103_instance_indexes.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/104_instance_indexes_2.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/104_sqlite_downgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/104_sqlite_upgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/105_instance_info_caches_uses_uuid.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/105_sqlite_downgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/105_sqlite_upgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/106_add_foreign_keys.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/106_sqlite_downgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/106_sqlite_upgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/107_add_instance_id_mappings.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/108_task_log.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/109_drop_dns_domains_project_id_fkey.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/109_sqlite_downgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/109_sqlite_upgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/110_drop_deprecated_auth.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/111_general_aggregates.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/112_update_deleted_instance_data.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/113_fixed_ips_uses_uuid.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/113_sqlite_downgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/113_sqlite_upgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/114_sqlite_downgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/114_sqlite_upgrade.sql delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/114_vifs_uses_uuid.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/115_make_user_quotas_key_and_value.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/116_drop_user_quotas_key_and_value.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/117_add_compute_node_stats.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/118_add_indexes_to_agent_builds.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/119_add_indexes_to_aggregate_metadata.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/120_add_indexes_to_block_device_mapping.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/121_add_indexes_to_bw_usage_cache.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/122_add_indexes_to_certificates.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/123_add_indexes_to_dns_domains.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/124_add_indexes_to_fixed_ips.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/125_add_indexes_to_floating_ips.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/126_add_indexes_to_instance_faults.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/127_add_indexes_to_instance_type_extra_specs.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/128_add_indexes_to_instances.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/129_add_indexes_to_iscsi_targets.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/130_add_indexes_to_key_pairs.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/131_add_indexes_to_networks.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/132_add_instance_type_projects.py delete mode 100644 nova/db/sqlalchemy/migrate_repo/versions/133_aggregate_delete_fix.py delete mode 100644 nova/db/sqlalchemy/session.py delete mode 100644 nova/flags.py delete mode 100644 nova/network/quantum/nova_ipam_lib.py delete mode 100644 nova/network/sg.py delete mode 100644 nova/openstack/common/cfg.py delete mode 100644 nova/openstack/common/iniparser.py delete mode 100644 nova/openstack/common/plugin/__init__.py delete mode 100644 nova/openstack/common/plugin/callbackplugin.py delete mode 100644 nova/openstack/common/plugin/plugin.py delete mode 100644 nova/openstack/common/plugin/pluginmanager.py delete mode 100644 nova/openstack/common/setup.py delete mode 100644 nova/rootwrap/__init__.py delete mode 100644 nova/rootwrap/filters.py delete mode 100644 nova/rootwrap/wrapper.py delete mode 100644 nova/scheduler/arch.py delete mode 100644 nova/scheduler/least_cost.py delete mode 100644 nova/scheduler/multi.py delete mode 100644 nova/scheduler/simple.py delete mode 100644 nova/testing/README.rst delete mode 100644 nova/testing/__init__.py delete mode 100644 nova/tests/api/openstack/compute/contrib/test_volume_types.py delete mode 100644 nova/tests/api/openstack/compute/contrib/test_volume_types_extra_specs.py delete mode 100644 nova/tests/api/openstack/volume/__init__.py delete mode 100644 nova/tests/api/openstack/volume/contrib/__init__.py delete mode 100644 nova/tests/api/openstack/volume/contrib/test_admin_actions.py delete mode 100644 nova/tests/api/openstack/volume/contrib/test_types_extra_specs.py delete mode 100644 nova/tests/api/openstack/volume/contrib/test_types_manage.py delete mode 100644 nova/tests/api/openstack/volume/contrib/test_volume_actions.py delete mode 100644 nova/tests/api/openstack/volume/extensions/__init__.py delete mode 100644 nova/tests/api/openstack/volume/extensions/foxinsocks.py delete mode 100644 nova/tests/api/openstack/volume/test_extensions.py delete mode 100644 nova/tests/api/openstack/volume/test_router.py delete mode 100644 nova/tests/api/openstack/volume/test_snapshots.py delete mode 100644 nova/tests/api/openstack/volume/test_types.py delete mode 100644 nova/tests/api/openstack/volume/test_volumes.py delete mode 100644 nova/tests/baremetal/__init__.py delete mode 100644 nova/tests/baremetal/test_proxy_bare_metal.py delete mode 100644 nova/tests/baremetal/test_tilera.py delete mode 100644 nova/tests/declare_flags.py delete mode 100644 nova/tests/fake_flags.py delete mode 100644 nova/tests/fake_imagebackend.py delete mode 100644 nova/tests/fake_libvirt_utils.py delete mode 100644 nova/tests/fakelibvirt.py delete mode 100644 nova/tests/hyperv/__init__.py delete mode 100644 nova/tests/hyperv/basetestcase.py delete mode 100644 nova/tests/hyperv/db_fakes.py delete mode 100644 nova/tests/hyperv/hypervutils.py delete mode 100644 nova/tests/hyperv/mockproxy.py delete mode 100644 nova/tests/hyperv/stubs/README.rst delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_attach_volume_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_attach_volume_subprocess.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_attach_volume_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_attach_volume_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_attach_volume_with_target_connection_failure_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_attach_volume_with_target_connection_failure_subprocess.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_attach_volume_with_target_connection_failure_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_attach_volume_with_target_connection_failure_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_attach_volume_with_target_connection_failure_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_attach_volume_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_boot_from_volume_subprocess.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_boot_from_volume_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_boot_from_volume_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_boot_from_volume_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_detach_volume_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_detach_volume_subprocess.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_detach_volume_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_detach_volume_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_detach_volume_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_live_migration_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_live_migration_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_live_migration_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_live_migration_with_target_failure_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_live_migration_with_target_failure_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_live_migration_with_target_failure_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_live_migration_with_target_failure_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/nova.tests.test_hypervapi.HyperVAPITestCase.test_live_migration_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_attach_volume_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_attach_volume_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_attach_volume_subprocess.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_attach_volume_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_attach_volume_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_attach_volume_with_target_connection_failure_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_attach_volume_with_target_connection_failure_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_attach_volume_with_target_connection_failure_subprocess.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_attach_volume_with_target_connection_failure_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_attach_volume_with_target_connection_failure_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_attach_volume_with_target_connection_failure_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_attach_volume_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_boot_from_volume_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_boot_from_volume_subprocess.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_boot_from_volume_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_boot_from_volume_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_boot_from_volume_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_destroy_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_destroy_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_destroy_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_destroy_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_destroy_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_detach_volume_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_detach_volume_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_detach_volume_subprocess.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_detach_volume_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_detach_volume_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_detach_volume_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_available_resource_multiprocessing.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_available_resource_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_available_resource_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_info_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_info_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_info_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_info_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_get_info_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_list_instances_detail_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_list_instances_detail_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_list_instances_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_list_instances_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_live_migration_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_live_migration_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_live_migration_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_live_migration_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_live_migration_with_target_failure_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_live_migration_with_target_failure_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_live_migration_with_target_failure_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_live_migration_with_target_failure_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_live_migration_with_target_failure_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_live_migration_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_pause_already_paused_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_pause_already_paused_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_pause_already_paused_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_pause_already_paused_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_pause_already_paused_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_pause_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_pause_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_pause_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_pause_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_pause_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_off_already_powered_off_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_off_already_powered_off_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_off_already_powered_off_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_off_already_powered_off_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_off_already_powered_off_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_off_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_off_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_off_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_off_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_off_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_on_already_running_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_on_already_running_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_on_already_running_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_on_already_running_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_on_already_running_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_on_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_on_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_on_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_on_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_power_on_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_pre_live_migration_cow_image_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_pre_live_migration_cow_image_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_pre_live_migration_cow_image_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_pre_live_migration_cow_image_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_pre_live_migration_cow_image_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_pre_live_migration_no_cow_image_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_pre_live_migration_no_cow_image_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_pre_live_migration_no_cow_image_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_reboot_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_reboot_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_reboot_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_reboot_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_reboot_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_resume_already_running_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_resume_already_running_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_resume_already_running_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_resume_already_running_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_resume_already_running_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_resume_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_resume_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_resume_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_resume_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_resume_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_snapshot_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_snapshot_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_snapshot_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_snapshot_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_snapshot_with_update_failure_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_snapshot_with_update_failure_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_snapshot_with_update_failure_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_snapshot_with_update_failure_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_snapshot_with_update_failure_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_snapshot_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_spawn_cow_image_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_spawn_cow_image_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_spawn_cow_image_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_spawn_cow_image_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_spawn_cow_image_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_spawn_no_cow_image_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_spawn_no_cow_image_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_spawn_no_cow_image_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_spawn_no_cow_image_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_spawn_no_cow_image_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_spawn_no_vswitch_exception_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_spawn_no_vswitch_exception_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_spawn_no_vswitch_exception_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_spawn_no_vswitch_exception_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_spawn_no_vswitch_exception_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_suspend_already_suspended_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_suspend_already_suspended_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_suspend_already_suspended_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_suspend_already_suspended_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_suspend_already_suspended_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_suspend_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_suspend_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_suspend_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_suspend_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_suspend_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_unpause_already_running_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_unpause_already_running_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_unpause_already_running_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_unpause_already_running_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_unpause_already_running_wmi.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_unpause_os.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_unpause_shutil.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_unpause_time.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_unpause_uuid.p.gz delete mode 100644 nova/tests/hyperv/stubs/test_hypervapi.HyperVAPITestCase.test_unpause_wmi.p.gz delete mode 100644 nova/tests/integrated/api_samples/OS-EXT-SRV-ATTR/extended-server-attrs-get.json.tpl delete mode 100644 nova/tests/integrated/api_samples/OS-EXT-SRV-ATTR/extended-server-attrs-get.xml.tpl delete mode 100644 nova/tests/integrated/api_samples/OS-EXT-SRV-ATTR/extended-server-attrs-list.json.tpl delete mode 100644 nova/tests/integrated/api_samples/OS-EXT-SRV-ATTR/extended-server-attrs-list.xml.tpl delete mode 100644 nova/tests/integrated/test_volumes.py delete mode 100644 nova/tests/policy.json delete mode 100644 nova/tests/rpc/test_kombu.py delete mode 100644 nova/tests/runtime_flags.py delete mode 100644 nova/tests/scheduler/test_least_cost.py delete mode 100644 nova/tests/scheduler/test_multi_scheduler.py delete mode 100644 nova/tests/test_api.py delete mode 100644 nova/tests/test_compat_flagfile.py delete mode 100644 nova/tests/test_db_api.py delete mode 100644 nova/tests/test_deprecated.py delete mode 100644 nova/tests/test_fakelibvirt.py delete mode 100644 nova/tests/test_flags.py delete mode 100644 nova/tests/test_gpu.py delete mode 100644 nova/tests/test_hypervapi.py delete mode 100644 nova/tests/test_imagebackend.py delete mode 100644 nova/tests/test_imagecache.py delete mode 100644 nova/tests/test_instance_types.py delete mode 100644 nova/tests/test_iscsi.py delete mode 100644 nova/tests/test_libvirt.py delete mode 100644 nova/tests/test_libvirt_config.py delete mode 100644 nova/tests/test_libvirt_vif.py delete mode 100644 nova/tests/test_migrations.conf delete mode 100644 nova/tests/test_migrations.py delete mode 100644 nova/tests/test_misc.py delete mode 100644 nova/tests/test_netapp.py delete mode 100644 nova/tests/test_netapp_nfs.py delete mode 100644 nova/tests/test_nexenta.py delete mode 100644 nova/tests/test_nfs.py delete mode 100644 nova/tests/test_nova_rootwrap.py delete mode 100644 nova/tests/test_plugin_api_extensions.py delete mode 100644 nova/tests/test_powervm.py delete mode 100644 nova/tests/test_rbd.py delete mode 100644 nova/tests/test_skip_examples.py delete mode 100644 nova/tests/test_solidfire.py delete mode 100644 nova/tests/test_storwize_svc.py delete mode 100644 nova/tests/test_virt.py delete mode 100644 nova/tests/test_virt_drivers.py delete mode 100644 nova/tests/test_vmmode.py delete mode 100644 nova/tests/test_vmwareapi.py delete mode 100644 nova/tests/test_volume.py delete mode 100644 nova/tests/test_volume_types.py delete mode 100644 nova/tests/test_volume_types_extra_specs.py delete mode 100644 nova/tests/test_volume_utils.py delete mode 100644 nova/tests/test_xenapi.py delete mode 100644 nova/tests/test_xensm.py delete mode 100644 nova/tests/vmwareapi/__init__.py delete mode 100644 nova/tests/vmwareapi/db_fakes.py delete mode 100644 nova/tests/vmwareapi/stubs.py delete mode 100644 nova/tests/volume/test_HpSanISCSIDriver.py delete mode 100644 nova/tests/xenapi/__init__.py delete mode 100644 nova/tests/xenapi/stubs.py delete mode 100644 nova/tests/xenapi/test_vm_utils.py delete mode 100644 nova/tests/xenapi/vm_rrd.xml delete mode 100644 nova/virt/baremetal/dom.py mode change 100644 => 100755 nova/virt/baremetal/driver.py delete mode 100644 nova/virt/baremetal/nodes.py mode change 100644 => 100755 nova/virt/baremetal/tilera.py delete mode 100644 nova/virt/connection.py mode change 100644 => 100755 nova/virt/disk/api.py delete mode 100644 nova/virt/disk/guestfs.py delete mode 100644 nova/virt/disk/loop.py delete mode 100644 nova/virt/disk/mount.py delete mode 100644 nova/virt/disk/nbd.py mode change 100644 => 100755 nova/virt/driver.py mode change 100644 => 100755 nova/virt/fake.py delete mode 100644 nova/virt/gpu/__init__.py delete mode 100644 nova/virt/gpu/driver.py delete mode 100644 nova/virt/gpu/utils.py delete mode 100644 nova/virt/hyperv/baseops.py mode change 100644 => 100755 nova/virt/hyperv/driver.py delete mode 100644 nova/virt/hyperv/ioutils.py mode change 100644 => 100755 nova/virt/images.py mode change 100644 => 100755 nova/virt/libvirt/driver.py mode change 100644 => 100755 nova/virt/libvirt/imagebackend.py mode change 100644 => 100755 nova/virt/libvirt/utils.py delete mode 100644 nova/virt/libvirt/volume_nfs.py mode change 100644 => 100755 nova/virt/powervm/driver.py delete mode 100644 nova/virt/vif.py mode change 100644 => 100755 nova/virt/vmwareapi/driver.py delete mode 100644 nova/virt/vmwareapi/network_utils.py mode change 100644 => 100755 nova/virt/xenapi/driver.py delete mode 100644 nova/volume/api.py delete mode 100644 nova/volume/driver.py delete mode 100644 nova/volume/iscsi.py delete mode 100644 nova/volume/manager.py delete mode 100644 nova/volume/netapp.py delete mode 100644 nova/volume/netapp_nfs.py delete mode 100644 nova/volume/nexenta/__init__.py delete mode 100644 nova/volume/nexenta/jsonrpc.py delete mode 100644 nova/volume/nexenta/volume.py delete mode 100644 nova/volume/nfs.py delete mode 100644 nova/volume/san.py delete mode 100644 nova/volume/solidfire.py delete mode 100644 nova/volume/storwize_svc.py delete mode 100644 nova/volume/utils.py delete mode 100644 nova/volume/volume_types.py delete mode 100644 nova/volume/xensm.py delete mode 160000 root@bespin101 delete mode 100755 scripts/nova-install.sh delete mode 100755 scripts/openrc delete mode 100755 scripts/openrc.example delete mode 100755 scripts/openstack-nova-api delete mode 100755 scripts/openstack-nova-compute delete mode 100755 scripts/openstack-nova-network delete mode 100755 scripts/openstack-nova-objectstore delete mode 100755 scripts/openstack-nova-scheduler delete mode 100755 scripts/openstack-nova-volume delete mode 100644 scripts/placeholder delete mode 100644 tools/conf/extract_opts.py delete mode 100755 tools/hacking.py delete mode 100644 tools/pip-requires delete mode 100644 tools/test-requires diff --git a/HACKING.rst b/HACKING.rst index 52dc38bf88d..082beb87d7e 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -9,6 +9,7 @@ Nova Style Commandments General ------- - Put two newlines between top-level code (funcs, classes, etc) +- Use only UNIX style newlines ("\n"), not Windows style ("\r\n") - Put one newline between methods in classes and anywhere else - Long lines should be wrapped in parentheses in preference to using a backslash for line continuation. @@ -27,12 +28,33 @@ General mylist = Foo().list() # OKAY, does not shadow built-in +- Use the "is not" operator when testing for unequal identities. Example:: + + if not X is Y: # BAD, intended behavior is ambiguous + pass + + if X is not Y: # OKAY, intuitive + pass + +- Use the "not in" operator for evaluating membership in a collection. Example:: + + if not X in Y: # BAD, intended behavior is ambiguous + pass + + if X not in Y: # OKAY, intuitive + pass + + if not (X in Y or X in Z): # OKAY, still better than all those 'not's + pass + Imports ------- - Do not import objects, only modules (*) - Do not import more than one module per line (*) +- Do not use wildcard ``*`` import (*) - Do not make relative imports +- Do not make new nova.db imports in nova/virt/* - Order your imports by the full module path - Organize your imports according to the following template @@ -41,6 +63,7 @@ Imports - imports from ``migrate`` package - imports from ``sqlalchemy`` package - imports from ``nova.db.sqlalchemy.session`` module +- imports from ``nova.db.sqlalchemy.migration.versioning_api`` package Example:: @@ -188,6 +211,25 @@ Example:: LOG.error(msg % {"s_id": "1234", "m_key": "imageId"}) +Python 3.x compatibility +------------------------ +Nova code should stay Python 3.x compatible. That means all Python 2.x-only +constructs should be avoided. An example is + + except x,y: + +Use + + except x as y: + +instead. Other Python 3.x compatility issues, like e.g. print operator +can be avoided in new code by using + + from __future__ import print_function + +at the top of your module. + + Creating Unit Tests ------------------- For every new feature, unit tests should be created that both test and @@ -197,27 +239,68 @@ submitted bug fix does have a unit test, be sure to add a new one that fails without the patch and passes with the patch. For more information on creating unit tests and utilizing the testing -infrastructure in OpenStack Nova, please read nova/testing/README.rst. - - -openstack-common +infrastructure in OpenStack Nova, please read nova/tests/README.rst. + + +Running Tests +------------- +The testing system is based on a combination of tox and testr. The canonical +approach to running tests is to simply run the command `tox`. This will +create virtual environments, populate them with depenedencies and run all of +the tests that OpenStack CI systems run. Behind the scenes, tox is running +`testr run --parallel`, but is set up such that you can supply any additional +testr arguments that are needed to tox. For example, you can run: +`tox -- --analyze-isolation` to cause tox to tell testr to add +--analyze-isolation to its argument list. + +It is also possible to run the tests inside of a virtual environment +you have created, or it is possible that you have all of the dependencies +installed locally already. In this case, you can interact with the testr +command directly. Running `testr run` will run the entire test suite. `testr +run --parallel` will run it in parallel (this is the default incantation tox +uses.) More information about testr can be found at: +http://wiki.openstack.org/testr + +Building Docs +------------- +Normal Sphinx docs can be built via the setuptools `build_sphinx` command. To +do this via `tox`, simply run `tox -evenv -- python setup.py build_sphinx`, +which will cause a virtualenv with all of the needed dependencies to be +created and then inside of the virtualenv, the docs will be created and +put into doc/build/html. + +If you'd like a PDF of the documentation, you'll need LaTeX installed, and +additionally some fonts. On Ubuntu systems, you can get what you need with:: + + apt-get install texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended + +Then run `build_sphinx_latex`, change to the build dir and run `make`. +Like so:: + + tox -evenv -- python setup.py build_sphinx_latex + cd build/sphinx/latex + make + +You should wind up with a PDF - Nova.pdf. + +oslo-incubator ---------------- -A number of modules from openstack-common are imported into the project. +A number of modules from oslo-incubator are imported into the project. -These modules are "incubating" in openstack-common and are kept in sync -with the help of openstack-common's update.py script. See: +These modules are "incubating" in oslo-incubator and are kept in sync +with the help of oslo's update.py script. See: - http://wiki.openstack.org/CommonLibrary#Incubation + https://wiki.openstack.org/wiki/Oslo#Incubation The copy of the code should never be directly modified here. Please -always update openstack-common first and then run the script to copy +always update oslo-incubator first and then run the script to copy the changes across. OpenStack Trademark ------------------- -OpenStack is a registered trademark of OpenStack, LLC, and uses the +OpenStack is a registered trademark of the OpenStack Foundation, and uses the following capitalization: OpenStack @@ -228,8 +311,8 @@ Commit Messages Using a common format for commit messages will help keep our git history readable. Follow these guidelines: - First, provide a brief summary (it is recommended to keep the commit title - under 50 chars). + First, provide a brief summary of 50 characters or less. Summaries + of greater then 72 characters will be rejected by the gate. The first line of the commit message should provide an accurate description of the change, not just a reference to a bug or diff --git a/README.rst b/README.rst index 9c0f61ae085..51f8fe11965 100644 --- a/README.rst +++ b/README.rst @@ -1,11 +1,9 @@ - - OpenStack Nova README ===================== OpenStack Nova provides a cloud computing fabric controller, supporting a wide variety of virtualization technologies, -including KVM, Xen, LXC, VMWare, and more. In addition to +including KVM, Xen, LXC, VMware, and more. In addition to its native API, it includes compatibility with the commonly encountered Amazon EC2 and S3 APIs. @@ -26,6 +24,11 @@ available online at: http://docs.openstack.org +For information about the different compute (hypervisor) drivers +supported by Nova, read this page on the wiki: + + https://wiki.openstack.org/wiki/HypervisorSupportMatrix + In the unfortunate event that bugs are discovered, they should be reported to the appropriate bug tracker. If you obtained the software from a 3rd party operating system vendor, it is @@ -52,9 +55,7 @@ developer focused documentation is available at: http://nova.openstack.org/ -Changes to OpenStack Nova should be submitted for review via -the Gerrit tool, following the workflow documented at: - - http://wiki.openstack.org/GerritWorkflow +For information on how to contribute to Nova, please see the +contents of the CONTRIBUTING.rst file. -- End of broadcast diff --git a/bin/api-paste.ini b/bin/api-paste.ini deleted file mode 120000 index bba6f5cc95f..00000000000 --- a/bin/api-paste.ini +++ /dev/null @@ -1 +0,0 @@ -../etc/nova/api-paste.ini \ No newline at end of file diff --git a/bin/nova-all b/bin/nova-all deleted file mode 100755 index 1d7b2dfaca0..00000000000 --- a/bin/nova-all +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/env python -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2011 OpenStack, LLC -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Starter script for all nova services. - -This script attempts to start all the nova services in one process. Each -service is started in its own greenthread. Please note that exceptions and -sys.exit() on the starting of a service are logged and the script will -continue attempting to launch the rest of the services. - -""" - -import eventlet -eventlet.monkey_patch(os=False) - -import os -import sys - - -possible_topdir = os.path.normpath(os.path.join(os.path.abspath( - sys.argv[0]), os.pardir, os.pardir)) -if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")): - sys.path.insert(0, possible_topdir) - - -from nova import flags -from nova.objectstore import s3server -from nova.openstack.common import log as logging -from nova import service -from nova import utils -from nova.vnc import xvp_proxy - - -LOG = logging.getLogger('nova.all') - -if __name__ == '__main__': - flags.parse_args(sys.argv) - logging.setup("nova") - utils.monkey_patch() - launcher = service.ProcessLauncher() - - # nova-api - for api in flags.FLAGS.enabled_apis: - try: - server = service.WSGIService(api) - launcher.launch_server(server, workers=server.workers or 1) - except (Exception, SystemExit): - LOG.exception(_('Failed to load %s') % '%s-api' % api) - - for mod in [s3server, xvp_proxy]: - try: - launcher.launch_server(mod.get_wsgi_server()) - except (Exception, SystemExit): - LOG.exception(_('Failed to load %s') % mod.__name__) - - for binary in ['nova-compute', 'nova-volume', - 'nova-network', 'nova-scheduler', 'nova-cert']: - try: - launcher.launch_server(service.Service.create(binary=binary)) - except (Exception, SystemExit): - LOG.exception(_('Failed to load %s'), binary) - launcher.wait() diff --git a/bin/nova-api b/bin/nova-api deleted file mode 100755 index f55eca719dd..00000000000 --- a/bin/nova-api +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env python -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Starter script for Nova API. - -Starts both the EC2 and OpenStack APIs in separate greenthreads. - -""" - -import eventlet -eventlet.monkey_patch(os=False) - -import os -import sys - - -possible_topdir = os.path.normpath(os.path.join(os.path.abspath( - sys.argv[0]), os.pardir, os.pardir)) -if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")): - sys.path.insert(0, possible_topdir) - - -from nova import flags -from nova.openstack.common import log as logging -from nova import service -from nova import utils - -if __name__ == '__main__': - flags.parse_args(sys.argv) - logging.setup("nova") - utils.monkey_patch() - launcher = service.ProcessLauncher() - for api in flags.FLAGS.enabled_apis: - server = service.WSGIService(api) - launcher.launch_server(server, workers=server.workers or 1) - launcher.wait() diff --git a/bin/nova-api-ec2 b/bin/nova-api-ec2 deleted file mode 100755 index 8e66ab87489..00000000000 --- a/bin/nova-api-ec2 +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Starter script for Nova EC2 API.""" - -import eventlet -eventlet.monkey_patch(os=False) - -import os -import sys - - -possible_topdir = os.path.normpath(os.path.join(os.path.abspath( - sys.argv[0]), os.pardir, os.pardir)) -if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")): - sys.path.insert(0, possible_topdir) - - -from nova import flags -from nova.openstack.common import log as logging -from nova import service -from nova import utils - -if __name__ == '__main__': - flags.parse_args(sys.argv) - logging.setup("nova") - utils.monkey_patch() - server = service.WSGIService('ec2') - service.serve(server, workers=server.workers) - service.wait() diff --git a/bin/nova-api-metadata b/bin/nova-api-metadata deleted file mode 100755 index d445a16a979..00000000000 --- a/bin/nova-api-metadata +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Starter script for Nova Metadata API.""" - -import eventlet -eventlet.monkey_patch(os=False) - -import os -import sys - - -possible_topdir = os.path.normpath(os.path.join(os.path.abspath( - sys.argv[0]), os.pardir, os.pardir)) -if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")): - sys.path.insert(0, possible_topdir) - - -from nova import flags -from nova.openstack.common import log as logging -from nova import service -from nova import utils - -if __name__ == '__main__': - flags.parse_args(sys.argv) - logging.setup("nova") - utils.monkey_patch() - server = service.WSGIService('metadata') - service.serve(server, workers=server.workers) - service.wait() diff --git a/bin/nova-api-os-compute b/bin/nova-api-os-compute deleted file mode 100755 index 529d5882125..00000000000 --- a/bin/nova-api-os-compute +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Starter script for Nova OS API.""" - -import eventlet -eventlet.monkey_patch(os=False) - -import os -import sys - - -possible_topdir = os.path.normpath(os.path.join(os.path.abspath( - sys.argv[0]), os.pardir, os.pardir)) -if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")): - sys.path.insert(0, possible_topdir) - - -from nova import flags -from nova.openstack.common import log as logging -from nova import service -from nova import utils - -if __name__ == '__main__': - flags.parse_args(sys.argv) - logging.setup("nova") - utils.monkey_patch() - server = service.WSGIService('osapi_compute') - service.serve(server, workers=server.workers) - service.wait() diff --git a/bin/nova-api-os-volume b/bin/nova-api-os-volume deleted file mode 100755 index 7c368fce931..00000000000 --- a/bin/nova-api-os-volume +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Starter script for Nova OS API.""" - -import eventlet -eventlet.monkey_patch(os=False) - -import os -import sys - - -possible_topdir = os.path.normpath(os.path.join(os.path.abspath( - sys.argv[0]), os.pardir, os.pardir)) -if os.path.exists(os.path.join(possible_topdir, "nova", "__init__.py")): - sys.path.insert(0, possible_topdir) - - -from nova import flags -from nova.openstack.common import log as logging -from nova import service -from nova import utils - -if __name__ == '__main__': - flags.parse_args(sys.argv) - logging.setup("nova") - utils.monkey_patch() - server = service.WSGIService('osapi_volume') - service.serve(server, workers=server.workers) - service.wait() diff --git a/bin/nova-cert b/bin/nova-cert deleted file mode 100755 index 81189492a9a..00000000000 --- a/bin/nova-cert +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2012 OpenStack, LLC. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -"""Starter script for Nova Cert.""" - -import eventlet -eventlet.monkey_patch() - -import os -import sys - -# If ../nova/__init__.py exists, add ../ to Python search path, so that -# it will override what happens to be installed in /usr/(local/)lib/python... -POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), - os.pardir, - os.pardir)) -if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')): - sys.path.insert(0, POSSIBLE_TOPDIR) - - -from nova import flags -from nova.openstack.common import log as logging -from nova import service -from nova import utils - -if __name__ == '__main__': - flags.parse_args(sys.argv) - logging.setup("nova") - utils.monkey_patch() - server = service.Service.create(binary='nova-cert') - service.serve(server) - service.wait() diff --git a/bin/nova-clear-rabbit-queues b/bin/nova-clear-rabbit-queues deleted file mode 100755 index 0cbf5ab196b..00000000000 --- a/bin/nova-clear-rabbit-queues +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env python -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright (c) 2011 OpenStack, LLC. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -"""Admin/debug script to wipe rabbitMQ (AMQP) queues nova uses. - This can be used if you need to change durable options on queues, - or to wipe all messages in the queue system if things are in a - serious bad way. - -""" - -import datetime -import gettext -import os -import sys -import time - -# If ../nova/__init__.py exists, add ../ to Python search path, so that -# it will override what happens to be installed in /usr/(local/)lib/python... -POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), - os.pardir, - os.pardir)) -if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')): - sys.path.insert(0, POSSIBLE_TOPDIR) - -gettext.install('nova', unicode=1) - - -from nova import context -from nova import exception -from nova import flags -from nova.openstack.common import cfg -from nova.openstack.common import log as logging -from nova.openstack.common import rpc - - -delete_exchange_opt = cfg.BoolOpt('delete_exchange', - default=False, - help='delete nova exchange too.') - -FLAGS = flags.FLAGS -FLAGS.register_cli_opt(delete_exchange_opt) - - -def delete_exchange(exch): - conn = rpc.create_connection() - x = conn.get_channel() - x.exchange_delete(exch) - - -def delete_queues(queues): - conn = rpc.create_connection() - x = conn.get_channel() - for q in queues: - x.queue_delete(q) - -if __name__ == '__main__': - args = flags.parse_args(sys.argv) - logging.setup("nova") - delete_queues(args[1:]) - if FLAGS.delete_exchange: - delete_exchange(FLAGS.control_exchange) diff --git a/bin/nova-compute b/bin/nova-compute deleted file mode 100755 index 0a8432b1e1c..00000000000 --- a/bin/nova-compute +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env python -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -"""Starter script for Nova Compute.""" - -import eventlet -eventlet.monkey_patch() - -import os -import sys - -# If ../nova/__init__.py exists, add ../ to Python search path, so that -# it will override what happens to be installed in /usr/(local/)lib/python... -POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), - os.pardir, - os.pardir)) -if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')): - sys.path.insert(0, POSSIBLE_TOPDIR) - - -from nova import flags -from nova.openstack.common import log as logging -from nova import service -from nova import utils - -if __name__ == '__main__': - flags.parse_args(sys.argv) - logging.setup('nova') - utils.monkey_patch() - server = service.Service.create(binary='nova-compute') - service.serve(server) - service.wait() diff --git a/bin/nova-console b/bin/nova-console deleted file mode 100755 index 97b1529300f..00000000000 --- a/bin/nova-console +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright (c) 2010 OpenStack, LLC. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -"""Starter script for Nova Console Proxy.""" - -import eventlet -eventlet.monkey_patch() - -import os -import sys - -# If ../nova/__init__.py exists, add ../ to Python search path, so that -# it will override what happens to be installed in /usr/(local/)lib/python... -possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), - os.pardir, - os.pardir)) -if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): - sys.path.insert(0, possible_topdir) - - -from nova import flags -from nova.openstack.common import log as logging -from nova import service - -if __name__ == '__main__': - flags.parse_args(sys.argv) - logging.setup("nova") - server = service.Service.create(binary='nova-console') - service.serve(server) - service.wait() diff --git a/bin/nova-consoleauth b/bin/nova-consoleauth deleted file mode 100755 index f8277daf63d..00000000000 --- a/bin/nova-consoleauth +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright (c) 2012 OpenStack, LLC. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""VNC Console Proxy Server.""" - -import eventlet -eventlet.monkey_patch() - -import os -import sys - -possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), - os.pardir, - os.pardir)) -if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): - sys.path.insert(0, possible_topdir) - - -from nova.consoleauth import manager -from nova import flags -from nova.openstack.common import log as logging -from nova import service - - -if __name__ == "__main__": - flags.parse_args(sys.argv) - logging.setup("nova") - - server = service.Service.create(binary='nova-consoleauth') - service.serve(server) - service.wait() diff --git a/bin/nova-dhcpbridge b/bin/nova-dhcpbridge deleted file mode 100755 index 0693ae27a44..00000000000 --- a/bin/nova-dhcpbridge +++ /dev/null @@ -1,128 +0,0 @@ -#!/usr/bin/env python -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -""" -Handle lease database updates from DHCP servers. -""" - -import gettext -import os -import sys - -# If ../nova/__init__.py exists, add ../ to Python search path, so that -# it will override what happens to be installed in /usr/(local/)lib/python... -possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), - os.pardir, - os.pardir)) -if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): - sys.path.insert(0, possible_topdir) - -gettext.install('nova', unicode=1) - -from nova import context -from nova import db -from nova import flags -from nova.network import linux_net -from nova.openstack.common import importutils -from nova.openstack.common import log as logging -from nova.openstack.common import rpc -from nova import utils - -FLAGS = flags.FLAGS - -LOG = logging.getLogger('nova.dhcpbridge') - - -def add_lease(mac, ip_address): - """Set the IP that was assigned by the DHCP server.""" - if FLAGS.fake_rabbit: - LOG.debug(_("leasing ip")) - network_manager = importutils.import_object(FLAGS.network_manager) - network_manager.lease_fixed_ip(context.get_admin_context(), - ip_address) - else: - rpc.cast(context.get_admin_context(), - "%s.%s" % (FLAGS.network_topic, FLAGS.host), - {"method": "lease_fixed_ip", - "args": {"address": ip_address}}) - - -def old_lease(mac, ip_address): - """Called when an old lease is recognized.""" - # NOTE(vish): We assume we heard about this lease the first time. - # If not, we will get it the next time the lease is - # renewed. - pass - - -def del_lease(mac, ip_address): - """Called when a lease expires.""" - if FLAGS.fake_rabbit: - LOG.debug(_("releasing ip")) - network_manager = importutils.import_object(FLAGS.network_manager) - network_manager.release_fixed_ip(context.get_admin_context(), - ip_address) - else: - rpc.cast(context.get_admin_context(), - "%s.%s" % (FLAGS.network_topic, FLAGS.host), - {"method": "release_fixed_ip", - "args": {"address": ip_address}}) - - -def init_leases(network_id): - """Get the list of hosts for a network.""" - ctxt = context.get_admin_context() - network_ref = db.network_get(ctxt, network_id) - network_manager = importutils.import_object(FLAGS.network_manager) - return network_manager.get_dhcp_leases(ctxt, network_ref) - - -def main(): - """Parse environment and arguments and call the approproate action.""" - flagfile = os.environ.get('FLAGFILE', FLAGS.dhcpbridge_flagfile) - argv = flags.parse_args(sys.argv) - logging.setup("nova") - - if int(os.environ.get('TESTING', '0')): - from nova.tests import fake_flags - - action = argv[1] - if action in ['add', 'del', 'old']: - mac = argv[2] - ip = argv[3] - msg = (_("Called '%(action)s' for mac '%(mac)s' with ip '%(ip)s'") % - {"action": action, - "mac": mac, - "ip": ip}) - LOG.debug(msg) - globals()[action + '_lease'](mac, ip) - else: - try: - network_id = int(os.environ.get('NETWORK_ID')) - except TypeError: - LOG.error(_("Environment variable 'NETWORK_ID' must be set.")) - sys.exit(1) - - print init_leases(network_id) - - rpc.cleanup() - - -if __name__ == "__main__": - main() diff --git a/bin/nova-manage b/bin/nova-manage deleted file mode 100755 index 176273c7202..00000000000 --- a/bin/nova-manage +++ /dev/null @@ -1,1400 +0,0 @@ -#!/usr/bin/env python -# vim: tabstop=4 shiftwidth=4 softtabstop=4 - -# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. -# Copyright 2010 United States Government as represented by the -# Administrator of the National Aeronautics and Space Administration. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -# Interactive shell based on Django: -# -# Copyright (c) 2005, the Lawrence Journal-World -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# 3. Neither the name of Django nor the names of its contributors may be -# used to endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -""" - CLI interface for nova management. -""" - -import ast -import errno -import gettext -import math -import netaddr -import optparse -import os -import sys - -# If ../nova/__init__.py exists, add ../ to Python search path, so that -# it will override what happens to be installed in /usr/(local/)lib/python... -POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), - os.pardir, - os.pardir)) -if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')): - sys.path.insert(0, POSSIBLE_TOPDIR) - -gettext.install('nova', unicode=1) - -from nova.api.ec2 import ec2utils -from nova.compat import flagfile -from nova.compute import instance_types -from nova.compute import rpcapi as compute_rpcapi -from nova import context -from nova import db -from nova.db import migration -from nova import exception -from nova import flags -from nova.openstack.common import cfg -from nova.openstack.common import importutils -from nova.openstack.common import log as logging -from nova.openstack.common import rpc -from nova.openstack.common import timeutils -from nova import quota -from nova.scheduler import rpcapi as scheduler_rpcapi -from nova import utils -from nova import version - -FLAGS = flags.FLAGS -flags.DECLARE('flat_network_bridge', 'nova.network.manager') -flags.DECLARE('num_networks', 'nova.network.manager') -flags.DECLARE('multi_host', 'nova.network.manager') -flags.DECLARE('network_size', 'nova.network.manager') -flags.DECLARE('vlan_start', 'nova.network.manager') -flags.DECLARE('vpn_start', 'nova.network.manager') -flags.DECLARE('default_floating_pool', 'nova.network.manager') -flags.DECLARE('public_interface', 'nova.network.linux_net') - -QUOTAS = quota.QUOTAS - - -# Decorators for actions -def args(*args, **kwargs): - def _decorator(func): - func.__dict__.setdefault('options', []).insert(0, (args, kwargs)) - return func - return _decorator - - -def param2id(object_id): - """Helper function to convert various volume id types to internal id. - args: [object_id], e.g. 'vol-0000000a' or 'volume-0000000a' or '10' - """ - if '-' in object_id: - return ec2utils.ec2_vol_id_to_uuid(object_id) - else: - return object_id - - -class VpnCommands(object): - """Class for managing VPNs.""" - - @args('--project', dest="project_id", metavar='', - help='Project name') - @args('--ip', dest="ip", metavar='', help='IP Address') - @args('--port', dest="port", metavar='', help='Port') - def change(self, project_id, ip, port): - """Change the ip and port for a vpn. - - this will update all networks associated with a project - not sure if that's the desired behavior or not, patches accepted - - """ - # TODO(tr3buchet): perhaps this shouldn't update all networks - # associated with a project in the future - admin_context = context.get_admin_context() - networks = db.project_get_networks(admin_context, project_id) - for network in networks: - db.network_update(admin_context, - network['id'], - {'vpn_public_address': ip, - 'vpn_public_port': int(port)}) - - -class ShellCommands(object): - def bpython(self): - """Runs a bpython shell. - - Falls back to Ipython/python shell if unavailable""" - self.run('bpython') - - def ipython(self): - """Runs an Ipython shell. - - Falls back to Python shell if unavailable""" - self.run('ipython') - - def python(self): - """Runs a python shell. - - Falls back to Python shell if unavailable""" - self.run('python') - - @args('--shell', dest="shell", metavar='', - help='Python shell') - def run(self, shell=None): - """Runs a Python interactive interpreter.""" - if not shell: - shell = 'bpython' - - if shell == 'bpython': - try: - import bpython - bpython.embed() - except ImportError: - shell = 'ipython' - if shell == 'ipython': - try: - import IPython - # Explicitly pass an empty list as arguments, because - # otherwise IPython would use sys.argv from this script. - shell = IPython.Shell.IPShell(argv=[]) - shell.mainloop() - except ImportError: - shell = 'python' - - if shell == 'python': - import code - try: - # Try activating rlcompleter, because it's handy. - import readline - except ImportError: - pass - else: - # We don't have to wrap the following import in a 'try', - # because we already know 'readline' was imported successfully. - import rlcompleter - readline.parse_and_bind("tab:complete") - code.interact() - - @args('--path', dest='path', metavar='', help='Script path') - def script(self, path): - """Runs the script from the specifed path with flags set properly. - arguments: path""" - exec(compile(open(path).read(), path, 'exec'), locals(), globals()) - - -def _db_error(caught_exception): - print caught_exception - print _("The above error may show that the database has not " - "been created.\nPlease create a database using " - "'nova-manage db sync' before running this command.") - exit(1) - - -class ProjectCommands(object): - """Class for managing projects.""" - - def quota(self, project_id, key=None, value=None): - """Set or display quotas for project""" - ctxt = context.get_admin_context() - if key: - if value.lower() == 'unlimited': - value = -1 - try: - db.quota_update(ctxt, project_id, key, value) - except exception.ProjectQuotaNotFound: - db.quota_create(ctxt, project_id, key, value) - project_quota = QUOTAS.get_project_quotas(ctxt, project_id) - for key, value in project_quota.iteritems(): - if value['limit'] < 0 or value['limit'] is None: - value['limit'] = 'unlimited' - print '%s: %s' % (key, value['limit']) - - @args('--project', dest="project_id", metavar='', - help='Project name') - def scrub(self, project_id): - """Deletes data associated with project""" - admin_context = context.get_admin_context() - networks = db.project_get_networks(admin_context, project_id) - for network in networks: - db.network_disassociate(admin_context, network['id']) - groups = db.security_group_get_by_project(admin_context, project_id) - for group in groups: - db.security_group_destroy(admin_context, group['id']) - - -AccountCommands = ProjectCommands - - -class FixedIpCommands(object): - """Class for managing fixed ip.""" - - @args('--host', dest="host", metavar='', help='Host') - def list(self, host=None): - """Lists all fixed ips (optionally by host)""" - ctxt = context.get_admin_context() - - try: - if host is None: - fixed_ips = db.fixed_ip_get_all(ctxt) - else: - fixed_ips = db.fixed_ip_get_all_by_instance_host(ctxt, host) - except exception.NotFound as ex: - print "error: %s" % ex - sys.exit(2) - - instances = db.instance_get_all(context.get_admin_context()) - instances_by_uuid = {} - for instance in instances: - instances_by_uuid[instance['uuid']] = instance - - print "%-18s\t%-15s\t%-15s\t%s" % (_('network'), - _('IP address'), - _('hostname'), - _('host')) - - all_networks = {} - try: - # use network_get_all to retrieve all existing networks - # this is to ensure that IPs associated with deleted networks - # will not throw exceptions. - for network in db.network_get_all(context.get_admin_context()): - all_networks[network.id] = network - except exception.NoNetworksFound: - # do not have any networks, so even if there are IPs, these - # IPs should have been deleted ones, so return. - print _('No fixed IP found.') - return - - has_ip = False - for fixed_ip in fixed_ips: - hostname = None - host = None - mac_address = None - network = all_networks.get(fixed_ip['network_id']) - if network: - has_ip = True - if fixed_ip.get('instance_uuid'): - instance = instances_by_uuid.get(fixed_ip['instance_uuid']) - if instance: - hostname = instance['hostname'] - host = instance['host'] - else: - print _('WARNING: fixed ip %s allocated to missing' - ' instance') % str(fixed_ip['address']) - print "%-18s\t%-15s\t%-15s\t%s" % ( - network['cidr'], - fixed_ip['address'], - hostname, host) - - if not has_ip: - print _('No fixed IP found.') - - @args('--address', dest="address", metavar='', - help='IP address') - def reserve(self, address): - """Mark fixed ip as reserved - arguments: address""" - self._set_reserved(address, True) - - @args('--address', dest="address", metavar='', - help='IP address') - def unreserve(self, address): - """Mark fixed ip as free to use - arguments: address""" - self._set_reserved(address, False) - - def _set_reserved(self, address, reserved): - ctxt = context.get_admin_context() - - try: - fixed_ip = db.fixed_ip_get_by_address(ctxt, address) - if fixed_ip is None: - raise exception.NotFound('Could not find address') - db.fixed_ip_update(ctxt, fixed_ip['address'], - {'reserved': reserved}) - except exception.NotFound as ex: - print "error: %s" % ex - sys.exit(2) - - -class FloatingIpCommands(object): - """Class for managing floating ip.""" - - @staticmethod - def address_to_hosts(addresses): - """ - Iterate over hosts within an address range. - - If an explicit range specifier is missing, the parameter is - interpreted as a specific individual address. - """ - try: - return [netaddr.IPAddress(addresses)] - except ValueError: - net = netaddr.IPNetwork(addresses) - if net.size < 4: - reason = _("/%s should be specified as single address(es) " - "not in cidr format") % net.prefixlen - raise exception.InvalidInput(reason=reason) - else: - return net.iter_hosts() - - @args('--ip_range', dest="ip_range", metavar='', help='IP range') - @args('--pool', dest="pool", metavar='', help='Optional pool') - @args('--interface', dest="interface", metavar='', - help='Optional interface') - def create(self, ip_range, pool=None, interface=None): - """Creates floating ips for zone by range""" - admin_context = context.get_admin_context() - if not pool: - pool = FLAGS.default_floating_pool - if not interface: - interface = FLAGS.public_interface - - ips = ({'address': str(address), 'pool': pool, 'interface': interface} - for address in self.address_to_hosts(ip_range)) - try: - db.floating_ip_bulk_create(admin_context, ips) - except exception.FloatingIpExists as exc: - # NOTE(simplylizz): Maybe logging would be better here - # instead of printing, but logging isn't used here and I - # don't know why. - print('error: %s' % exc) - sys.exit(1) - - @args('--ip_range', dest="ip_range", metavar='', help='IP range') - def delete(self, ip_range): - """Deletes floating ips by range""" - admin_context = context.get_admin_context() - - ips = ({'address': str(address)} - for address in self.address_to_hosts(ip_range)) - db.floating_ip_bulk_destroy(admin_context, ips) - - @args('--host', dest="host", metavar='', help='Host') - def list(self, host=None): - """Lists all floating ips (optionally by host) - Note: if host is given, only active floating IPs are returned""" - ctxt = context.get_admin_context() - try: - if host is None: - floating_ips = db.floating_ip_get_all(ctxt) - else: - floating_ips = db.floating_ip_get_all_by_host(ctxt, host) - except exception.NoFloatingIpsDefined: - print _("No floating IP addresses have been defined.") - return - for floating_ip in floating_ips: - instance_uuid = None - if floating_ip['fixed_ip_id']: - fixed_ip = db.fixed_ip_get(ctxt, floating_ip['fixed_ip_id']) - instance_uuid = fixed_ip['instance_uuid'] - - print "%s\t%s\t%s\t%s\t%s" % (floating_ip['project_id'], - floating_ip['address'], - instance_uuid, - floating_ip['pool'], - floating_ip['interface']) - - -class NetworkCommands(object): - """Class for managing networks.""" - - @args('--label', dest="label", metavar='