nova/nova/tests/unit/api/openstack/compute
Matt Riedemann 9b21d1067a Block swap volume on volumes with >1 rw attachment
If we're swapping from a multiattach volume that has more than one
read/write attachment, another server on the secondary attachment could
be writing to the volume which is not getting copied into the volume to
which we're swapping, so we could have data loss during the swap.

This change does volume read/write attachment counting for the volume
we're swapping from and if there is more than one read/write attachment
on the volume, the swap volume operation fails with a 400 BadRequest
error.

Depends-On: https://review.openstack.org/573025/
Closes-Bug: #1775418
Change-Id: Icd7fcb87a09c35a13e4e14235feb30a289d22778
(cherry picked from commit 5a1d159d14)
2019-05-30 20:59:55 +00:00
..
__init__.py
admin_only_action_common.py Fail to live migration if instance has a NUMA topology 2018-12-14 14:08:35 -05:00
dummy_schema.py
microversions.py Remove the extensions framework from wsgi.py 2018-10-18 02:01:03 +00:00
test_access_ips.py Update compute API.get() stubs in test_access_ips 2018-11-05 14:10:11 -05:00
test_admin_actions.py Remove mox in tests/unit/api/openstack/compute 2018-05-24 21:31:44 +00:00
test_admin_password.py Minimal construct plumbing for nova show when a cell is down 2018-10-31 15:22:09 -04:00
test_agents.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_aggregates.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_api.py Remove unnecessary setUp function in testcase 2017-03-30 12:55:16 +08:00
test_attach_interfaces.py Add unit tests for missing VirtualInterface in 2.70 os-interface 2019-02-25 10:57:37 -05:00
test_auth.py Tests: use fakes.HTTPRequest in compute tests 2016-08-24 19:03:54 +03:00
test_availability_zone.py AZ list performance optimization: avoid double service list DB fetch 2019-04-29 19:05:05 +00:00
test_baremetal_nodes.py Deprecate Baremetal and fping API 2016-07-26 14:14:44 +08:00
test_cells.py Add offset & limit docs & tests 2017-02-02 12:28:06 -05:00
test_certificates.py Remove nova-cert 2017-04-27 22:28:01 -04:00
test_cloudpipe.py Replaces uuid.uuid4 with uuidutils.generate_uuid() 2017-07-25 10:45:03 +05:30
test_cloudpipe_update.py Remove cloudpipe APIs 2017-05-04 16:13:45 +08:00
test_console_auth_tokens.py Use nova-consoleauth only if workaround enabled 2018-10-11 18:23:02 +00:00
test_console_output.py Minimal construct plumbing for nova show when a cell is down 2018-10-31 15:22:09 -04:00
test_consoles.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_create_backup.py Limit the min length of string for integer JSON-Schema 2017-05-27 10:14:28 +00:00
test_deferred_delete.py Minimal construct plumbing for nova show when a cell is down 2018-10-31 15:22:09 -04:00
test_disk_config.py Update compute API.get() stubs for test_disk_config 2018-11-05 14:10:11 -05:00
test_evacuate.py Follow up (#2) for the bw resource provider series 2019-02-11 14:35:15 -05:00
test_extended_hypervisors.py Handle uuids in os-hypervisors API 2017-07-18 17:08:01 -04:00
test_extended_ips.py Merge "Remove unused init_only kwarg from wsgi app init" 2017-01-11 04:13:39 +00:00
test_extended_ips_mac.py Merge "Remove unused init_only kwarg from wsgi app init" 2017-01-11 04:13:39 +00:00
test_extension_info.py Totally freeze the extension_info API 2017-05-08 16:32:48 +08:00
test_flavor_access.py Remove the caching the resource on Request object 2018-10-18 01:59:55 +00:00
test_flavor_disabled.py Remove the caching the resource on Request object 2018-10-18 01:59:55 +00:00
test_flavor_manage.py Fix a missing policy in test policy data 2019-02-14 15:01:03 +00:00
test_flavorextradata.py Remove unused init_only kwarg from wsgi app init 2016-12-29 21:51:03 -05:00
test_flavors.py Remove more code related to extensions and testing 2018-10-18 02:00:15 +00:00
test_flavors_extra_specs.py Mock.side_effects does not exist, use Mock.side_effect instead 2016-09-23 15:44:33 +08:00
test_floating_ip_pools.py Make test_floating_ip* pass with CONF.use_neutron=True by default 2017-01-03 20:59:36 -05:00
test_floating_ips.py Minimal construct plumbing for nova show when a cell is down 2018-10-31 15:22:09 -04:00
test_hosts.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_hypervisor_status.py
test_hypervisors.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_image_metadata.py [proxy-api] microversion 2.39 deprecates image-metadata proxy API 2016-12-07 19:22:43 +03:00
test_images.py Merge image_size extension response into image view builder 2018-10-18 01:59:34 +00:00
test_instance_actions.py Fix an error when generating a host ID 2019-03-04 14:51:13 +09:00
test_instance_usage_audit_log.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_keypairs.py Merge keypair extension response into server view builder 2018-08-23 09:04:00 -04:00
test_limits.py Remove more code related to extensions and testing 2018-10-18 02:00:15 +00:00
test_lock_server.py Minimal construct plumbing for nova show when a cell is down 2018-10-31 15:22:09 -04:00
test_microversions.py Remove more code related to extensions and testing 2018-10-18 02:00:15 +00:00
test_migrate_server.py Follow up (#2) for the bw resource provider series 2019-02-11 14:35:15 -05:00
test_migrations.py Add restrictions on updated_at when getting migrations 2018-10-24 11:11:49 -04:00
test_multinic.py Minimal construct plumbing for nova show when a cell is down 2018-10-31 15:22:09 -04:00
test_networks.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_neutron_security_groups.py Update compute API.get() stubs for test_*security_groups 2018-11-05 14:10:11 -05:00
test_pause_server.py Remove mox in tests/unit/api/openstack/compute 2018-05-24 21:31:44 +00:00
test_quota_classes.py Deprecate file injection 2017-12-12 09:22:21 -05:00
test_quotas.py quota: remove QuotaDriver.destroy_all_by_project() 2018-10-24 11:14:31 -04:00
test_remote_consoles.py Stop using mox stubs in test_remote_consoles.py 2017-07-18 00:39:01 +00:00
test_rescue.py Merge "Remove mox from api/openstack/compute/test_rescue.py" 2017-01-03 17:06:30 +00:00
test_security_group_default_rules.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_security_groups.py Update compute API.get() stubs for test_*security_groups 2018-11-05 14:10:11 -05:00
test_server_actions.py Flavor extra spec and image properties validation from API 2019-03-05 12:05:06 -06:00
test_server_diagnostics.py Minimal construct plumbing for nova show when a cell is down 2018-10-31 15:22:09 -04:00
test_server_external_events.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_server_group_quotas.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_server_groups.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_server_metadata.py Update compute API.get() mocks in test_server_metadata 2018-11-05 14:10:08 -05:00
test_server_migrations.py Minimal construct plumbing for nova show when a cell is down 2018-10-31 15:22:09 -04:00
test_server_password.py Remove mox in unit/api/*/test_server_password.py 2018-04-09 16:28:08 +09:00
test_server_reset_state.py Minimal construct plumbing for nova show when a cell is down 2018-10-31 15:22:09 -04:00
test_server_start_stop.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_server_tags.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
test_serversV21.py Handle missing exception in instance creation code 2019-03-05 11:04:06 -06:00
test_services.py Provide a useful error message when trying to update non-compute services 2019-02-11 15:04:12 -05:00
test_shelve.py Follow up (#2) for the bw resource provider series 2019-02-11 14:35:15 -05:00
test_simple_tenant_usage.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_snapshots.py Implement query param schema for volume, snapshot API 2017-11-19 16:15:39 +03:00
test_suspend_server.py Remove mox in tests/unit/api/openstack/compute 2018-05-24 21:31:44 +00:00
test_tenant_networks.py Count networks to check quota 2017-06-19 21:51:46 +00:00
test_urlmap.py Remove the test for the route '/resources.:(format)' 2017-07-12 20:57:16 +08:00
test_versions.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_volumes.py Block swap volume on volumes with >1 rw attachment 2019-05-30 20:59:55 +00:00