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
compute.admin.test_assisted_volume_snapshots module¶
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.
compute.admin.test_availability_zone module¶
compute.admin.test_availability_zone_negative module¶
compute.admin.test_create_server module¶
compute.admin.test_delete_server module¶
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
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.
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
compute.admin.test_flavors_extra_specs module¶
- 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
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
compute.admin.test_flavors_microversions module¶
- class FlavorsV255TestJSON(*args, **kwargs)[source]¶
Bases:
BaseV2ComputeAdminTest
Test flavors API with compute 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
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
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
- class HypervisorAdminUnderV252Test(*args, **kwargs)[source]¶
Bases:
HypervisorAdminTestBase
Tests Hypervisors API below 2.53 that require admin privileges
- class HypervisorAdminV228Test(*args, **kwargs)[source]¶
Bases:
HypervisorAdminTestBase
Tests Hypervisors API higher than 2.27 that require admin privileges
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
- 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
compute.admin.test_instance_usage_audit_log module¶
compute.admin.test_instance_usage_audit_log_negative module¶
- class InstanceUsageAuditLogNegativeTestJSON(*args, **kwargs)[source]¶
Bases:
BaseV2ComputeAdminTest
Negative tests of instance usage audit logs
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.
compute.admin.test_live_migration_negative module¶
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
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
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.
- 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
- 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.
- 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.
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
- class QuotasSecurityGroupAdminNegativeTest(*args, **kwargs)[source]¶
Bases:
QuotasAdminNegativeTestBase
Negative tests of nova security group quota
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
Create two security groups for non-admin user
Create two security groups for admin user
Fetch all security groups based on ‘all_tenants’ search filter by admin, check that all four created security groups are present in fetched list
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¶
compute.admin.test_server_diagnostics_negative module¶
compute.admin.test_server_external_events module¶
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.
- 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
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
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’
- 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
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
- 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
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
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
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.
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:
Create a volume “volume1” with non-admin.
Create a volume “volume2” with non-admin.
Boot 2 instances “server1” and “server2” with non-admin.
Attach “volume1” to “server1” with non-admin.
Attach “volume1” to “server2” with non-admin.
Swap “volume1” to “volume2” on “server1”
Check “volume1” is attached to “server2” and not attached to “server1”
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:
Create a volume “volume1” with non-admin.
Create a volume “volume2” with non-admin.
Boot an instance “instance1” with non-admin.
Attach “volume1” to “instance1” with non-admin.
Swap volume from “volume1” to “volume2” as admin.
Check the swap volume is successful and “volume2” is attached to “instance1” and “volume1” is in available state.
Swap volume from “volume2” to “volume1” as admin.
Check the swap volume is successful and “volume1” is attached to “instance1” and “volume2” is in available state.
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
Create two volumes “vol1” and “vol2”
Create two instances “server1” and “server2”
Attach “vol1” to both of these instances
By default both of these attachments should have an attach_mode of read-write, so trying to swap “vol1” to “vol2” should fail
Check “vol1” is still attached to both servers
Check “vol2” is not attached to any server
- class VolumesAdminNegativeTest(*args, **kwargs)[source]¶
Bases:
BaseV2ComputeAdminTest
Negative tests of volume swapping