scenario package¶
Submodules¶
scenario.manager module¶
- class EncryptionScenarioTest(*args, **kwargs)[source]¶
Bases:
ScenarioTest
Base class for encryption scenario tests
- class NetworkScenarioTest(*args, **kwargs)[source]¶
Bases:
ScenarioTest
Base class for network scenario tests.
This class provide helpers for network scenario tests, using the neutron API. Helpers from ancestor which use the nova network API are overridden with the neutron API.
This Class also enforces using Neutron instead of novanetwork. Subclassed tests will be skipped if Neutron is not enabled
- class ObjectStorageScenarioTest(*args, **kwargs)[source]¶
Bases:
ScenarioTest
Provide harness to do Object Storage scenario tests.
Subclasses implement the tests that use the methods provided by this class.
scenario.test_compute_unified_limits module¶
- class ComputeProjectQuotaTest(*args, **kwargs)[source]¶
Bases:
ScenarioTest
The test base class for compute unified limits tests.
Dynamic credentials (unique tenants) are created on a per-class basis, so we test different quota limits in separate test classes to prevent a quota limit update in one test class from affecting a test running in another test class in parallel.
https://docs.openstack.org/tempest/latest/configuration.html#dynamic-credentials
- class ServersQuotaTest(*args, **kwargs)[source]¶
Bases:
ComputeProjectQuotaTest
scenario.test_dashboard_basic_ops module¶
scenario.test_encrypted_cinder_volumes module¶
- class TestEncryptedCinderVolumes(*args, **kwargs)[source]¶
Bases:
EncryptionScenarioTest
The test suite for encrypted cinder volumes
This test is for verifying the functionality of encrypted cinder volumes.
For both LUKS (v1 & v2) and cryptsetup encryption types, this test performs the following:
Boots an instance from an image (CONF.compute.image_ref)
Creates an encryption type (as admin)
Creates a volume of that encryption type (as a regular user)
Attaches and detaches the encrypted volume to the instance
- test_encrypted_cinder_volumes_cryptsetup()[source]¶
Test idempotent id: cbc752ed-b716-4717-910f-956cce965722
scenario.test_instances_with_cinder_volumes module¶
- class TestInstancesWithCinderVolumes(*args, **kwargs)[source]¶
Bases:
ScenarioTest
This is cinder volumes test.
Tests are below: * test_instances_with_cinder_volumes_on_all_compute_nodes
- test_instances_with_cinder_volumes_on_all_compute_nodes()[source]¶
Test idempotent id: d0e3c1a3-4b0a-4b0e-8b0a-4b0e8b0a4b0e
Test instances with cinder volumes launches on all compute nodes
- Steps:
Create an image
Create a keypair
Create a bootable volume from the image and of the given volume type
Boot an instance from the bootable volume on each available compute node, up to CONF.compute.min_compute_nodes
Create a volume using each volume_types_for_data_volume on all available compute nodes, up to CONF.compute.min_compute_nodes. Total number of volumes is equal to compute nodes * len(volume_types_for_data_volume)
Attach volumes to the instances
Assign floating IP to all instances
Configure security group for ssh access to all instances
Confirm ssh access to all instances
Run write test to all volumes through ssh connection per instance
Clean up the sources, an instance, volumes, keypair and image
scenario.test_minimum_basic module¶
- class TestMinimumBasicScenario(*args, **kwargs)[source]¶
Bases:
ScenarioTest
This is a basic minimum scenario test.
These tests below: * across the multiple components * as a regular user * with and without optional parameters * check command outputs
- test_minimum_basic_instance_hard_reboot_after_vol_snap_deletion()[source]¶
Test idempotent id: a8fd48ec-1d01-4895-b932-02321661ec1e
Test compute hard reboot after volume snapshot deleted
Steps: 1. Create image 2. Create keypair 3. Boot instance with keypair and get list of instances 4. Create volume and show list of volumes 5. Attach volume to instance and getlist of volumes 6. Create a snapshot from volume 7. Add IP to instance 8. Create and add security group to instance 9. Check SSH connection to instance 10. Write data timestamp to the attached volume 11. Delete volume snapshot before reboot instance 12. Reboot instance (HARD) 13. Check SSH connection to instance after reboot 14. Verify attached disk data timestamp post instance reboot
- test_minimum_basic_scenario()[source]¶
Test idempotent id: bdbb5441-9204-419d-a225-b4fdbfb1a1a8
This is a basic minimum scenario with multiple components
Steps: 1. Create image 2. Create keypair 3. Boot instance with keypair and get list of instances 4. Create volume and show list of volumes 5. Attach volume to instance and getlist of volumes 6. Add IP to instance 7. Create and add security group to instance 8. Check SSH connection to instance 9. Reboot instance 10. Check SSH connection to instance after reboot
scenario.test_network_advanced_server_ops module¶
- class BaseTestNetworkAdvancedServerOps(*args, **kwargs)[source]¶
Bases:
NetworkScenarioTest
Base class for defining methods used in tests.
- class TestNetworkAdvancedServerMigrationWithHost(*args, **kwargs)[source]¶
Bases:
BaseTestNetworkAdvancedServerOps
Check VM connectivity with specifying source and destination hosts:
Resize an instance by creating server on configured source host
- Migrate server by creating it on configured source host and migrate it
Cold Migration
Cold Migration with revert
Live Migration
- test_server_connectivity_cold_migration()[source]¶
Test idempotent id: 14f0c9e6-79ae-11ee-b962-0242ac120002
- test_server_connectivity_cold_migration_revert()[source]¶
Test idempotent id: 2627789a-79ae-11ee-b962-0242ac120002
- class TestNetworkAdvancedServerOps(*args, **kwargs)[source]¶
Bases:
BaseTestNetworkAdvancedServerOps
Check VM connectivity after some advanced instance operations executed:
Stop/Start an instance
Reboot an instance
Rebuild an instance
Pause/Unpause an instance
Suspend/Resume an instance
- test_server_connectivity_cold_migration()[source]¶
Test idempotent id: a4858f6c-401e-4155-9a49-d5cd053d1a2f
- test_server_connectivity_cold_migration_revert()[source]¶
Test idempotent id: 25b188d7-0183-4b1e-a11d-15840c8e2fd6
- test_server_connectivity_live_migration()[source]¶
Test idempotent id: 03fd1562-faad-11e7-9ea0-fa163e65f5ce
- test_server_connectivity_pause_unpause()[source]¶
Test idempotent id: 2b2642db-6568-4b35-b812-eceed3fa20ce
- test_server_connectivity_rebuild()[source]¶
Test idempotent id: 88a529c2-1daa-4c85-9aec-d541ba3eb699
scenario.test_network_basic_ops module¶
- class Floating_IP_tuple(floating_ip, server)¶
Bases:
tuple
- class TestNetworkBasicOps(*args, **kwargs)[source]¶
Bases:
NetworkScenarioTest
The test suite of network basic operations
This smoke test suite assumes that Nova has been configured to boot VM’s with Neutron-managed networking, and attempts to verify network connectivity as follows:
There are presumed to be two types of networks: tenant and public. A tenant network may or may not be reachable from the Tempest host. A public network is assumed to be reachable from the Tempest host, and it should be possible to associate a public (‘floating’) IP address with a tenant (‘fixed’) IP address to facilitate external connectivity to a potentially unroutable tenant IP address.
This test suite can be configured to test network connectivity to a VM via a tenant network, a public network, or both. If both networking types are to be evaluated, tests that need to be executed remotely on the VM (via ssh) will only be run against one of the networks (to minimize test execution time).
Determine which types of networks to test as follows:
Configure tenant network checks (via the ‘project_networks_reachable’ key) if the Tempest host should have direct connectivity to tenant networks. This is likely to be the case if Tempest is running on the same host as a single-node devstack installation with IP namespaces disabled.
Configure checks for a public network if a public network has been configured prior to the test suite being run and if the Tempest host should have connectivity to that public network. Checking connectivity for a public network requires that a value be provided for ‘public_network_id’. A value can optionally be provided for ‘public_router_id’ if tenants will use a shared router to access a public network (as is likely to be the case when IP namespaces are not enabled). If a value is not provided for ‘public_router_id’, a router will be created for each tenant and use the network identified by ‘public_network_id’ as its gateway.
- test_connectivity_between_vms_on_different_networks()[source]¶
Test idempotent id: 1546850e-fbaa-42f5-8b5f-03d8a6a95f15
Test connectivity between VMs on different networks
For a freshly-booted VM with an IP address (“port”) on a given network:
the Tempest host can ping the IP address.
- the Tempest host can ssh into the VM via the IP address and
successfully execute the following:
ping an external IP address, implying external connectivity.
- ping an external hostname, implying that dns is correctly
configured.
- ping an internal IP address, implying connectivity to another
VM on the same network.
- Create another network on the same tenant with subnet, create
an VM on the new network.
- Ping the new VM from previous VM failed since the new network
was not attached to router yet.
- Attach the new network to the router, Ping the new VM from
previous VM succeed.
- test_hotplug_nic()[source]¶
Test idempotent id: c5adff73-e961-41f1-b4a9-343614f18cfa
Test hotplug network interface
Create a network and a VM.
Check connectivity to the VM via a public network.
Create a new network, with no gateway.
Bring up a new interface
check the VM reach the new network
- test_mtu_sized_frames()[source]¶
Test idempotent id: b158ea55-472e-4086-8fa9-c64ac0c6c1d0
Validate that network MTU sized frames fit through.
- test_network_basic_ops()[source]¶
Test idempotent id: f323b3ba-82f8-4db7-8ea6-6a895869ec49
Basic network operation test
For a freshly-booted VM with an IP address (“port”) on a given network:
- the Tempest host can ping the IP address. This implies, but
does not guarantee (see the ssh check that follows), that the VM has been assigned the correct IP address and has connectivity to the Tempest host.
- the Tempest host can perform key-based authentication to an
ssh server hosted at the IP address. This check guarantees that the IP address is associated with the target VM.
- the Tempest host can ssh into the VM via the IP address and
successfully execute the following:
ping an external IP address, implying external connectivity.
- ping an external hostname, implying that dns is correctly
configured.
- ping an internal IP address, implying connectivity to another
VM on the same network.
- detach the floating-ip from the VM and verify that it becomes
unreachable
- associate detached floating ip to a new VM and verify connectivity.
VMs are created with unique keypair so connectivity also asserts that floating IP is associated with the new VM instead of the old one
Verifies that floating IP status is updated correctly after each change
- test_port_security_macspoofing_port()[source]¶
Test idempotent id: 7c0bb1a2-d053-49a4-98f9-ca1a1d849f63
Tests port_security extension enforces mac spoofing
Neutron security groups always apply anti-spoof rules on the VMs. This allows traffic to originate and terminate at the VM as expected, but prevents traffic to pass through the VM. Anti-spoof rules are not required in cases where the VM routes traffic through it.
The test steps are:
Create a new network.
Connect (hotplug) the VM to a new network.
Check the VM can ping a server on the new network (“peer”)
Spoof the mac address of the new VM interface.
Check the Security Group enforces mac spoofing and blocks pings via spoofed interface (VM cannot ping the peer).
Disable port-security of the spoofed port- set the flag to false.
Retest 3rd step and check that the Security Group allows pings via the spoofed interface.
- test_preserve_preexisting_port()[source]¶
Test idempotent id: 759462e1-8535-46b0-ab3a-33aa45c55aaa
Test preserve pre-existing port
Tests that a pre-existing port provided on server boot is not deleted if the server is deleted.
Nova should unbind the port from the instance on delete if the port was not created by Nova as part of the boot request.
We should also be able to boot another server with the same port.
- test_router_rescheduling()[source]¶
Test idempotent id: 2e788c46-fb3f-4ac9-8f82-0561555bea73
Tests that router can be removed from agent and add to a new agent.
Verify connectivity
Remove router from all l3-agents
Verify connectivity is down
Assign router to new l3-agent (or old one if no new agent is available)
Verify connectivity
- test_subnet_details()[source]¶
Test idempotent id: d8bb918e-e2df-48b2-97cd-b73c95450980
Tests that subnet’s extra configuration details are affecting VMs.
This test relies on non-shared, isolated tenant networks.
NOTE: Neutron subnets push data to servers via dhcp-agent, so any update in subnet requires server to actively renew its DHCP lease.
Configure subnet with dns nameserver
retrieve the VM’s configured dns and verify it matches the one configured for the subnet.
update subnet’s dns
retrieve the VM’s configured dns and verify it matches the new one configured for the subnet.
TODO(yfried): add host_routes
any resolution check would be testing either:
l3 forwarding (tested in test_network_basic_ops)
Name resolution of an external DNS nameserver - out of scope for Tempest
- test_update_instance_port_admin_state()[source]¶
Test idempotent id: f5dfcc22-45fd-409f-954c-5bd500d7890b
Test to update admin_state_up attribute of instance port
- Check public and project connectivity before updating
admin_state_up attribute of instance port to False
- Check public and project connectivity after updating
admin_state_up attribute of instance port to False
- Check public and project connectivity after updating
admin_state_up attribute of instance port to True
- test_update_router_admin_state()[source]¶
Test idempotent id: 04b9fe4e-85e8-4aea-b937-ea93885ac59f
Test to update admin state up of router
- Check public connectivity before updating
admin_state_up attribute of router to False
- Check public connectivity after updating
admin_state_up attribute of router to False
- Check public connectivity after updating
admin_state_up attribute of router to True
scenario.test_network_qos_placement module¶
- class MinBwAllocationPlacementTest(*args, **kwargs)[source]¶
Bases:
NetworkQoSPlacementTestBase
- test_migrate_with_qos_min_bw_allocation()[source]¶
Test idempotent id: 8a98150c-a506-49a5-96c6-73a5e7b04ada
Scenario to migrate VM with QoS min bw allocation in placement
Boot a VM like in test_qos_min_bw_allocation_basic, do the same checks, and * migrate the server * confirm the resize, if the VM state is VERIFY_RESIZE * If the VM goes to ACTIVE state check that allocations are as expected.
- test_qos_min_bw_allocation_basic()[source]¶
Test idempotent id: 78625d92-212c-400e-8695-dd51706858b8
“Basic scenario with QoS min bw allocation in placement.
Steps: * Create prerequisites: ** VLAN type provider network with subnet. ** valid QoS policy with minimum bandwidth rule with min_kbps=1 (This is a simplification to skip the checks in placement for detecting the resource provider tree and inventories, as if bandwidth resource is available 1 kbs will be available). ** invalid QoS policy with minimum bandwidth rule with min_kbs=max integer from placement (this is a simplification again to avoid detection of RP tress and inventories, as placement will reject such big allocation). * Create port with valid QoS policy, and boot VM with that, it should pass. * Create port with invalid QoS policy, and try to boot VM with that, it should fail.
- test_qos_min_bw_allocation_update_policy()[source]¶
Test idempotent id: 79fdaa1c-df62-4738-a0f0-1cff9dc415f6
Test the update of QoS policy on bound port
Related RFE in neutron: #1882804 The scenario is the following: * Have a port with QoS policy and minimum bandwidth rule. * Boot a VM with the port. * Update the port with a new policy with different minimum bandwidth values. * The allocation on placement side should be according to the new rules.
- test_qos_min_bw_allocation_update_policy_direction_change()[source]¶
Test idempotent id: 372b2728-cfed-469a-b5f6-b75779e1ccbe
Test QoS min bw direction change on a bound port
Related RFE in neutron: #1882804 The scenario is the following: * Have a port with QoS policy and minimum bandwidth rule with ingress direction * Boot a VM with the port. * Update the port with a new policy to egress direction in minimum bandwidth rule. * The allocation on placement side should be according to the new rules.
- test_qos_min_bw_allocation_update_policy_from_zero()[source]¶
Test idempotent id: 9cfc3bb8-f433-4c91-87b6-747cadc8958a
Test port without QoS policy to have QoS policy
This scenario checks if updating a port without QoS policy to have QoS policy with minimum_bandwidth rule succeeds only on controlplane, but placement allocation remains 0.
- test_qos_min_bw_allocation_update_policy_to_zero()[source]¶
Test idempotent id: a9725a70-1d28-4e3b-ae0e-450abc235962
Test port with QoS policy to remove QoS policy
In this scenario port with QoS minimum_bandwidth rule update to remove QoS policy results in 0 placement allocation.
- test_qos_min_bw_allocation_update_with_multiple_ports()[source]¶
Test idempotent id: 756ced7f-6f1a-43e7-a851-2fcfc16f3dd7
- test_resize_with_qos_min_bw_allocation()[source]¶
Test idempotent id: c29e7fd3-035d-4993-880f-70819847683f
Scenario to resize VM with QoS min bw allocation in placement.
Boot a VM like in test_qos_min_bw_allocation_basic, do the same checks, and * resize the server with new flavor * confirm the resize, if the VM state is VERIFY_RESIZE * If the VM goes to ACTIVE state check that allocations are as expected.
- class NetworkQoSPlacementTestBase(*args, **kwargs)[source]¶
Bases:
NetworkScenarioTest
Base class for Network QoS testing
Base class for testing Network QoS scenarios involving placement resource allocations.
- class QoSBandwidthAndPacketRateTests(*args, **kwargs)[source]¶
Bases:
NetworkQoSPlacementTestBase
- test_qos_policy_update_on_bound_port()[source]¶
Test idempotent id: fdb260e3-caa5-482d-ac7c-8c22adf3d750
- test_qos_policy_update_on_bound_port_additional_rule()[source]¶
Test idempotent id: f5864761-966c-4e49-b430-ac0044b7d658
- test_qos_policy_update_on_bound_port_from_null_policy()[source]¶
Test idempotent id: e6a20125-a02e-49f5-bcf6-894305ee3715
- test_qos_policy_update_on_bound_port_to_null_policy()[source]¶
Test idempotent id: fbbb9c81-ed21-48c3-bdba-ce2361e93aad
- test_server_create_no_valid_host_due_to_bandwidth()[source]¶
Test idempotent id: 915dd2ce-4890-40c8-9db6-f3e04080c6c1
scenario.test_network_v6 module¶
- class TestGettingAddress(*args, **kwargs)[source]¶
Bases:
NetworkScenarioTest
Test Summary:
- Create network with subnets:
1.1. one IPv4 and 1.2. one or more IPv6 in a given address mode
Boot 2 VMs on this network
Allocate and assign 2 FIP4
Check that vNICs of all VMs gets all addresses actually assigned
Each VM will ping the other’s v4 private address
If ping6 available in VM, each VM will ping all of the other’s v6 addresses as well as the router’s
- test_dualnet_dhcp6_stateless_from_os()[source]¶
Test idempotent id: 76f26acd-9688-42b4-bc3e-cd134c4cb09e
- test_dualnet_multi_prefix_dhcpv6_stateless()[source]¶
Test idempotent id: cf1c4425-766b-45b8-be35-e2959728eb00
scenario.test_object_storage_basic_ops module¶
- class TestObjectStorageBasicOps(*args, **kwargs)[source]¶
Bases:
ObjectStorageScenarioTest
- test_swift_acl_anonymous_download()[source]¶
Test idempotent id: 916c7111-cb1f-44b2-816d-8f760e4ea910
This test will cover below steps:
Create container
Upload object to the new container
Change the ACL of the container
Check if the object can be download by anonymous user
Delete the object and container
- test_swift_basic_ops()[source]¶
Test idempotent id: b920faf1-7b8a-4657-b9fe-9c4512bfb381
Test swift basic ops.
get swift stat.
create container.
upload a file to the created container.
list container’s objects and assure that the uploaded file is present.
download the object and check the content
delete object from container.
list container’s objects and assure that the deleted file is gone.
delete a container.
scenario.test_security_groups_basic_ops module¶
- class TestSecurityGroupsBasicOps(*args, **kwargs)[source]¶
Bases:
NetworkScenarioTest
The test suite for security groups
This test suite assumes that Nova has been configured to boot VM’s with Neutron-managed networking, and attempts to verify cross tenant connectivity as follows
- ssh:
in order to overcome “ip namespace”, each tenant has an “access point” VM with floating-ip open to incoming ssh connection allowing network commands (ping/ssh) to be executed from within the tenant-network-namespace Tempest host performs key-based authentication to the ssh server via floating IP address
connectivity test is done by pinging destination server via source server ssh connection. success - ping returns failure - ping_timeout reached
- multi-node:
Multi-Node mode is enabled when CONF.compute.min_compute_nodes > 1. Tests connectivity between servers on different compute nodes. When enabled, test will boot each new server to different compute nodes.
- setup:
- for primary tenant:
create a network&subnet
create a router (if public router isn’t configured)
connect tenant network to public network via router
- create an access point:
a security group open to incoming ssh connection
a VM with a floating ip
create a general empty security group (same as “default”, but without rules allowing in-tenant traffic)
- tests:
_verify_network_details
_verify_mac_addr: for each access point verify that (subnet, fix_ip, mac address) are as defined in the port list
_test_in_tenant_block: test that in-tenant traffic is disabled without rules allowing it
_test_in_tenant_allow: test that in-tenant traffic is enabled once an appropriate rule has been created
_test_cross_tenant_block: test that cross-tenant traffic is disabled without a rule allowing it on destination tenant
- _test_cross_tenant_allow:
test that cross-tenant traffic is enabled once an appropriate rule has been created on destination tenant.
test that reverse traffic is still blocked
test than reverse traffic is enabled once an appropriate rule has been created on source tenant
- _test_port_update_new_security_group:
test that traffic is blocked with default security group
test that traffic is enabled after updating port with new security group having appropriate rule
_test_multiple_security_groups: test multiple security groups can be associated with the vm
- assumptions:
alt_tenant/user existed and is different from primary_tenant/user
Public network is defined and reachable from the Tempest host
- Public router can either be:
defined, in which case all tenants networks can connect directly to it, and cross tenant check will be done on the private IP of the destination tenant
or
not defined (empty string), in which case each tenant will have its own router connected to the public network
- test_boot_into_disabled_port_security_network_without_secgroup()[source]¶
Test idempotent id: 13ccf253-e5ad-424b-9c4a-97b88a026699
- test_multiple_security_groups()[source]¶
Test idempotent id: d2f77418-fcc4-439d-b935-72eca704e293
Verify multiple security groups and checks that rules
provided in the both the groups is applied onto VM
scenario.test_server_advanced_ops module¶
scenario.test_server_basic_ops module¶
- class TestServerBasicOps(*args, **kwargs)[source]¶
Bases:
ScenarioTest
The test suite for server basic operations
- This smoke test case follows this basic set of operations:
Create a keypair for use in launching an instance
Create a security group to control network access in instance
Add simple permissive rules to the security group
Launch an instance
Perform ssh to instance
Verify metadata service
Verify metadata on config_drive
Terminate the instance
scenario.test_server_multinode module¶
scenario.test_server_volume_attachment module¶
- class TestServerVolumeAttachScenarioOldVersion(*args, **kwargs)[source]¶
Bases:
BaseAttachmentTest
- class TestServerVolumeAttachmentScenario(*args, **kwargs)[source]¶
Bases:
BaseAttachmentTest
Test server attachment behaviors
This tests that volume attachments to servers may not be removed directly and are only allowed through the compute service (bug #2004555).
scenario.test_shelve_instance module¶
- class TestShelveInstance(*args, **kwargs)[source]¶
Bases:
ScenarioTest
This test shelves then unshelves a Nova instance
- The following is the scenario outline:
boot an instance and create a timestamp file in it
shelve the instance
unshelve the instance
check the existence of the timestamp file in the unshelved instance
check the existence of the timestamp file in the unshelved instance, after a cold migrate
scenario.test_snapshot_pattern module¶
- class TestSnapshotPattern(*args, **kwargs)[source]¶
Bases:
ScenarioTest
This test is for snapshotting an instance and booting with it.
- The following is the scenario outline:
boot an instance and create a timestamp file in it
snapshot the instance
add version metadata to the snapshot image
boot a second instance from the snapshot
check the existence of the timestamp file in the second instance
snapshot the instance again
scenario.test_stamp_pattern module¶
- class TestStampPattern(*args, **kwargs)[source]¶
Bases:
ScenarioTest
The test suite for both snapshoting and attaching of volume
This test is for snapshotting an instance/volume and attaching the volume created from snapshot to the instance booted from snapshot. The following is the scenario outline: 1. Boot an instance “instance1” 2. Create a volume “volume1” 3. Attach volume1 to instance1 4. Create a filesystem on volume1 5. Mount volume1 6. Create a file which timestamp is written in volume1 7. Unmount volume1 8. Detach volume1 from instance1 9. Get a snapshot “snapshot_from_volume” of volume1 10. Get a snapshot “snapshot_from_instance” of instance1 11. Boot an instance “instance2” from snapshot_from_instance 12. Create a volume “volume2” from snapshot_from_volume 13. Attach volume2 to instance2 14. Check the existence of a file which created at 6. in volume2
scenario.test_unified_limits module¶
scenario.test_volume_backup_restore module¶
- class TestVolumeBackupRestore(*args, **kwargs)[source]¶
Bases:
ScenarioTest
Test cinder backup and restore
This testcase verifies content preservation after backup and restore operations by booting a server from a restored backup and check the connectivity to it.
The following is the scenario outline: 1. Create volume from image. 2. Create a backup for the volume. 3. Restore the backup. 4. Boot a server from the restored backup. 5. Create a floating ip. 6. Check server connectivity.
scenario.test_volume_boot_pattern module¶
- class TestVolumeBootPattern(*args, **kwargs)[source]¶
Bases:
EncryptionScenarioTest
- test_boot_server_from_encrypted_volume_luks()[source]¶
Test idempotent id: cb78919a-e553-4bab-b73b-10cf4d2eb125
LUKs v1 decrypts volume through libvirt.
- test_boot_server_from_encrypted_volume_luksv2()[source]¶
Test idempotent id: 5ab6100f-1b31-4dd0-a774-68cfd837ef77
LUKs v2 decrypts volume through os-brick.
- test_create_server_from_volume_snapshot()[source]¶
Test idempotent id: 05795fb2-b2a7-4c9f-8fac-ff25aedb1489
- test_image_defined_boot_from_volume()[source]¶
Test idempotent id: 36c34c67-7b54-4b59-b188-02a2f458a63b
- test_volume_boot_pattern()[source]¶
Test idempotent id: 557cd2c2-4eb8-4dce-98be-f86765ff311b
This test case attempts to reproduce the following steps:
Create in Cinder some bootable volume importing a Glance image
Boot an instance from the bootable volume
Write content to the volume
Delete an instance and Boot a new instance from the volume
Check written content in the instance
Create a volume snapshot while the instance is running
Boot an additional instance from the new snapshot based volume
Check written content in the instance booted from snapshot
scenario.test_volume_migrate_attached module¶
- class TestVolumeMigrateRetypeAttached(*args, **kwargs)[source]¶
Bases:
ScenarioTest
This test case attempts to reproduce the following steps:
Create 2 volume types representing 2 different backends
Create in Cinder some bootable volume importing a Glance image using
volume_type_1
Boot an instance from the bootable volume
Write to the volume
Perform a cinder retype –on-demand of the volume to type of backend #2
Check written content of migrated volume
Check the type of the volume has been updated.
Check the volume is still in-use and the migration was successful.
Check that the same volume is attached to the instance.