compute.admin package

Submodules

compute.admin.test_aggregates_negative module

class AggregatesAdminNegativeTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Tests Aggregates API that require admin privileges

test_aggregate_add_existent_host()[source]

Test idempotent id: 19dd44e1-c435-4ee1-a402-88c4f90b5950

Adding already existing host to aggregate should fail

test_aggregate_add_host_as_user()[source]

Test idempotent id: 7324c334-bd13-4c93-8521-5877322c3d51

Regular user is not allowed to add a host to an aggregate

test_aggregate_add_non_exist_host()[source]

Test idempotent id: 0ef07828-12b4-45ba-87cc-41425faf5711

Adding a non-exist host to an aggregate should fail

test_aggregate_create_aggregate_name_length_exceeds_255()[source]

Test idempotent id: 4c194563-543b-4e70-a719-557bbe947fac

The length of aggregate name should <=255

test_aggregate_create_aggregate_name_length_less_than_1()[source]

Test idempotent id: 3b8a1929-3793-4e92-bcb4-dfa572ee6c1d

The length of aggregate name should >=1

test_aggregate_create_as_user()[source]

Test idempotent id: 86a1cb14-da37-4a70-b056-903fd56dfe29

Regular user is not allowed to create an aggregate

test_aggregate_create_with_existent_aggregate_name()[source]

Test idempotent id: 9c23a291-b0b1-487b-b464-132e061151b3

Creating an aggregate with existent aggregate name is forbidden

test_aggregate_delete_as_user()[source]

Test idempotent id: cd6de795-c15d-45f1-8d9e-813c6bb72a3d

Regular user is not allowed to delete an aggregate

test_aggregate_delete_with_invalid_id()[source]

Test idempotent id: c74f4bf1-4708-4ff2-95a0-f49eaca951bd

Delete an aggregate with invalid id should raise exceptions

test_aggregate_get_details_as_user()[source]

Test idempotent id: 557cad12-34c9-4ff4-95f0-22f0dfbaf7dc

Regular user is not allowed to get aggregate details

test_aggregate_get_details_with_invalid_id()[source]

Test idempotent id: 3c916244-2c46-49a4-9b55-b20bb0ae512c

Get aggregate details with invalid id should raise exceptions

test_aggregate_list_as_user()[source]

Test idempotent id: b7d475a6-5dcd-4ff4-b70a-cd9de66a6672

Regular user is not allowed to list aggregates

test_aggregate_remove_host_as_user()[source]

Test idempotent id: 7a53af20-137a-4e44-a4ae-e19260e626d9

Regular user is not allowed to remove a host from an aggregate

test_aggregate_remove_nonexistent_host()[source]

Test idempotent id: 95d6a6fa-8da9-4426-84d0-eec0329f2e4d

Removing not existing host from aggregate should fail

compute.admin.test_assisted_volume_snapshots module

class VolumesAssistedSnapshotsTest(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Test volume assisted snapshots

test_volume_assisted_snapshot_create_delete()[source]

Test idempotent id: 8aee84a3-1b1f-42e4-9b00-613931ccac24

Test create/delete volume assisted snapshot

compute.admin.test_auto_allocate_network module

class AutoAllocateNetworkTest(*args, **kwargs)[source]

Bases: BaseV2ComputeTest

Tests auto-allocating networks with the v2.37 microversion.

These tests rely on Neutron being enabled. Also, the tenant must not have any network resources available to it so we can make sure that Nova calls to Neutron to automatically allocate the network topology.

test_server_create_no_allocate()[source]

Test idempotent id: 5eb7b8fa-9c23-47a2-9d7d-02ed5809dd34

Tests that no networking is allocated for the server.

test_server_multi_create_auto_allocate()[source]

Test idempotent id: 2e6cf129-9e28-4e8a-aaaa-045ea826b2a6

Tests that networking is auto-allocated for multiple servers.

compute.admin.test_availability_zone module

class AZAdminV2TestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Tests Availability Zone API List

test_get_availability_zone_list()[source]

Test idempotent id: d3431479-8a09-4f76-aa2d-26dc580cb27c

Test listing availability zones

test_get_availability_zone_list_detail()[source]

Test idempotent id: ef726c58-530f-44c2-968c-c7bed22d5b8c

Test listing availability zones with detail

compute.admin.test_availability_zone_negative module

class AZAdminNegativeTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Negative Tests of Availability Zone API List

test_get_availability_zone_list_detail_with_non_admin_user()[source]

Test idempotent id: bf34dca2-fdc3-4073-9c02-7648d9eae0d7

Test listing availability zone with detail by non-admin user

List of availability zones and available services with non-administrator user is not allowed.

compute.admin.test_create_server module

class ServersWithSpecificFlavorTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Test creating servers with specific flavor

test_verify_created_server_ephemeral_disk()[source]

Test idempotent id: b3c7bcfc-bb5b-4e22-b517-c7f686b802ca

Verify that the ephemeral disk is created when creating server

compute.admin.test_delete_server module

class DeleteServersAdminTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Test deletion of servers

test_admin_delete_servers_of_others()[source]

Test idempotent id: 73177903-6737-4f27-a60c-379e8ae8cf48

Administrator can delete servers of others

test_delete_server_while_in_error_state()[source]

Test idempotent id: 99774678-e072-49d1-9d2a-49a59bc56063

Delete a server while it’s VM state is error

compute.admin.test_flavors module

class FlavorsAdminTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Tests Flavors API Create and Delete that require admin privileges

test_create_flavor_using_string_ram()[source]

Test idempotent id: 3b541a2e-2ac2-4b42-8b8d-ba6e22fcd4da

Test creating flavor with ram of type string

test_create_flavor_verify_entry_in_list_details()[source]

Test idempotent id: 8261d7b0-be58-43ec-a2e5-300573c3f6c5

Create a flavor and ensure its details are listed

This operation requires the user to have ‘admin’ role

test_create_flavor_with_int_id()[source]

Test idempotent id: 8b4330e1-12c4-4554-9390-e6639971f086

Test creating flavor with id of type integer

test_create_flavor_with_none_id()[source]

Test idempotent id: f83fe669-6758-448a-a85e-32d351f36fe0

Test creating flavor without id specified

If nova receives a request with None as flavor_id, nova generates flavor_id of uuid.

test_create_flavor_with_uuid_id()[source]

Test idempotent id: 94c9bb4e-2c2a-4f3c-bb1f-5f0daf918e6d

Test creating flavor with id of type uuid

test_create_list_flavor_without_extra_data()[source]

Test idempotent id: 63dc64e6-2e79-4fdf-868f-85500d308d66

Create a flavor and ensure it is listed

This operation requires the user to have ‘admin’ role

test_create_server_with_non_public_flavor()[source]

Test idempotent id: bcc418ef-799b-47cc-baa1-ce01368b8987

Create a flavor with os-flavor-access:is_public false

test_is_public_string_variations()[source]

Test idempotent id: fb9cbde6-3a0e-41f2-a983-bdb0a823c44e

Test creating public and non public flavors

test_list_non_public_flavor()[source]

Test idempotent id: be6cc18c-7c5d-48c0-ac16-17eaf03c54eb

Create a flavor with os-flavor-access:is_public false.

The flavor should not be present in list_details as the tenant is not automatically added access list. This operation requires the user to have ‘admin’ role

test_list_public_flavor_with_other_user()[source]

Test idempotent id: b345b196-bfbd-4231-8ac1-6d7fe15ff3a3

Create a Flavor with public access.

Try to List/Get flavor with another user

compute.admin.test_flavors_access module

class FlavorsAccessTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Tests Flavor Access API extension.

Add and remove Flavor Access require admin privileges.

test_flavor_access_add_remove()[source]

Test idempotent id: 59e622f6-bdf6-45e3-8ba8-fedad905a6b4

Test add/remove flavor access to a given project

test_flavor_access_list_with_private_flavor()[source]

Test idempotent id: ea2c2211-29fa-4db9-97c3-906d36fad3e0

Test listing flavor access for a private flavor

Listing flavor access on a newly created private flavor will return an empty access list.

compute.admin.test_flavors_access_negative module

class FlavorsAccessNegativeTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Tests Flavor Access API extension.

Add and remove Flavor Access require admin privileges.

test_add_flavor_access_duplicate()[source]

Test idempotent id: f3592cc0-0306-483c-b210-9a7b5346eddc

Test adding duplicate flavor access to same flavor should fail

test_flavor_access_list_with_public_flavor()[source]

Test idempotent id: 0621c53e-d45d-40e7-951d-43e5e257b272

Test listing flavor access of a public flavor should fail

test_flavor_non_admin_add()[source]

Test idempotent id: 41eaaade-6d37-4f28-9c74-f21b46ca67bd

Test adding flavor access by a non-admin user is forbidden

test_flavor_non_admin_remove()[source]

Test idempotent id: 073e79a6-c311-4525-82dc-6083d919cb3a

Test removing flavor access by a non-admin user should fail

test_remove_flavor_access_not_found()[source]

Test idempotent id: 1f710927-3bc7-4381-9f82-0ca6e42644b7

Test removing non existent flavor access should fail

compute.admin.test_flavors_extra_specs module

class FlavorMetadataValidation(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

test_flavor_update_with_custom_namespace()[source]

Test idempotent id: d3114f03-b0f2-4dc7-be11-70c0abc178b3

Test flavor creation with a custom namespace, key and value

class FlavorsExtraSpecsTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Tests Flavor Extra Spec API extension.

SET, UNSET, UPDATE Flavor Extra specs require admin privileges. GET Flavor Extra specs can be performed even by without admin privileges.

test_flavor_non_admin_get_all_keys()[source]

Test idempotent id: a99dad88-ae1c-4fba-aeb4-32f898218bd0

Test non admin user getting all flavor extra spec keys

test_flavor_non_admin_get_specific_key()[source]

Test idempotent id: 12805a7f-39a3-4042-b989-701d5cad9c90

Test non admin user getting specific flavor extra spec key

test_flavor_set_get_update_show_unset_keys()[source]

Test idempotent id: 0b2f9d4b-1ca2-4b99-bb40-165d4bb94208

Test flavor extra spec operations by admin user

Test to SET, GET, UPDATE, SHOW, UNSET flavor extra spec as a user with admin privileges.

compute.admin.test_flavors_extra_specs_negative module

class FlavorsExtraSpecsNegativeTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Negative Tests Flavor Extra Spec API extension.

SET, UNSET, UPDATE Flavor Extra specs require admin privileges.

test_flavor_get_nonexistent_key()[source]

Test idempotent id: 329a7be3-54b2-48be-8052-bf2ce4afd898

Getting non existence flavor extra spec key should fail

test_flavor_non_admin_set_keys()[source]

Test idempotent id: a00a3b81-5641-45a8-ab2b-4a8ec41e1d7d

Test to SET flavor extra spec as a user without admin privileges

test_flavor_non_admin_unset_keys()[source]

Test idempotent id: 28f12249-27c7-44c1-8810-1f382f316b11

non admin user is not allowed to unset flavor extra spec

test_flavor_non_admin_update_specific_key()[source]

Test idempotent id: 1ebf4ef8-759e-48fe-a801-d451d80476fb

non admin user is not allowed to update flavor extra spec

test_flavor_unset_nonexistent_key()[source]

Test idempotent id: 440b9f3f-3c7f-4293-a106-0ceda350f8de

Unsetting non existence flavor extra spec key should fail

test_flavor_update_mismatch_key()[source]

Test idempotent id: 25b822b8-9f49-44f6-80de-d99f0482e5cb

Updating unmatched flavor extra spec key should fail

The key to be updated should match the key in the body

test_flavor_update_more_key()[source]

Test idempotent id: f5889590-bf66-41cc-b4b1-6e6370cfd93f

Updating multiple flavor spec keys should fail

There should be just one item in the request body

compute.admin.test_flavors_microversions module

class FlavorsV255TestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Test flavors API with compute microversion greater than 2.54

test_crud_flavor()[source]

Test idempotent id: 61976b25-488d-41dc-9dcb-cb9693a7b075

Test create/show/update/list flavor

Check the response schema of flavors API with microversion greater than 2.54.

class FlavorsV261TestJSON(*args, **kwargs)[source]

Bases: FlavorsV255TestJSON

Test flavors API with compute microversion greater than 2.60

compute.admin.test_hosts module

class HostsAdminTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Tests nova hosts API using admin privileges.

test_list_hosts()[source]

Test idempotent id: 9bfaf98d-e2cb-44b0-a07e-2558b2821e4f

Listing nova hosts

test_list_hosts_with_a_blank_zone()[source]

Test idempotent id: 9af3c171-fbf4-4150-a624-22109733c2a6

Listing nova hosts with blank availability zone

If send the request with a blank zone, the request will be successful and it will return all the hosts list

test_list_hosts_with_nonexistent_zone()[source]

Test idempotent id: c6ddbadb-c94e-4500-b12f-8ffc43843ff8

Listing nova hosts with not existing availability zone.

If send the request with a nonexistent zone, the request will be successful and no hosts will be returned

test_list_hosts_with_zone()[source]

Test idempotent id: 5dc06f5b-d887-47a2-bb2a-67762ef3c6de

Listing nova hosts with specified availability zone

test_show_host_detail()[source]

Test idempotent id: 38adbb12-aee2-4498-8aec-329c72423aa4

Showing nova host details

compute.admin.test_hosts_negative module

class HostsAdminNegativeTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Tests hosts API using admin privileges.

test_list_hosts_with_non_admin_user()[source]

Test idempotent id: dd032027-0210-4d9c-860e-69b1b8deed5f

Non admin user is not allowed to list hosts

test_reboot_host_with_non_admin_user()[source]

Test idempotent id: 02d79bb9-eb57-4612-abf6-2cb38897d2f8

Non admin user is not allowed to reboot host

test_reboot_nonexistent_host()[source]

Test idempotent id: f86bfd7b-0b13-4849-ae29-0322e83ee58b

Rebooting not existing host should fail

test_show_host_detail_with_non_admin_user()[source]

Test idempotent id: 19ebe09c-bfd4-4b7c-81a2-e2e0710f59cc

Non admin user is not allowed to show host details

test_show_host_detail_with_nonexistent_hostname()[source]

Test idempotent id: e75b0a1a-041f-47a1-8b4a-b72a6ff36d3f

Showing host detail with not existing hostname should fail

test_shutdown_host_with_non_admin_user()[source]

Test idempotent id: a803529c-7e3f-4d3c-a7d6-8e1c203d27f6

Non admin user is not allowed to shutdown host

test_shutdown_nonexistent_host()[source]

Test idempotent id: 9e637444-29cf-4244-88c8-831ae82c31b6

Shutting down not existing host should fail

test_startup_host_with_non_admin_user()[source]

Test idempotent id: 9f4ebb7e-b2ae-4e5b-a38f-0fd1bb0ddfca

Non admin user is not allowed to startup host

test_startup_nonexistent_host()[source]

Test idempotent id: 0d981ac3-4320-4898-b674-82b61fbb60e4

Starting up not existing host should fail

test_update_host_with_invalid_maintenance_mode()[source]

Test idempotent id: ab1e230e-5e22-41a9-8699-82b9947915d4

Updating host to invalid maintenance mode should fail

‘maintenance_mode’ can only be ‘enable’ or ‘disable’.

test_update_host_with_invalid_status()[source]

Test idempotent id: fbe2bf3e-3246-4a95-a59f-94e4e298ec77

Updating host to invalid status should fail

‘status’ can only be ‘enable’ or ‘disable’.

test_update_host_with_non_admin_user()[source]

Test idempotent id: e40c72b1-0239-4ed6-ba21-81a184df1f7c

Non admin user is not allowed to update host

test_update_host_without_param()[source]

Test idempotent id: 0cd85f75-6992-4a4a-b1bd-d11e37fd0eee

Updating host without param should fail

‘status’ or ‘maintenance_mode’ is needed for host update

test_update_nonexistent_host()[source]

Test idempotent id: 23c92146-2100-4d68-b2d6-c7ade970c9c1

Updating not existing host should fail

compute.admin.test_hypervisor module

class HypervisorAdminTestBase(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Tests Hypervisors API that require admin privileges

class HypervisorAdminTestJSON(*args, **kwargs)[source]

Bases: HypervisorAdminTestBase

Tests Hypervisors API that require admin privileges

test_get_hypervisor_list()[source]

Test idempotent id: 7f0ceacd-c64d-4e96-b8ee-d02943142cc5

List of hypervisor and available hypervisors hostname

test_get_hypervisor_list_details()[source]

Test idempotent id: 1e7fdac2-b672-4ad1-97a4-bad0e3030118

Display the details of the all hypervisor

test_get_hypervisor_show_details()[source]

Test idempotent id: 94ff9eae-a183-428e-9cdb-79fde71211cc

Display the details of the specified hypervisor

test_get_hypervisor_stats()[source]

Test idempotent id: 797e4f28-b6e0-454d-a548-80cc77c00816

Verify the stats of the all hypervisor

test_get_hypervisor_uptime()[source]

Test idempotent id: 91a50d7d-1c2b-4f24-b55a-a1fe20efca70

Verify that GET shows the specified hypervisor uptime

class HypervisorAdminUnderV252Test(*args, **kwargs)[source]

Bases: HypervisorAdminTestBase

Tests Hypervisors API below 2.53 that require admin privileges

test_get_hypervisor_show_servers()[source]

Test idempotent id: e81bba3f-6215-4e39-a286-d52d2f906862

Test showing instances about the specific hypervisors

test_search_hypervisor()[source]

Test idempotent id: d7e1805b-3b14-4a3b-b6fd-50ec6d9f361f

Test searching for hypervisors by its name

class HypervisorAdminV228Test(*args, **kwargs)[source]

Bases: HypervisorAdminTestBase

Tests Hypervisors API higher than 2.27 that require admin privileges

test_get_list_hypervisor_details()[source]

Test idempotent id: d46bab64-0fbe-4eb8-9133-e6ee56188cc5

Test listing and showing hypervisor details

class HypervisorAdminV253TestBase(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Tests Hypervisors API above 2.53 that require admin privileges

test_list_show_detail_hypervisors()[source]

Test idempotent id: 4ab54a14-77a2-4e39-b9d2-1306d157c705

Verify the list, list details, and show hypevisors

This verify the Hypervisor API response schema with v2.53 microversion

compute.admin.test_hypervisor_negative module

class HypervisorAdminNegativeTestBase(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Tests Hypervisors API that require admin privileges

class HypervisorAdminNegativeTestJSON(*args, **kwargs)[source]

Bases: HypervisorAdminNegativeTestBase

Tests Hypervisors API that require admin privileges

test_get_hypervisor_list_details_with_non_admin_user()[source]

Test idempotent id: dc02db05-e801-4c5f-bc8e-d915290ab345

Test listing hypervisor details by non admin user should fail

test_get_hypervisor_list_with_non_admin_user()[source]

Test idempotent id: 51b3d536-9b14-409c-9bce-c6f7c794994e

Test listing hypervisors by non admin user should fail

test_get_hypervisor_stats_with_non_admin_user()[source]

Test idempotent id: e2b061bb-13f9-40d8-9d6e-d5bf17595849

Test getting hypervisor stats by non admin user should fail

test_get_hypervisor_uptime_with_non_admin_user()[source]

Test idempotent id: 6c3461f9-c04c-4e2a-bebb-71dc9cb47df2

Test showing uptime of hypervisor by non admin user should fail

test_get_nonexistent_hypervisor_uptime()[source]

Test idempotent id: f60aa680-9a3a-4c7d-90e1-fae3a4891303

Test showing uptime of non existent hypervisor should fail

test_show_hypervisor_with_non_admin_user()[source]

Test idempotent id: 51e663d0-6b89-4817-a465-20aca0667d03

Test showing hypervisor by non admin user should fail

test_show_nonexistent_hypervisor()[source]

Test idempotent id: c136086a-0f67-4b2b-bc61-8482bd68989f

Test showing non existent hypervisor should fail

class HypervisorAdminNegativeUnderV252Test(*args, **kwargs)[source]

Bases: HypervisorAdminNegativeTestBase

Tests Hypervisors API below ver 2.53 that require admin privileges

test_search_hypervisor_with_non_admin_user()[source]

Test idempotent id: 5b6a6c79-5dc1-4fa5-9c58-9c8085948e74

Test searching hypervisor by non admin user should fail

test_search_nonexistent_hypervisor()[source]

Test idempotent id: 19a45cc1-1000-4055-b6d2-28e8b2ec4faa

Test searching non existent hypervisor should fail

test_show_servers_with_non_admin_user()[source]

Test idempotent id: 2a0a3938-832e-4859-95bf-1c57c236b924

Test showing hypervisor servers by non admin user should fail

test_show_servers_with_nonexistent_hypervisor()[source]

Test idempotent id: 02463d69-0ace-4d33-a4a8-93d7883a2bba

Test showing servers on non existent hypervisor should fail

compute.admin.test_instance_usage_audit_log module

class InstanceUsageAuditLogTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Test instance usage audit logs API

test_get_instance_usage_audit_log()[source]

Test idempotent id: 6e40459d-7c5f-400b-9e83-449fbc8e7feb

Test getting instance usage audit log before specified time

test_list_instance_usage_audit_logs()[source]

Test idempotent id: 25319919-33d9-424f-9f99-2c203ee48b9d

Test listing instance usage audit logs

compute.admin.test_instance_usage_audit_log_negative module

class InstanceUsageAuditLogNegativeTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Negative tests of instance usage audit logs

test_get_instance_usage_audit_logs_with_invalid_time()[source]

Test idempotent id: 9b952047-3641-41c7-ba91-a809fc5974c8

Test showing instance usage audit logs with invalid time

Showing instance usage audit logs with invalid time should fail.

test_instance_usage_audit_logs_with_nonadmin_user()[source]

Test idempotent id: a9d33178-d2c9-4131-ad3b-f4ca8d0308a2

Test list/show instance usage audit logs by non-admin should fail

The instance_usage_audit_logs API just can be accessed by admin user.

compute.admin.test_keypairs_v210 module

class KeyPairsV210TestJSON(*args, **kwargs)[source]

Bases: BaseKeypairTest

Tests KeyPairs API with microversion higher than 2.9

test_admin_manage_keypairs_for_other_users()[source]

Test idempotent id: 3c8484af-cfb3-48f6-b8ba-d5d58bbf3eac

Test admin managing keypairs for other users

First admin creates a keypair for an other user, then admin lists keypairs filtered by that user, and keypairs created for that user should appear in the result and keypairs not created for that user should not appear in the result.

compute.admin.test_live_migration module

class LiveAutoBlockMigrationV225Test(*args, **kwargs)[source]

Bases: LiveMigrationTest

class LiveMigrationRemoteConsolesV26Test(*args, **kwargs)[source]

Bases: LiveMigrationTestBase

test_live_migration_serial_console()[source]

Test idempotent id: 6190af80-513e-4f0f-90f2-9714e84955d7

Test the live-migration of an instance which has a serial console

The serial console feature of an instance uses ports on the host. These ports need to be updated when they are already in use by another instance on the target host. This test checks if this update behavior is correctly done, by connecting to the serial consoles of the instances before and after the live migration.

class LiveMigrationTest(*args, **kwargs)[source]

Bases: LiveMigrationTestBase

test_live_block_migration()[source]

Test idempotent id: 1dce86b8-eb04-4c03-a9d8-9c1dc3ee0c7b

Test live migrating an active server

test_live_block_migration_paused()[source]

Test idempotent id: 1e107f21-61b2-4988-8f22-b196e938ab88

Test live migrating a paused server

test_live_block_migration_with_attached_volume()[source]

Test idempotent id: e19c0cc6-6720-4ed8-be83-b6603ed5c812

Test the live-migration of an instance with an attached volume.

This tests the live-migration of an instance with both a local disk and attach volume. This differs from test_volume_backed_live_migration above that tests live-migration with only an attached volume.

test_live_migration_with_trunk()[source]

Test idempotent id: 0022c12e-a482-42b0-be2d-396b5f0cffe3

Test live migration with trunk and subport

test_volume_backed_live_migration()[source]

Test idempotent id: 5071cf17-3004-4257-ae61-73a84e28badd

Test live migrating an active server booted from volume

class LiveMigrationTestBase(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Test live migration operations supported by admin user

compute.admin.test_live_migration_negative module

class LiveMigrationNegativeTest(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Negative tests of live migration

test_invalid_host_for_migration()[source]

Test idempotent id: 7fb7856e-ae92-44c9-861a-af62d7830bcb

Test migrating to an invalid host should not change the status

test_live_block_migration_suspended()[source]

Test idempotent id: 6e2f94f5-2ee8-4830-bef5-5bc95bb0795b

Test migrating a suspended server should not change the status

compute.admin.test_migrations module

class MigrationsAdminTest(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Test migration operations supported by admin user

test_cold_migration()[source]

Test idempotent id: 4bf0be52-3b6f-4746-9a27-3143636fe30d

Test cold migrating server and then confirm the migration

test_list_migrations()[source]

Test idempotent id: 75c0b83d-72a0-4cf8-a153-631e83e7d53f

Test admin user can get the migrations list

test_list_migrations_in_flavor_resize_situation()[source]

Test idempotent id: 1b512062-8093-438e-b47a-37d2f597cd64

Admin can get the migrations list containing the resized server

test_resize_server_revert_deleted_flavor()[source]

Test idempotent id: 33f1fec3-ba18-4470-8e4e-1d888e7c3593

Test reverting resized server with original flavor deleted

Tests that we can revert the resize on an instance whose original flavor has been deleted.

test_revert_cold_migration()[source]

Test idempotent id: caa1aa8b-f4ef-4374-be0d-95f001c2ac2d

Test cold migrating server and then revert the migration

compute.admin.test_networks module

class NetworksTest(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Tests Nova Networks API that usually requires admin privileges.

API docs: https://docs.openstack.org/api-ref/compute/#networks-os-networks-deprecated

test_get_network()[source]

Test idempotent id: d206d211-8912-486f-86e2-a9d090d1f416

Test getting network from nova side

test_list_all_networks()[source]

Test idempotent id: df3d1046-6fa5-4b2c-ad0c-cfa46a351cb9

Test getting all networks from nova side

compute.admin.test_quotas module

class QuotaClassesAdmin257Test(*args, **kwargs)[source]

Bases: QuotaClassesAdminTestJSON

Test compute quotas with microversion greater than 2.56

# NOTE(gmann): This test tests the Quota class APIs response schema # for 2.57 microversion. No specific assert or behaviour verification # is needed.

class QuotaClassesAdminTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Tests the os-quota-class-sets API to update default quotas.

test_update_default_quotas()[source]

Test idempotent id: 7932ab0f-5136-4075-b201-c0e2338df51a

Test updating default compute quota class set

class QuotasAdminTestBase(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

class QuotasAdminTestJSON(*args, **kwargs)[source]

Bases: QuotasAdminTestBase

Test compute quotas by admin user

test_delete_quota()[source]

Test idempotent id: 389d04f0-3a41-405f-9317-e5f86e3c44f0

Test admin can delete the compute quota set for a project

test_get_default_quotas()[source]

Test idempotent id: 3b0a7c8f-cf58-46b8-a60c-715a32a8ba7d

Test admin can get the default compute quota set for a project

test_get_updated_quotas()[source]

Test idempotent id: ce9e0815-8091-4abd-8345-7fe5b85faa1d

Test that GET shows the updated quota set of project

test_update_all_quota_resources_for_tenant()[source]

Test idempotent id: 55fbe2bf-21a9-435b-bbd2-4162b0ed799a

Test admin can update all the compute quota limits for a project

class QuotasAdminTestV236(*args, **kwargs)[source]

Bases: QuotasAdminTestBase

Test compute quotas with microversion greater than 2.35

# NOTE(gmann): This test tests the Quota APIs response schema # for 2.36 microversion. No specific assert or behaviour verification # is needed.

test_get_updated_quotas()[source]

Test idempotent id: 4268b5c9-92e5-4adc-acf1-3a2798f3d803

Test compute quotas API with microversion greater than 2.35

Checking compute quota update, get, get details APIs response schema.

class QuotasAdminTestV257(*args, **kwargs)[source]

Bases: QuotasAdminTestBase

Test compute quotas with microversion greater than 2.56

# NOTE(gmann): This test tests the Quota APIs response schema # for 2.57 microversion. No specific assert or behaviour verification # is needed.

test_get_updated_quotas()[source]

Test idempotent id: e641e6c6-e86c-41a4-9e5c-9493c0ae47ad

Test compute quotas API with microversion greater than 2.56

Checking compute quota update, get, get details APIs response schema.

compute.admin.test_quotas_negative module

class QuotasAdminNegativeTest(*args, **kwargs)[source]

Bases: QuotasAdminNegativeTestBase

Negative tests of nova quotas

test_create_server_when_cpu_quota_is_full()[source]

Test idempotent id: 91058876-9947-4807-9f22-f6eb17140d9b

Disallow server creation when tenant’s vcpu quota is full

test_create_server_when_instances_quota_is_full()[source]

Test idempotent id: 7c6be468-0274-449a-81c3-ac1c32ee0161

Once instances quota limit is reached, disallow server creation

test_create_server_when_memory_quota_is_full()[source]

Test idempotent id: 6fdd7012-584d-4327-a61c-49122e0d5864

Disallow server creation when tenant’s memory quota is full

test_update_quota_normal_user()[source]

Test idempotent id: 733abfe8-166e-47bb-8363-23dbd7ff3476

Test updating nova quota by normal user should fail

class QuotasAdminNegativeTestBase(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

class QuotasSecurityGroupAdminNegativeTest(*args, **kwargs)[source]

Bases: QuotasAdminNegativeTestBase

Negative tests of nova security group quota

test_security_groups_exceed_limit()[source]

Test idempotent id: 7c6c8f3b-2bf6-4918-b240-57b136a66aa0

Negative test: Creation Security Groups over limit should FAIL

test_security_groups_rules_exceed_limit()[source]

Test idempotent id: 6e9f436d-f1ed-4f8e-a493-7275dfaa4b4d

Negative test: Creation of Security Group Rules should FAIL

compute.admin.test_security_groups module

class SecurityGroupsTestAdminJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Test security groups API that requires admin privilege

Test security groups API that requires admin privilege with compute microversion less than 2.36

test_list_security_groups_list_all_tenants_filter()[source]

Test idempotent id: 49667619-5af9-4c63-ab5d-2cfdd1c8f7f1

Test listing security groups with all_tenants filter

  1. Create two security groups for non-admin user

  2. Create two security groups for admin user

  3. Fetch all security groups based on ‘all_tenants’ search filter by admin, check that all four created security groups are present in fetched list

  4. Fetch all security groups based on ‘all_tenants’ search filter by non-admin, check only two security groups created by the provided non-admin user are present in fetched list

compute.admin.test_server_diagnostics module

class ServerDiagnosticsTest(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Test server diagnostics with compute microversion less than 2.48

test_get_server_diagnostics()[source]

Test idempotent id: 31ff3486-b8a0-4f56-a6c0-aab460531db3

Test getting server diagnostics

class ServerDiagnosticsV248Test(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Test server diagnostics with compute microversion greater than 2.47

test_get_server_diagnostics()[source]

Test idempotent id: 64d0d48c-dff1-11e6-bf01-fe55135034f3

Test getting server diagnostics

compute.admin.test_server_diagnostics_negative module

class ServerDiagnosticsNegativeTest(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Negative tests of server diagnostics

test_get_server_diagnostics_by_non_admin()[source]

Test idempotent id: e84e2234-60d2-42fa-8b30-e2d3049724ac

Test getting server diagnostics by non-admin user is forbidden

Non-admin user cannot view server diagnostics according to policy.

compute.admin.test_server_external_events module

class ServerExternalEventsTest(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Test server external events test

test_create_server_external_events()[source]

Test idempotent id: 6bbf4723-61d2-4372-af55-7ba27f1c9ba6

Test create a server and add some external events

compute.admin.test_servers module

class ServersAdmin275Test(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Test compute server with microversion greater than 2.75

# NOTE(gmann): This test tests the Server APIs response schema # for 2.75 microversion. No specific assert or behaviour verification # is needed.

test_rebuild_update_server_275()[source]

Test idempotent id: bf2b4a00-73a3-4d53-81fa-acbcd97d6339

class ServersAdminTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Tests Servers API using admin privileges

test_create_server_with_scheduling_hint()[source]

Test idempotent id: fdcd9b33-0903-4e00-a1f7-b5f6543068d6

Test creating server with scheduling hint

test_inject_network_info()[source]

Test idempotent id: 7a1323b4-a6a2-497a-96cb-76c07b945c71

Test injecting network info of a server

test_list_servers_by_admin()[source]

Test idempotent id: 51717b38-bdc1-458b-b636-1cf82d99f62f

Test listing servers by admin without other projects

Listing servers by admin user returns a list which doesn’t contain the other projects’ server by default.

test_list_servers_by_admin_with_all_tenants()[source]

Test idempotent id: 9f5579ae-19b4-4985-a091-2a5d56106580

Test listing servers by admin with all tenants

Listing servers by admin user with all tenants parameter, all servers should be listed.

test_list_servers_by_admin_with_specified_tenant()[source]

Test idempotent id: 7e5d6b8f-454a-4ba1-8ae2-da857af8338b

Test listing servers by admin with specified project

In nova v2, tenant_id is ignored unless all_tenants is specified.

test_list_servers_detailed_filter_by_invalid_status()[source]

Test idempotent id: d56e9540-73ed-45e0-9b88-98fc419087eb

Test filtering the list of servers by invalid server status

test_list_servers_filter_by_error_status()[source]

Test idempotent id: 06f960bb-15bb-48dc-873d-f96e89be7870

Test filtering the list of servers by server error status

test_list_servers_filter_by_exist_host()[source]

Test idempotent id: 86c7a8f7-50cf-43a9-9bac-5b985317134f

Test filtering the list of servers by existent host

test_rebuild_server_in_error_state()[source]

Test idempotent id: 682cb127-e5bb-4f53-87ce-cb9003604442

Test rebuilding server in error state

The server in error state should be rebuilt using the provided image and changed to ACTIVE state.

test_reset_state_server()[source]

Test idempotent id: ee8ae470-db70-474d-b752-690b7892cab1

Test resetting server state to error/active

compute.admin.test_servers_negative module

class ServersAdminNegativeTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Negative Tests of Servers API using admin privileges

test_migrate_non_existent_server()[source]

Test idempotent id: 46a4e1ca-87ae-4d28-987a-1b6b136a0221

Test migrating a non existent server should fail

test_migrate_server_invalid_state()[source]

Test idempotent id: b0b17f83-d14e-4fc4-8f31-bcc9f3cfa629

Test migrating a server with invalid state should fail

test_reset_state_server_invalid_state()[source]

Test idempotent id: b0b4d8af-1256-41ef-9ee7-25f1c19dde80

Test resetting server state to invalid state value should fail

test_reset_state_server_invalid_type()[source]

Test idempotent id: 4cdcc984-fab0-4577-9a9d-6d558527ee9d

Test resetting server state to invalid state type should fail

test_reset_state_server_nonexistent_server()[source]

Test idempotent id: e741298b-8df2-46f0-81cb-8f814ff2504c

Test resetting a non existent server’s state should fail

test_resize_server_using_overlimit_ram()[source]

Test idempotent id: 28dcec23-f807-49da-822c-56a92ea3c687

Test resizing server using over limit ram should fail

test_resize_server_using_overlimit_vcpus()[source]

Test idempotent id: 7368a427-2f26-4ad9-9ba9-911a0ec2b0db

Test resizing server using over limit vcpus should fail

compute.admin.test_servers_on_multinodes module

class ServersOnMultiNodesTest(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Test creating servers on multiple nodes with scheduler_hints.

test_create_server_with_scheduler_hint_group_affinity()[source]

Test idempotent id: 9d2e924a-baf4-11e7-b856-fa163e65f5ce

Tests the ServerGroupAffinityFilter

Creates two servers in an affinity server group and asserts the servers are in the group and on same host.

test_create_server_with_scheduler_hint_group_anti_affinity()[source]

Test idempotent id: f8bd0867-e459-45f5-ba53-59134552fe04

Tests the ServerGroupAntiAffinityFilter

Creates two servers in an anti-affinity server group and asserts the servers are in the group and on different hosts.

test_create_servers_on_different_hosts()[source]

Test idempotent id: cc7ca884-6e3e-42a3-a92f-c522fcf25e8e

Test creating servers with hints of single ‘different_host’

test_create_servers_on_different_hosts_with_list_of_servers()[source]

Test idempotent id: 7869cc84-d661-4e14-9f00-c18cdc89cf57

Test creating servers with hints of a list of ‘different_host’

test_create_servers_on_same_host()[source]

Test idempotent id: 26a9d5df-6890-45f2-abc4-a659290cb130

Test creating servers with hints ‘same_host’

class UnshelveToHostMultiNodesTest(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Test to unshelve server in between hosts.

test_unshelve_to_specific_host()[source]

Test idempotent id: b5cc0889-50c2-46a0-b8ff-b5fb4c3a6e20

Test unshelve to a specific host, new behavior introduced in

microversion 2.91. 1. Shelve offload server. 2. Request unshelve to original host and verify server land on it. 3. Shelve offload server again. 4. Request unshelve to the other host and verify server land on it.

compute.admin.test_services module

class ServicesAdminTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Tests Nova Services API.

List and Enable/Disable require admin privileges.

test_get_service_by_host_name()[source]

Test idempotent id: affb42d5-5b4b-43c8-8b0b-6dca054abcca

Listing nova services by host name

test_get_service_by_service_binary_name()[source]

Test idempotent id: f345b1ec-bc6e-4c38-a527-3ca2bc00bef5

Listing nova services by binary name

test_list_services()[source]

Test idempotent id: 5be41ef4-53d1-41cc-8839-5c2a48a1b283

Listing nova services

compute.admin.test_services_negative module

class ServicesAdminNegativeTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Tests Services API. List and Enable/Disable require admin privileges.

test_get_service_by_invalid_params()[source]

Test idempotent id: d0884a69-f693-4e79-a9af-232d15643bf7

Test listing services by invalid filter should return all services

Expect all services to be returned when the request contains invalid parameters.

test_get_service_by_invalid_service_and_valid_host()[source]

Test idempotent id: 1e966d4a-226e-47c7-b601-0b18a27add54

Test listing services by invalid service and valid host value

test_get_service_with_valid_service_and_invalid_host()[source]

Test idempotent id: 64e7e7fb-69e8-4cb6-a71d-8d5eb0c98655

Test listing services by valid service and invalid host value

test_list_services_with_non_admin_user()[source]

Test idempotent id: 1126d1f8-266e-485f-a687-adc547492646

Non admin user is not allowed to list nova services

class ServicesAdminNegativeV253TestJSON(*args, **kwargs)[source]

Bases: ServicesAdminNegativeTestJSON

test_disable_log_reason_with_invalid_service_id()[source]

Test idempotent id: f46a9d91-1e85-4b96-8e7a-db7706fa2e9a

Test updating non existing service to disabled with reason

test_disable_service_with_invalid_service_id()[source]

Test idempotent id: a9eeeade-42b3-419f-87aa-c9342aa068cf

Test updating non existing service to status disabled

test_enable_service_with_invalid_service_id()[source]

Test idempotent id: 508671aa-c929-4479-bd10-8680d40dd0a6

Test updating non existing service to status enabled

compute.admin.test_simple_tenant_usage module

class TenantUsagesTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Test tenant usages

test_get_usage_tenant()[source]

Test idempotent id: 94135049-a4c5-4934-ad39-08fa7da4f22e

Test getting usage for a specific tenant

test_get_usage_tenant_with_non_admin_user()[source]

Test idempotent id: 9d00a412-b40e-4fd9-8eba-97b496316116

Test getting usage for a specific tenant with non admin user

test_list_usage_all_tenants()[source]

Test idempotent id: 062c8ae9-9912-4249-8b51-e38d664e926e

Test getting usage for all tenants

compute.admin.test_simple_tenant_usage_negative module

class TenantUsagesNegativeTestJSON(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Negative tests of compute tenant usages API

test_get_usage_tenant_with_empty_tenant_id()[source]

Test idempotent id: 8b21e135-d94b-4991-b6e9-87059609c8ed

Test getting tenant usage with empty tenant id should fail

test_get_usage_tenant_with_invalid_date()[source]

Test idempotent id: 4079dd2a-9e8d-479f-869d-6fa985ce45b6

Test getting tenant usage with invalid time range should fail

test_list_usage_all_tenants_with_non_admin_user()[source]

Test idempotent id: bbe6fe2c-15d8-404c-a0a2-44fad0ad5cc7

Test listing usage of all tenants by non-admin user is forbidden

compute.admin.test_volume module

class AttachSCSIVolumeTestJSON(*args, **kwargs)[source]

Bases: BaseAttachSCSIVolumeTest

Test attaching scsi volume to server

test_attach_scsi_disk_with_config_drive()[source]

Test idempotent id: 777e468f-17ca-4da4-b93d-b7dbf56c0494

Test the attach/detach volume with config drive/scsi disk

Enable the config drive, followed by booting an instance from an image with meta properties hw_cdrom: scsi and use virtio-scsi mode with further asserting list volume attachments in instance after attach and detach of the volume.

class BaseAttachSCSIVolumeTest(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Base class for the admin volume tests in this module.

compute.admin.test_volume_swap module

class TestMultiAttachVolumeSwap(*args, **kwargs)[source]

Bases: TestVolumeSwapBase

Test swapping volume attached to multiple servers

Test swapping volume attached to multiple servers with microversion greater than 2.59

test_volume_swap_with_multiattach()[source]

Test idempotent id: e8f8f9d1-d7b7-4cd2-8213-ab85ef697b6e

Test swapping volume attached to multiple servers

The following is the scenario outline:

  1. Create a volume “volume1” with non-admin.

  2. Create a volume “volume2” with non-admin.

  3. Boot 2 instances “server1” and “server2” with non-admin.

  4. Attach “volume1” to “server1” with non-admin.

  5. Attach “volume1” to “server2” with non-admin.

  6. Swap “volume1” to “volume2” on “server1”

  7. Check “volume1” is attached to “server2” and not attached to “server1”

  8. Check “volume2” is attached to “server1”.

class TestVolumeSwap(*args, **kwargs)[source]

Bases: TestVolumeSwapBase

The test suite for swapping of volume with admin user

test_volume_swap()[source]

Test idempotent id: 1769f00d-a693-4d67-a631-6a3496773813

Test swapping of volume attached to server with admin user

The following is the scenario outline:

  1. Create a volume “volume1” with non-admin.

  2. Create a volume “volume2” with non-admin.

  3. Boot an instance “instance1” with non-admin.

  4. Attach “volume1” to “instance1” with non-admin.

  5. Swap volume from “volume1” to “volume2” as admin.

  6. Check the swap volume is successful and “volume2” is attached to “instance1” and “volume1” is in available state.

  7. Swap volume from “volume2” to “volume1” as admin.

  8. Check the swap volume is successful and “volume1” is attached to “instance1” and “volume2” is in available state.

class TestVolumeSwapBase(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

compute.admin.test_volumes_negative module

class UpdateMultiattachVolumeNegativeTest(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Negative tests of swapping volume attached to multiple servers

Negative tests of swapping volume attached to multiple servers with compute microversion greater than 2.59 and volume microversion greater than 3.26

test_multiattach_rw_volume_update_failure()[source]

Test idempotent id: 7576d497-b7c6-44bd-9cc5-c5b4e50fec71

Test swapping volume attached to multi-servers with read-write mode

  1. Create two volumes “vol1” and “vol2”

  2. Create two instances “server1” and “server2”

  3. Attach “vol1” to both of these instances

  4. By default both of these attachments should have an attach_mode of read-write, so trying to swap “vol1” to “vol2” should fail

  5. Check “vol1” is still attached to both servers

  6. Check “vol2” is not attached to any server

class VolumesAdminNegativeTest(*args, **kwargs)[source]

Bases: BaseV2ComputeAdminTest

Negative tests of volume swapping

test_update_attached_volume_with_nonexistent_volume_in_body()[source]

Test idempotent id: 7dcac15a-b107-46d3-a5f6-cb863f4e454a

Test swapping volume to a non existence volume should fail

test_update_attached_volume_with_nonexistent_volume_in_uri()[source]

Test idempotent id: 309b5ecd-0585-4a7e-a36f-d2b2bf55259d

Test swapping non existent volume should fail

Module contents