stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the...

398
stepler Documentation Release Mirantis Apr 26, 2018

Transcript of stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the...

Page 1: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler DocumentationRelease

Mirantis

Apr 26, 2018

Page 2: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive
Page 3: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

Contents

1 Annotation 1

2 Architecture 3

3 How to install 5

4 How to run tests 7

5 How to debug tests 9

6 Deep to structure 11

7 Plugins 361

Python Module Index 363

i

Page 4: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

ii

Page 5: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

CHAPTER 1

Annotation

Stepler framework is intended to provide the community with a testing framework that is capable of perform advancedscenario and destructive test cases, like batch instances launching, instances migration, services restarts and differentHA-specific cases.

This solution is not intended for OpenStack API validation, but provides simple tool for creation tests to check ad-vanced end-user scenarios.

1

Page 6: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2 Chapter 1. Annotation

Page 7: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

CHAPTER 2

Architecture

Stepler’s architecture is based on STEPS-methodology, that considers a test as a sequence of steps, each of them endswith check, that step was finished correct. It allows to compose plenty of tests, having moderate codebase.

Architecture has following abstraction levels, where code lives (from higher to less):

• clients are able to manipulate resources: users, roles, servers, etc. For ex: keystone client, nova client, nodeclient, etc.

• steps are actions, that we want to make over resources via clients: create, delete, update, migrate, etc. Theyshould end with check, that step was finished correct.

• fixtures manage resources construction, destruction, etc via steps.

• tests combine steps and fixtures according to scenario.

Detailed information about autotests construction is available in our guideline.

Sometimes it needs to have code for ssh connection, proxy server, etc. They are not related with clients, steps, fixturesand tests and are considered as third party helpers and must be implemented based on its purpose with OOP and designprinciples.

Stepler uses py.test as test runner and tox for routine operations. Be sure you know them.

3

Page 8: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

4 Chapter 2. Architecture

Page 9: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

CHAPTER 3

How to install

Install pre-conditions (Ubuntu 16.04):

sudo apt-get -y install libssl-dev python-dev libvirt-dev python-pipsudo locale-gen "en_US.UTF-8"sudo dpkg-reconfigure localessudo -H pip install --upgrade pipsudo -H pip install virtualenv

Make following commands in terminal:

git clone https://review.gerrithub.io/Mirantis/steplercd steplervirtualenv .venv. .venv/bin/activatepip install -e .[libvirt]

5

Page 10: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

6 Chapter 3. How to install

Page 11: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

CHAPTER 4

How to run tests

More information about options to launch is in Launcher parameters.

If you know how to launch tests with py.test, you may skip this section.

Before launching you should export some openstack environment variables:

• OS_PROJECT_DOMAIN_NAME (default value 'default')

• OS_USER_DOMAIN_NAME (default value 'default')

• OS_PROJECT_NAME (default value 'admin')

• OS_USERNAME (default value 'admin')

• OS_PASSWORD (default value 'password')

• OS_AUTH_URL (keystone auth url for admin actions should be defined explicitly: v3 -http://keystone/url/v3, v2 - http://keystone/url/v2.0. Keystone v2 is supportedpartially.)

To get details look into stepler/config.py

Let’s view typical commands to launch test in different ways:

• If you want to launch all tests (-v is used to show full name and status of each test):

py.test stepler -v

• For ex, you write the test test_upload_image and want to launch it only:

py.test stepler -k test_upload_image

• If your test was failed and you want to debug it, you should disable stdout capture:

py.test stepler -k test_upload_image -s

• Full information about py.test is obtainable with:

py.test -h

7

Page 12: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

8 Chapter 4. How to run tests

Page 13: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

CHAPTER 5

How to debug tests

We recommend to use ipdb to set up break points inside code. Just put following chunk before code line where youwant to debug (don’t forget about -s to disable py.test stdout capture):

import ipdb; ipdb.set_trace()

Please report bugs found in stepler to https://bugs.launchpad.net/stepler

9

Page 14: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

10 Chapter 5. How to debug tests

Page 15: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

CHAPTER 6

Deep to structure

STEPS architecture

class stepler.base.BaseSteps(client)Base steps-class.

Steps-class aggregates steps over one resource. It means there are many inherited steps-classes for each resource.

Note: Technically there are three types of steps:

1.get-steps

Their goal to retrieve information about resource and return it. If information is unavailable, a step shouldraise exception. Rules to code:

•step method name has prefix get_, for ex: get_ips, get_projects, get_flavor,get_network.

•step should return something in last code line, for ex: return projects, return network. Itmakes easier code review and debugging.

•step can include argument check=True. It’s depends on context, for ex: step returns collection, butcollection can be empty. And here check=True will help to check that collection has items.

2.check-steps

Their goal to validate input resource and raise exception if it’s invalid. Rules to code:

•step method name has prefix check_, for ex: check_image_presence,check_project_bind_status.

•step should return nothing.

•step should use code to raise exception: assert_that from hamcrest, wait-methods which raiseTimeoutExpired, raise for explicit exception, another check_-steps.

Warning: We don’t use python assert, prefer hamcrest library.

•step should include argument timeout=0 to provide check during the time.

3.change-steps

Their goal to change resource and check that changing is successful. Rules to code:

11

Page 16: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

•step method name starts with a verb denoting the action.

•step has argument check=True.

•step makes action over resource before check.

•inside if check: step should use code to raise exception: assert_that from hamcrest, wait-methods which raise TimeoutExpired, raise for explicit exception, or check_-step.

•inside if check: step should return nothing. Its section is for verification only.

•if step should return something (for ex: return image), it should be after if check:.

•if after resource changing need to update object with resource info, for ex: server.get(), it mustbe inside if check: block (see explanation below)

Warning: Explanation when in step it should to update object with resource information, for ex:when it should to call server.get().

Hint: Keep in mind, that objects like server, image, volume, flavor, etc are not realresources. They are just objects with information about the state of resource at some point in time.And these info-objects should be updated from time to time.

First of all its updating should NEVER call BEFORE resource changing. “Fresh” info-object mustbe passed to step.

Updating of info-object must be executed inside the same step, where resource is changed. Butthere two variants for ex:

# invalid variantdef attach_floating_ip(self, server, floating_ip,

check=True):self._client.add_floating_ip(server, floating_ip)server.get()if check:

floating_ips = self.get_ips(server,'floating').keys()

assert floating_ip.ip in floating_ips

# valid variantdef attach_floating_ip(self, server, floating_ip,

check=True):self._client.add_floating_ip(server, floating_ip)if check:

server.get()floating_ips = self.get_ips(server,

'floating').keys()assert floating_ip.ip in floating_ips

Let’s understand why second variant is better that first. Change-step consist of two stages: -change resource state - retrieve resource state for checking.

And server.get() is resource state retrieving and must be a part of checking. This is moreclearly for async steps. Let’s see how previous invalid variant would look as async:

12 Chapter 6. Deep to structure

Page 17: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

# invalid async variantdef attach_floating_ip_async(self, server, floating_ip,

check=True):self._client.add_floating_ip(server, floating_ip)server.get()if check:

self.check_status(server, 'active')floating_ips = self.get_ips(server,

'floating').keys()assert floating_ip.ip in floating_ips

Here server.get() doesn’t reflect actual state or resource, because resource is changedasync. That why check_status is used to wait some stable resource state, and it usesserver.get() inside itself. So we see double usage of server.get() and first its callabsolutely useless.

And in case, when step will be called with check=False, call server.get() doesn’t getactual resource state, because resource is changed async.

It means that server.get() is useful for checking only, but otherwise it’s useless.

Common rules:

•each step method has docstring, explaining its mission.

See also:

Why do we make steps with optional verification check=True?

Sometimes (may be very rarely) we will need to make step without verification. In negative tests, for ex: try tocreate server without name and check that there is error. But more often we need positive verification by defaultto guarantee that step of a test was finished successfully and the test can go to another step.

Launcher parameters

Environment variables

• OS_AUTH_URL - openstack keystone auth URL. Is required explicitly: v3 - http://keystone/url/v3,v2 - http://keystone/url/v2.0. Tests assume admin access for cloud management. In practice itrequires admin auth URL usage. Keystone v2 is supported partially.

• OS_USERNAME - openstack user name. By default is admin.

• OS_PASSWORD - openstack user password. By default is password.

• OS_PROJECT_NAME - openstack project name. By default is admin.

• OS_PROJECT_DOMAIN_NAME - openstack project domain name. By default is default.

• OS_USER_DOMAIN_NAME - openstack user domain name. By default is default.

• OS_DASHBOARD_URL - URL of horizon dashboard. Is required for UI testing.

• VIRTUAL_DISPLAY - Flag to notify that virtual framebuffer should be used. It requires of installed xvfb. Isdisabled by default.

6.2. Launcher parameters 13

Page 18: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• TEST_REPORTS_DIR - directory where test_reports folder will be created. By default it will be indirectory where tests are launched.

• OS_FLOATING_NETWORK - name of external (floating) network. By default is admin_floating_net.

• OPENRC_ACTIVATE_CMD - command to source the admin credentials. By default is source/root/openrc.

Os-faults specific environment variables:

• OS_FAULTS_CLOUD_DRIVER - Cloud driver. Can be one of devstack, fuel or tcpcloud.

• OS_FAULTS_CLOUD_DRIVER_ADDRESS - Ip address of fuel master (or mk cfg) node.

• OS_FAULTS_CLOUD_DRIVER_USERNAME - Username to connect to nodes. By default is root.

• OS_FAULTS_CLOUD_DRIVER_KEYFILE - Path to private keyfile to connect via SSH to any node in cloudwith OS_FAULTS_CLOUD_DRIVER_USERNAME.

• OS_FAULTS_POWER_DRIVER - Name of os-faults power driver to cloud. By default it libvirt.

• OS_FAULTS_POWER_DRIVER_URI - URI to connect to power driver.

Launch tests for components

py.test stepler/<component name>

For example:

py.test stepler/cinder

Available component names:

• baremetal

• cinder

• cli_clients

• glance

• heat

• horizon

• keystone

• neutron

• nova

• swift

Note: Be sure that you specify all required environment variables before launching. Please keep in mind, that somecomponents require additional environment variables. For example, horizon requires OS_DASHBOARD_URL andVIRTUAL_DISPLAY.

14 Chapter 6. Deep to structure

Page 19: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Pytest options

• --disable-steps-checker - Suppress steps consitency checking before tests. Only for debugging. Isn’trecommended on production.

• --snapshot-name <snapshot name> - Specify environment snapshot name for cloud reverting. Isrequired for destructive tests.

• --bugs-file <file path> - Define a path to file, which contains opened bugs for tests. These tests willbe skipped according to file info. More details are in Third party modules.

Cinder

Cinder conftest

Contains fixtures specific for cinder.

stepler.cinder.conftest.backup_steps(get_backup_steps, cleanup_backups)Function fixture to get volume backup steps.

Parameters

• get_backup_steps (object) – function to get backup steps

• cleanup_backups (function) – function to cleanup backups after test

Yields stepler.cinder.steps.BackupSteps – instantiated backup steps

stepler.cinder.conftest.big_snapshot_quota(get_current_project, get_cinder_quota_steps)Session fixture to increase cinder snapshots count quota.

This fixture restore original quota value after test.

Parameters

• get_current_project (function) – function to get current project

• get_cinder_quota_steps (function) – function to get cinder quota steps

stepler.cinder.conftest.bootable_volume(cirros_image, volume_steps)Function fixture to create bootable volume with default options.

Parameters

• cirros_image (obj) – glance image to create volume from

• volume_steps (VolumeSteps) – instantiated volume steps

Returns bootable cinder volume

Return type object

stepler.cinder.conftest.bootable_volume_with_private_image(cirros_image_private,volume_steps)

Function fixture to create bootable volume with default options.

Parameters

• cirros_image (obj) – glance image to create volume from

• volume_steps (VolumeSteps) – instantiated volume steps

Returns bootable cinder volume

6.3. Cinder 15

Page 20: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Return type object

stepler.cinder.conftest.cinder_client(get_cinder_client)Function fixture to get cinder client.

Parameters get_cinder_client (function) – function to get cinder client

Returns instantiated cinder client

Return type cinderclient.client.Client

stepler.cinder.conftest.cinder_quota_steps(get_cinder_quota_steps)Function fixture to get cinder quota steps.

Parameters get_cinder_quota_steps (function) – function to get cinder quota steps

Returns instantiated quota steps

Return type stepler.cinder.steps.CinderQuotaSteps

stepler.cinder.conftest.cleanup_backups(uncleanable)Callable function fixture to clear created backups after test.

It stores ids of all backups before test and remove all new backups after test.

Parameters uncleanable (AttrDict) – data structure with skipped resources

Returns function to cleanup backups

Return type function

stepler.cinder.conftest.cleanup_snapshots(uncleanable)Callable function fixture to cleanup snapshots after test.

Parameters uncleanable (AttrDict) – data structure with skipped resources

Returns function to cleanup snapshots

Return type function

stepler.cinder.conftest.cleanup_transfers(uncleanable)Callable function fixture to clear created transfers after test.

Parameters uncleanable (AttrDict) – data structure with skipped resources

Returns function to cleanup transfers

Return type function

stepler.cinder.conftest.cleanup_volumes(uncleanable)Callable session fixture to cleanup volumes.

Parameters uncleanable (AttrDict) – Data structure with resources to skip cleanup.

stepler.cinder.conftest.create_backup(backup_steps)Callable function fixture to create single volume backup with options.

Can be called several times during a test. After the test it destroys all created backups.

Parameters backup_steps (object) – instantiated volume backup steps

Returns function to create volume backup as batch with options

Return type function

stepler.cinder.conftest.create_volume_transfer(transfer_steps)Callable function fixture to create volume transfer with options.

Can be called several times during test.

16 Chapter 6. Deep to structure

Page 21: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters transfer_steps (VolumeTransferSteps) – instantiated transfer steps

Yields function – function to create singe volume transfer with options

stepler.cinder.conftest.create_volume_type(volume_type_steps)Callable function fixture to create volume types with options.

Can be called several times during test.

Parameters volume_type_steps (VolumeTypeSteps) – instantiated volume type steps

Yields function – function to create singe volume type with options

stepler.cinder.conftest.get_backup_steps(get_cinder_client)Callable session fixture to get volume backup steps.

Parameters get_cinder_client (object) – function to get cinder client

Returns function to get backup steps

Return type function

stepler.cinder.conftest.get_cinder_client(get_session)Callable session fixture to get cinder client.

Parameters session (object) – authenticated keystone session

Returns instantiated cinder client

Return type cinderclient.client.Client

stepler.cinder.conftest.get_cinder_quota_steps(get_cinder_client)Callable session fixture to get cinder quota steps.

Parameters get_cinder_client (function) – function to get cinder client

Returns function to get cinder quota steps

Return type function

stepler.cinder.conftest.get_snapshot_steps(get_cinder_client)Callable session fixture to get snapshot steps.

Parameters get_cinder_client (function) – function to get cinder client

Returns function to get snapshot steps

Return type function

stepler.cinder.conftest.get_transfer_steps(get_cinder_client)Callable session fixture to get volume transfer steps.

Parameters get_cinder_client (function) – function to get cinder client.

Returns function to get transfer steps.

Return type function

stepler.cinder.conftest.get_volume_steps(get_cinder_client)Callable session fixture to get volume steps.

Parameters get_cinder_client (function) – function to get cinder client

Returns function to get volume steps

Return type function

6.3. Cinder 17

Page 22: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.cinder.conftest.primary_volumes(get_volume_steps, cleanup_volumes, uncleanable)Session fixture to remember primary volumes before tests.

Also optionally in finalization it deletes all unexpected volumes which are remained after tests.

Parameters

• get_volume_steps (function) – Function to get volume steps.

• cleanup_volumes (function) – Function to cleanup volumes.

• uncleanable (AttrDict) – Data structure with skipped resources.

stepler.cinder.conftest.snapshot_steps(get_snapshot_steps, cleanup_snapshots)Function fixture to get snapshot steps.

Parameters

• cinder_client (object) – instantiated cinder client

• cleanup_snapshots (function) – function fixture to cleanup snapshots

Yields stepler.cinder.steps.SnapshotSteps – instantiated snapshot steps

stepler.cinder.conftest.transfer_steps(get_transfer_steps, cleanup_transfers)Function fixture to get volume transfer steps.

Parameters

• get_transfer_steps (function) – function to get transfer steps

• cleanup_transfers (function) – function to cleanup transfers after test

Yields VolumeTransferSteps – instantiated transfer steps.

stepler.cinder.conftest.unexpected_volumes_cleanup(primary_volumes,get_volume_steps,cleanup_volumes)

Function fixture to clear unexpected volumes.

It provides cleanup before and after test.

stepler.cinder.conftest.upload_volume_to_image(volume_steps, glance_steps)Callable function fixture to upload volume to image.

Can be called several times during a test. After the test it destroys all created objects.

Parameters

• volume_steps (VolumeSteps) – instantiated volume steps

• glance_steps (GlanceSteps) – instantiated glance steps

Returns function to upload volume to image

Return type function

stepler.cinder.conftest.volume(volume_steps)Function fixture to create volume with default options before test.

Parameters volume_steps (VolumeSteps) – instantiated volume steps

Returns cinder volume

Return type object

stepler.cinder.conftest.volume_backups(request, volume, backup_steps)Function fixture to create volume backups with default options.

18 Chapter 6. Deep to structure

Page 23: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• request (obj) – py.test’s SubRequest instance

• volume (obj) – cinder volume

• backup_steps (VolumeSteps) – instantiated backup steps

Returns cinder volume backups

Return type list

stepler.cinder.conftest.volume_size_quota(current_project, cinder_quota_steps)Function fixture to get cinder volume size quota.

Default value for volume size quota can be too large for some tests. This fixture sets volume size quota for thecurrent project to the value from config and then yields this value. The fixture restores original quota value aftertest.

Parameters

• current_project (obj) – current project

• cinder_quota_steps (obj) – initialized cinder quota steps

Yields int – volume size quota value

stepler.cinder.conftest.volume_snapshot(volume, snapshot_steps)Function fixture to create snapshot with default options before test.

Parameters

• volume (object) – cinder volume

• snapshot_steps (object) – instantiated snapshot steps

Returns cinder volume snapshot

Return type object

stepler.cinder.conftest.volume_snapshots(request, volume, snapshot_steps)Function fixture to create volume snapshots with default options.

Parameters

• request (object) – py.test’s SubRequest instance

• volume (object) – cinder volume

• snapshot_steps (SnapshotSteps) – instantiated snapshot steps

Returns cinder volume snapshots

Return type list

stepler.cinder.conftest.volume_steps(unexpected_volumes_cleanup, get_volume_steps,cleanup_volumes)

Function fixture to get volume steps.

Parameters

• get_volume_steps (function) – function to get volume steps

• cleanup_volumes (function) – function to cleanup volumes after test

Yields VolumeSteps – instantiated volume steps

stepler.cinder.conftest.volume_type(create_volume_type)Fixture to create volume type with default options before test.

6.3. Cinder 19

Page 24: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters create_volume_type (function) – function to create volume type

Returns volume type

Return type object

stepler.cinder.conftest.volume_type_steps(cinder_client)Function fixture to get cinder volume types steps.

Parameters cinder_client (object) – instantiated cinder client

Returns instantiated types steps

Return type stepler.cinder.steps.CinderVolumeTypeSteps

stepler.cinder.conftest.volumes(request, volume_steps)Function fixture to create volumes with default options before test.

Parameters

• request (obj) – py.test’s SubRequest instance

• volume_steps (VolumeSteps) – instantiated volume steps

Returns cinder volumes

Return type list

Cinder steps

Contains steps specific for cinder.

class stepler.cinder.steps.VolumeSteps(client)Volume steps.

change_volume_type(volume, volume_type, policy, check=True)Step to retype volume.

Parameters

• volume (object) – cinder volume

• volume_type (object) – cinder volume type

• policy (str) – policy for migration during the retype

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

check_cinder_available(must_be=True)Step to check cinder availability.

Parameters must_be (bool) – flag whether cinder must be available or not

Raises TimeoutExpired – if check failed after timeout

check_migration_status(volume, status, timeout=0)Step to check migration status.

Parameters

• volume (object) – cinder volume to check migration status

• status (str) – expected migration status

• timeout (int) – seconds to wait a result of check

20 Chapter 6. Deep to structure

Page 25: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Raises TimeoutExpired – if migration status is not equal to ‘status’ after timeout

check_volume_attachments(volume, server_ids=None, timeout=0)Step to check volume attachments.

Parameters

• volume (object) – cinder volume

• server_ids (list) – list of nova servers ids

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_volume_deletion_with_wrong_id()Step to check negative volume deletion with wrong volume id.

Raises AssertionError – if NotFound exception is not appeared

check_volume_deletion_without_cascading_failed(volume)Step to check negative volume deletion without cascade option.

Parameters volume (object) – cinder volume

Raises BadRequest – if check failed

check_volume_extend_failed_incorrect_size(volume, size)Step to check negative volume extend to incorrect size.

Parameters

• volume (object) – cinder volume

• size (int) – volume size

Raises AssertionError – if check failed

check_volume_extend_failed_size_more_than_limit(volume, size)Step to check negative volume extend to size more than limit.

Parameters

• volume (object) – cinder volume

• size (int) – volume size

Raises AssertionError – if check failed

check_volume_host(volume, host, timeout=0)Step to check volume host.

Parameters

• volume (object) – cinder volume to check host

• host (str) – expected volume host to check

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if volume host is not changed after timeout

check_volume_not_created_with_incorrect_size(size)Step to check negative volume creation with negative/zero size.

Parameters size (int) – volume size

Raises AssertionError – if check failed

6.3. Cinder 21

Page 26: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

check_volume_not_created_with_long_name(name)Step to check volume is not created with long name.

Parameters name (str) – name for volume. Expected long name in argument

Raises AssertionError – if check triggered an error

check_volume_not_created_with_non_exist_volume_type(image)Step to check volume is not created with non-existed volume type.

Parameters image (obj) – image for volume creation

Raises AssertionError – if check triggered an error

check_volume_not_created_with_size_more_than_limit(size)Step to check negative volume creation with size more than limit.

Parameters size (int) – volume size in gb

Raises AssertionError – if check failed

check_volume_not_created_with_wrong_image_id()Step to check volume is not created with wrong image id.

Raises AssertionError – if check triggered an error

check_volume_presence(volume, must_present=True, timeout=0)Check step volume presence status.

Parameters

• volume (object) – cinder volume to check presence status

• must_present (bool) – flag whether volume should present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_volume_properties(volume, timeout=0, **properties)Step to check volume’s properties.

Parameters

• volume (object) – cinder volume

• timeout (int) – seconds to wait a result of check

• **properties – volume’s properties to check

Raises TimeoutExpired – if check failed after timeout

check_volume_size(volume, size, timeout=0)Step to check volume size.

Parameters

• volume (object) – cinder volume

• size (int) – expected volume size

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_volume_status(volume, statuses, transit_statuses=(), timeout=0)Check step volume status.

Parameters

22 Chapter 6. Deep to structure

Page 27: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• volume (object|str) – cinder volume to check status or its id

• statuses (list) – list of statuses to check

• transit_statuses (tuple) – possible volume transitional statuses

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired|AssertionError – if check failed after timeout

check_volume_type(volume, volume_type, timeout=0)Step to check volume type.

Parameters

• volume (object) – cinder volume

• volume_type (obj) – expected volume type

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_volume_update_failed(volume, new_name=None, new_description=None)Step to check negative volume update.

Parameters

• volume (object) – cinder volume

• new_name (str) – new name for volume

• new_description (str) – new description for volume

Raises BadRequest – if check failed

create_volumes(names=None, size=1, image=None, volume_type=None, description=None, snap-shot_id=None, source_volid=None, metadata=None, check=True)

Step to create volumes.

Parameters

• names (list) – names of created volume, if not specified one volume name will begenerated

• size (int) – size of created volume (in GB)

• image (object) – glance image to create volume from

• volume_type (str) – type of volume

• description (str) – description

• snapshot_id (str) – ID of the snapshot

• source_volid (str) – ID of source volume to clone from

• metadata (dict) – volume metadata

• check (bool) – flag whether to check step or not

Returns cinder volumes

Return type list

Raises TimeoutExpired|AssertionError – if check failed after timeout

delete_volumes(volumes, cascade=False, force=False, check=True)Step to delete volumes.

6.3. Cinder 23

Page 28: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• volumes (list) – cinder volumes

• cascade (bool) – flag whether to delete dependent snapshot or not

• force (bool, optional) – attempt forced removal of volume(s), regardless of state

• check (bool) – flag whether to check step or not

get_attached_server_ids(volume, check=True)Step to retrieve IDs of servers attached to volume.

Parameters

• volume (object) – cinder volume

• check (bool) – flag whether to check step or not

Returns attached server ids

Return type list

Raises AssertionError – if no attached server IDs

get_volume_by_id(volume_id, check=True)Step to get volume object from cinder using volume id.

Parameters

• volume_id (str) – volume id

• check (bool) – flag whether to check step or not

Returns volume

Return type object

Raises

• exceptions.NotFound – if volume with volume_id doesn’t exist

• AssertionError – if check failed

get_volume_migrate_host(volume, nodes, check=True)Step to get cinder host to migrate volume.

Parameters

• volume (str) – migrating volume

• nodes (iterable) – cinder nodes

• check (bool) – flag whether to check step or not

Returns host to volume migrate

Return type str

Raises LookupError – if no available hosts to migrate

get_volumes(name_prefix=None, metadata=None, search_opts=None, check=True)Step to retrieve volumes.

Parameters

• name_prefix (str, optional) – Prefix to filter volumes by name

• metadata (dict, optional) – Data to filter volume by metadata key: value

24 Chapter 6. Deep to structure

Page 29: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• (dict (search_opts) – optional): API filter options to retrieve volumes

• check (bool, optional) – Flag whether to check step or not

Returns Volumes collection

Return type list

Raises AssertionError – If volumes collection is empty

migrate_volume(volume, host, force_host_copy=False, lock_volume=False, check=True)Step to migrate volume.

Parameters

• volume (object) – volume to migrate

• host (str) – target host to migrate volume

• force_host_copy (bool) – skip driver optimizations

• lock_volume (bool) – lock the volume

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if migration status is not ‘success’ or volume host is not changedafter timeout

set_volume_bootable(volume, bootable, check=True)Step to set volume bootable.

Parameters

• volume (object) – cinder volume

• bootable (bool) – flag whether to set or unset volume bootable

• check (bool) – flag whether to check step or not

Raises AssertionError – if check failed

update_volume(volume, new_name=None, new_description=None, check=True)Step to update volume.

Parameters

• volume (object) – cinder volume

• new_name (str) –

• new_description (str) – new description for volume

• check (bool) – flag whether to check step or not

Raises AssertionError – if check failed

volume_extend(volume, size, check=True)Step to extend volume to new size.

Parameters

• volume (object) – cinder volume

• size (int) – The new volume size

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

6.3. Cinder 25

Page 30: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

volume_upload_to_image(volume, image_name=None, force=False, container_format=’bare’,disk_format=’raw’, check=True)

Step to upload volume to image.

Parameters

• volume (object) – The Volume to upload

• image_name (str) – The new image name

• force (bool) – Enables or disables upload of a volume that is

• to an instance (attached) –

• container_format (str) – Container format type

• disk_format (str) – Disk format type

• check (bool) – flag whether to check step or not

Raises AssertionError – if check was triggered to False

Returns image

Return type object

class stepler.cinder.steps.VolumeTypeSteps(client)Cinder volume types steps.

check_volume_type_presence(volume_type, must_present=True, timeout=0)Check step volume type presence status.

Parameters

• volume_type (object) – cinder volume type to check presence status

• must_present (bool|True) – flag whether volume type should present

• not (or) –

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

create_volume_type(name, description=None, is_public=True, check=True)Step to create volume type.

Parameters

• name (str) – name of created volume type

• description (str) – description

• is_public (bool|True) – volume type visibility

• check (bool|true) – flag whether to check step or not

Returns cinder volume type

Return type object

Raises AssertionError – if check failed

delete_volume_type(volume_type, check=True)Step to delete volume type.

Parameters

• volume_type (obj) – volume type object

26 Chapter 6. Deep to structure

Page 31: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• check (bool|true) – flag whether to check step or not

Raises AssertionError – if check failed

get_volume_types(check=True)Step to retrieve volume types.

Parameters check (bool) – flag whether to check step or not

Returns volume types list

Return type list

Raises AssertionError – if check failed

class stepler.cinder.steps.CinderQuotaSteps(client)Cinder quota steps.

get_backups_quota(project, check=True)Step to retrieve quota for backups count.

Parameters

• project (obj) – project object

• check (bool|True) – flag whether to check step or not

Returns current quota value

Return type int

Raises AssertionError – if check failed

get_snapshots_quota(project, check=True)Step to retrieve quota for snapshots count.

Parameters

• project (obj) – project object

• check (bool|True) – flag whether to check step or not

Returns current quota value

Return type int

Raises AssertionError – if check failed

get_volume_size_quota(project, check=True)Step to retrieve quota for volume size.

Parameters

• check (bool|True) – flag whether to check step or not

• project (obj) – project object

Returns size in gigabytes

Return type int

Raises AssertionError – if check failed

get_volumes_quota(project, check=True)Step to retrieve quota for volumes count.

Parameters

• project (obj) – project object

6.3. Cinder 27

Page 32: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• check (bool|True) – flag whether to check step or not

Returns current quota value

Return type int

Raises AssertionError – if check failed

set_backups_quota(project, value, check=True)Step to set quota for backups count.

Parameters

• project (obj) – project object

• value (int) – new backups count quota value

• check (bool|True) – flag whether to check step or not

Raises AssertionError – if check failed

set_snapshots_quota(project, value, check=True)Step to retrieve quota for volume size.

Parameters

• project (obj) – project object

• value (int) – new snapshots count quota value

• check (bool|True) – flag whether to check step or not

No Longer Raises: AssertionError: if check failed

set_volume_size_quota(project, value, check=True)Step to set quota for volume size.

Parameters

• project (obj) – project object

• value (int) – volume size quota value

• check (bool|True) – flag whether to check step or not

Raises AssertionError – if check was False

set_volumes_quota(project, value, check=True)Step to set quota for volumes count.

Parameters

• project (obj) – project object

• value (int) – new volumes count quota value

• check (bool|True) – flag whether to check step or not

Raises AssertionError – if check failed

class stepler.cinder.steps.SnapshotSteps(client)Snapshot steps.

check_snapshot_status(snapshot, statuses, timeout=0)Step to check snapshots status.

Parameters

28 Chapter 6. Deep to structure

Page 33: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• snapshot (obj) – cinder volume snapshot objects or id to check status

• statuses (list) – list of statuses names to check

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_snapshots_presence(snapshots, must_present=True, timeout=0)Step to check snapshots presence status.

Parameters

• snapshots (list) – cinder volume snapshots to check presence status

• must_present (bool) – flag whether snapshot should present

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

create_snapshots(volume, names=None, description=None, check=True)Step to create snapshots.

Parameters

• volume (object) – volume of the snapshots

• names (list) – name of created snapshots, if not specified one snapshot name will begenerated

• description (str) – snapshot description

• check (bool) – flag whether to check step or not

Returns cinder volume snapshots

Return type list

Raises TimeoutExpired|AssertionError – if check failed after timeout

delete_snapshots(snapshots, check=True)Step to delete snapshots.

Parameters

• snapshots (list) – cinder volume snapshots

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

get_snapshot_by_id(snapshot_id, check=True)Step to get snapshot object from cinder using snapshot id.

Parameters

• snapshot_id (str) – volume snapshot id

• check (bool) – flag whether to check step or not

Returns volume snapshot

Return type object

Raises

• NotFound – if snapshot with snapshot_id doesn’t exist

• AssertionError – if check failed

6.3. Cinder 29

Page 34: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

get_snapshots(search_opts=None, check=True)Step to get snapshots.

Parameters

• (dict (search_opts) – optional): API filter options to retrieve snapshots

• check (bool) – flag whether to check step or not

Returns snapshots collection

Return type list

Raises AssertionError – if check failed

class stepler.cinder.steps.VolumeTransferSteps(client)Cinder volume transfer steps.

accept_volume_transfer(transfer, check=True)Step to accept volume transfer.

Parameters

• transfer (obj) – volume transfer object

• check (bool|true) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

check_transfer_not_created_with_long_transfer_name(volume, transfer_name)Step for negative test case of transfer creation with invalid name.

Parameters

• volume (obj) – volume to create transfer

• transfer_name (str) – name of transfer

Raises AssertionError – if check triggered an error

check_volume_transfer_presence(transfer, must_present=True, timeout=0)Check step volume transfer presence status.

Parameters

• transfer (object) – cinder volume transfer to check presence status

• must_present (bool|True) – flag whether volume type should present

• not (or) –

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

create_volume_transfer(volume, transfer_name, check=True)Step to create volume transfer.

Parameters

• volume (obj) – volume object

• transfer_name (str) – name of created volume transfer

• check (bool|true) – flag whether to check step or not

Returns cinder volume transfer

Return type object

30 Chapter 6. Deep to structure

Page 35: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Raises TimeoutExpired|AssertionError – if check failed after timeout

delete_volume_transfer(transfer, check=True)Step to delete(cancel) volume transfer.

Parameters

• transfer (obj) – volume transfer object

• check (bool|true) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

get_transfers(search_opts=None, check=True)Step to retrieve volume transfers.

Parameters

• (dict (search_opts) – optional): API filter options to retrieve transfers

• check (bool|True) – flag whether to check step or not

Returns volume transfers list

Return type list

Raises AssertionError – if check failed

class stepler.cinder.steps.BackupSteps(client)Backup steps.

check_backup_not_created_with_long_container_name(volume, container)

Step to check that backup is not created with overlimit container name length.

Parameters

• volume (obj) – cinder volume

• container (str) – container name

Raises AssertionError – if no BadRequest occurs or exception message is unexpected

check_backup_presence(backup, must_present=True, timeout=0)Check step volume backup presence status.

Parameters

• backup (object) – volume backup to check presence status

• must_present (bool) – flag whether volume should present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_backup_status(backup, status, transit_statuses=(‘creating’, ), timeout=0)Check step volume backup status.

Parameters

• backup (object or str) – volume backup object or its id to check status

• status (str) – backup status name to check

• transit_statuses (tuple) – possible backup transitional statuses

• timeout (int) – seconds to wait a result of check

6.3. Cinder 31

Page 36: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Raises TimeoutExpired – if check failed after timeout

create_backup(volume, name=None, container=None, description=None, snapshot_id=None,check=True)

Step to create volume backup.

Parameters

• volume (object) – cinder volume

• name (str) – name of created backup

• container (str) – name of the backup service container

• description (str) – description

• snapshot_id (str) – id of snapshot created from volume

• check (bool) – flag whether to check step or not

Returns volume backup

Return type object

Raises

• TimeoutExpired – if backup is not available after timeout

• AssertionError – if backup attributes are not the same as ones entered during creation

delete_backup(backup, check=True)Step to delete volume backup.

Parameters

• backup (object) – volume backup

• check (bool) – flag whether to check step or not

get_backup_by_id(backup_id, check=True)Step to get backup object from cinder using backup id.

Parameters

• backup_id (str) – volume backup id

• check (bool) – flag whether to check step or not

Returns volume backup

Return type object

Raises

• exceptions.NotFound – if backup with backup_id doesn’t exist

• AssertionError – if check was failed

get_backups(search_opts=None, check=True)Step to retrieve all backups from cinder.

Parameters

• (dict (search_opts) – optional): API filter options to retrieve backups

• check (bool) – flag whether to check step or not

Returns backups list

Return type list

32 Chapter 6. Deep to structure

Page 37: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Raises AssertionError – if check was failed

Cinder tests

Backup tests

stepler.cinder.tests.test_backups.test_create_volume_backup_with_container(volume,cre-ate_backup)

Scenario: Backup is created with custom container name.

Setup:

1.Create volume

Steps:

1.Create backup with custom container name

2.Check container name of backup

Teardown:

1.Delete backup

2.Delete volume

stepler.cinder.tests.test_backups.test_create_volume_snapshot_backup(volume,vol-ume_snapshot,cre-ate_backup)

Scenario: Verify ability to create backup from snapshot of volume.

Setup:

1.Create volume

2.Create volume snapshot

Steps:

1.Create backup

Teardown:

1.Delete snapshot

2.Delete volume

3.Delete backup

stepler.cinder.tests.test_backups.test_negative_create_backup_long_container_name(volume,backup_steps)

Scenario: Backup isn’t created with overlimit container name length.

Setup:

1.Create cinder volume

Steps:

1.Try to create volume backup with container name length > 255

2.Check that BadRequest exception raised

6.3. Cinder 33

Page 38: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Teardown:

1.Delete cinder volume

Volume tests

stepler.cinder.tests.test_change_volume_type.test_change_volume_type(create_volume_type,vol-ume_steps)

Scenario: Verify change volume type.

Steps:

1.Create two volume types

2.Create volume using first volume type

3.Retype volume to another type

Teardown:

1.Delete volume

2.Delete volume types

stepler.cinder.tests.test_change_volume_type.test_change_volume_type_from_empty(volume_type,vol-ume,vol-ume_steps)

Scenario: Verify change volume type from empty value.

Setup::

1.Create volume type

2.Create volume without volume type

Steps:

1.Change volume type to newly created type

Teardown:

1.Delete volume

2.Delete volume type

Volume tests

stepler.cinder.tests.test_create_image_from_volume.test_create_image_from_volume(upload_volume_to_image,disk_format)

Scenario: raw/qcow2/vdi/vmdk image is created from volume.

Steps:

1.Create cinder volume

2.Create image from volume

3.Delete image

4.Delete cinder volume

34 Chapter 6. Deep to structure

Page 39: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Volume tests

stepler.cinder.tests.test_create_volume_from_image.test_create_volume_from_image(glance_steps,vol-ume_steps,disk_format)

Scenario: Verify that volume from raw|qcow2 image is created.

Steps:

1.Create cinder volume from raw|qcow2 image

2.Delete cinder volume

Volume tests

stepler.cinder.tests.test_edit_volume.test_edit_volume_description(volume,vol-ume_steps,new_volume_description)

Scenario: Verify ability to change volume description.

Setup:

1.Create volume

Steps:

1.Change volume description

Teardown:

1.Delete volume

stepler.cinder.tests.test_edit_volume.test_edit_volume_name(volume, vol-ume_steps,new_volume_name)

Scenario: Verify ability to change volume name.

Setup:

1.Create volume

Steps:

1.Change volume name

Teardown:

1.Delete volume

stepler.cinder.tests.test_edit_volume.test_negative_edit_volume_name_too_long_name(volume,vol-ume_steps)

Scenario: Verify inability to change volume name to name >255 chars.

Setup:

1.Create volume

Steps:

1.Try to change volume name to name longer than 255 characters

Teardown:

6.3. Cinder 35

Page 40: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Delete volume

stepler.cinder.tests.test_edit_volume.test_volume_disable_bootable(glance_steps,vol-ume_steps)

Scenario: Verify ability to disable volume bootable status.

Steps:

1.Create image

2.Create volume from image

3.Disable volume bootable status

Teardown:

1.Delete volume

2.Delete image

stepler.cinder.tests.test_edit_volume.test_volume_enable_bootable(volume,vol-ume_steps)

Scenario: Verify ability to enable volume bootable status.

Setup:

1.Create volume

Steps:

1.Enable volume bootable status

Teardown:

1.Delete volume

Volume tests

stepler.cinder.tests.test_extend_volume.test_negative_extend_volume(volume_steps,size)

Scenario: Verify negative cases of volume extend.

Steps:

1.Create cinder volume

2.Try to extend volume to negative/smaller size

3.Check that volume extending was not performed

Teardown:

1.Delete cinder volume

stepler.cinder.tests.test_extend_volume.test_negative_extend_volume_more_than_limit(volume_size_quota,vol-ume,vol-ume_steps)

Scenario: Verify negative cases of volume extend (size > limit).

Setup:

1.Set required max volume size quota

36 Chapter 6. Deep to structure

Page 41: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Create cinder volume

Steps:

1.Try to extend volume to size which is more than quota

2.Check that volume extending was not performed

Teardown:

1.Delete cinder volume

2.Set max volume size quota to its initial value

stepler.cinder.tests.test_extend_volume.test_positive_extend_volume(volume,vol-ume_steps)

Scenario: Verify nominal volume extend.

Setup:

1.Create cinder volume

Steps:

1.Extend volume to correct size

2.Check that volume extending was performed

Teardown:

1.Delete cinder volume

Cinder service tests

stepler.cinder.tests.test_services.test_restart_all_cinder_services(volume,server,float-ing_ip,at-tach_volume_to_server,os_faults_steps,server_steps,vol-ume_steps)

Scenario: Cinder services work after restart.

Setup:

1.Create volume

2.Create server

3.Create floating IP

Steps:

1.Attach floating IP to server

2.Check server is pinged via floating IP

3.Attach volume to server

4.Mount volume inside server

5.Create empty file inside volume

6.3. Cinder 37

Page 42: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

6.Restart cinder services

7.Check cinder services are available

8.Create volume_2

9.Attache volume_2 to server

10.Mount volume_2 inside server

11.Copy empty file from volume to volume_2

Teardown:

1.Detach volumes from server

2.Delete floating IP

3.Delete server

4.Delete created volumes

stepler.cinder.tests.test_services.test_stop_nova_and_cinder_services(server,float-ing_ip,at-tach_volume_to_server,de-tach_volume_from_server,server_steps,vol-ume_steps,os_faults_steps)

Scenario: VM with volume is available if nova and cinder disabled.

Setup:

1.Create server

2.Create floating IP

Steps:

1.Attach floating IP to server

2.Check server is pinged with floating IP

3.Create volume with size 10 Gb

4.Attach volume to server

5.Via SSH create file on attached volume

6.Stop cinder-volume service

7.Stop nova-compute service

8.Via SSH copy file on attached volume and check that it’s the same

9.Start nova-compute service

10.Start cinder-volume service

11.Detach volume from server

Teardown:

1.Delete volume

38 Chapter 6. Deep to structure

Page 43: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Delete floating IP

3.Delete server

Snapshots tests

stepler.cinder.tests.test_volume_snapshots.test_create_multiple_snapshots(volume,snap-shot_steps)

Scenario: Test creating multiple snapshots

Setup:

1.Increase cinder snapshots count quota

2.Create volume

Steps:

1.Create 5 snapshots from volume

2.Delete created snapshots without waiting for deleting

3.Create 5 snapshots from volume without waiting for creating

4.Delete 5 created snapshots without waiting for deleting

5.Check that all 10 snapshots are deleted

Teardown:

1.Delete volume

2.Restore cinder snapshots count quota

stepler.cinder.tests.test_volume_snapshots.test_snapshot_list(snapshot_steps)Scenario: Request list of snapshots.

Steps:

1.Get list of snapshots

Volume tests

stepler.cinder.tests.test_volume_transfer.test_accept_volume_transfer(volume,new_user_with_project,get_volume_steps,vol-ume_steps,get_transfer_steps,trans-fer_steps)

Scenario: Verify accept of volume transfer.

Setup:

1.Create cinder volume

2.Create new project and new user

Steps:

1.Create volume transfer

6.3. Cinder 39

Page 44: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Accept volume transfer from another user/project

3.Check that volume is available under newly created project

4.Check that transfer is not available after accept

5.Delete cinder volume

stepler.cinder.tests.test_volume_transfer.test_create_volume_transfer(volume,cre-ate_volume_transfer)

Scenario: Verify creation of volume transfer.

Setup:

1.Create cinder volume

Steps:

1.Create volume transfer

Teardown:

1.Delete volume transfer

2.Delete cinder volume

stepler.cinder.tests.test_volume_transfer.test_negative_create_volume_transfer_long_name(volume,trans-fer_steps)

Scenario: Verify creation of volume transfer with name length > 255.

Setup:

1.Create cinder volume

Steps:

1.Try to create volume transfer with name length > 255

2.Check that BadRequest exception raised

Teardown:

1.Delete cinder volume

Volume tests

stepler.cinder.tests.test_volumes.test_create_delete_many_volumes(volume_steps,vol-umes_count)

Scenario: Verify that 9 cinder volumes can be created and deleted.

Steps:

1.Create 9 cinder volumes

2.Delete 9 cinder volumes

Teardown:

1.Delete volumes

stepler.cinder.tests.test_volumes.test_create_volume_description(volume_steps)Scenario: Verify creation of volume with description.

Steps:

40 Chapter 6. Deep to structure

Page 45: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Create volume without name but with description

Teardown:

1.Delete volume

stepler.cinder.tests.test_volumes.test_create_volume_description_max(volume_steps)Scenario: Verify creation of volume with max description length.

Steps:

1.Create volume with description length == max(255)

Teardown:

1.Delete volume

stepler.cinder.tests.test_volumes.test_create_volume_from_snapshot(volume_snapshot,vol-ume_steps)

Scenario: Verify creation volume from snapshot.

Setup:

1.Create volume1

2.Create snapshot from volume1

Steps:

1.Create volume2 from snapshot

2.Delete volume2

Teardown:

1.Delete snapshot

2.Delete volume1

stepler.cinder.tests.test_volumes.test_create_volume_from_volume(volume, vol-ume_steps)

Scenario: Verify creation of volume from volume.

Setup:

1.Create volume

Steps:

1.Create volume2 from volume

Teardown:

1.Delete volume2

2.Delete volume

stepler.cinder.tests.test_volumes.test_create_volume_max_size(volume_size_quota,volume_steps)

Scenario: Verify creation of volume with max volume size.

Setup:

1.Set required max volume size quota

Steps:

1.Create volume with max volume size

6.3. Cinder 41

Page 46: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Check that volume is available

Teardown:

1.Delete volume

2.Set max volume size quota to its initial value

stepler.cinder.tests.test_volumes.test_create_volume_more_max_size(volume_size_quota,vol-ume_steps)

Scenario: Verify creation of volume with size more than max.

Setup:

1.Set required max volume size quota

Steps:

1.Try to create volume with bigger size than max volume size

2.Check that creation is failed

3.Check error message

Teardown:

1.Set max volume size quota to its initial value

stepler.cinder.tests.test_volumes.test_create_volume_without_name(volume_steps)Scenario: Verify creation of volume without name.

Steps:

1.Create volume without name

Teardown:

1.Delete volume

stepler.cinder.tests.test_volumes.test_create_volume_wrong_size(volume_steps,size)

Scenario: Verify creation of volume with zero/negative size.

Steps:

1.Create volume with size 0/-1 Gbs

2.Check that BadRequest occurred

stepler.cinder.tests.test_volumes.test_delete_volume_cascade(volume, vol-ume_steps, snap-shot_steps)

Scenario: Verify volume deletion with cascade option.

Steps:

1.Create volume

2.Create volume snapshot

3.Delete volume with cascade option

4.Check that snapshot is deleted too

stepler.cinder.tests.test_volumes.test_migrate_volume(volume, volume_steps,os_faults_steps)

Scenario: Migrate volume to another host.

42 Chapter 6. Deep to structure

Page 47: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Setup:

1.Create volume

Steps:

1.Find cinder volume host to migrate

2.Migrate cinder volume

Teardown:

1.Delete volume

stepler.cinder.tests.test_volumes.test_negative_create_volume_name_long(volume_steps)Scenario: Verify creation of volume with name length > 255.

Steps:

1.Try to create volume with name length > 255

2.Check that BadRequest exception raised

stepler.cinder.tests.test_volumes.test_negative_create_volume_non_exist_volume_type(cirros_image,vol-ume_steps)

Scenario: Can’t create volume from image with fake volume type.

Setup:

1.Create cirros image

Steps:

1.Try to create volume from image using non existed volume type

2.Check that NotFound exception raised

Teardown:

1.Delete cirros image

stepler.cinder.tests.test_volumes.test_negative_create_volume_wrong_image_id(volume_steps)Scenario: Verify creation of volume with wrong image id.

Steps:

1.Try to create volume with wrong image id

2.Check that BadRequest exception raised

stepler.cinder.tests.test_volumes.test_negative_delete_volume_cascade(volume,vol-ume_snapshot,vol-ume_steps,snap-shot_steps)

Scenario: Verify volume deletion without cascade option.

Setup:

1.Create volume

2.Create volume snapshot

Steps:

6.3. Cinder 43

Page 48: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Try to delete volume without cascade option

2.Check that BadRequest exception raised

3.Check that volume is present

4.Check that snapshot is present

Teardown:

1.Delete snapshot

2.Delete volume

stepler.cinder.tests.test_volumes.test_negative_delete_volume_wrong_id(volume_steps)Scenario: Verify volume deletion with wrong volume id.

Steps:

1.Try to delete volume with wrong volume id

2.Check that NotFound exception raised

stepler.cinder.tests.test_volumes.test_volumes_list(volume_steps)Scenario: Request list of volumes.

Steps:

1.Get list of volumes

Ironic

Ironic conftest

Imports fixtures specific for Ironic.

stepler.baremetal.conftest.api_ironic_client_v1(get_api_ironic_client)Function fixture to get API ironic client v1.

Parameters get_api_ironic_client (function) – function to get ironic client

Returns instantiated API ironic client v1

Return type api_clients.ApiClientV1

stepler.baremetal.conftest.api_ironic_steps(get_api_ironic_steps)Function fixture to get API ironic steps.

Parameters get_api_ironic_steps (function) – function to get API ironic steps

Returns instantiated ironic steps

Return type ironicSteps

stepler.baremetal.conftest.api_ironic_steps_v1(get_api_ironic_steps)Function fixture to get API ironic steps for v1.

Parameters get_api_ironic_steps (function) – function to get ironic steps

Returns instantiated ironic steps v1

Return type ironicStepsV1

stepler.baremetal.conftest.cleanup_chassis(uncleanable)Callable session fixture to cleanup chassis.

44 Chapter 6. Deep to structure

Page 49: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters uncleanable (AttrDict) – Data structure with skipped resources

stepler.baremetal.conftest.cleanup_nodes(uncleanable)Callable session fixture to cleanup nodes.

Parameters uncleanable (AttrDict) – Data structure with skipped resources

stepler.baremetal.conftest.get_api_ironic_client(get_session)Callable session fixture to get ironic client v1.

Parameters get_session (function) – function to get keystone session

Returns function to get ironic client v1

Return type function

stepler.baremetal.conftest.get_api_ironic_steps(request, get_api_ironic_client)Callable session fixture to get ironic steps.

Parameters get_api_ironic_client (function) – function to get ironic client

Returns function to get ironic steps

Return type function

stepler.baremetal.conftest.get_ironic_chassis_steps(get_ironic_client)Callable session fixture to get ironic steps.

Parameters get_ironic_client (function) – function to get ironic client

Returns function to instantiated ironic steps

Return type function

stepler.baremetal.conftest.get_ironic_client(get_session)Callable session fixture to get ironic client.

Parameters get_session (function) – function to get authenticated ironic session

Returns function to get ironic client

Return type function

stepler.baremetal.conftest.get_ironic_node_steps(get_ironic_client)Callable session fixture to get ironic steps.

Parameters get_ironic_client (function) – function to get ironic client

Returns function to instantiated ironic steps

Return type function

stepler.baremetal.conftest.get_ironic_port_steps(get_ironic_client)Callable session fixture to get ironic port steps.

Parameters get_ironic_client (function) – function to get ironic client

Returns function to get ironic port steps

Return type function

stepler.baremetal.conftest.ironic_chassis_steps(unexpected_chassis_cleanup,get_ironic_chassis_steps,cleanup_chassis)

Callable function fixture to get ironic steps.

Can be called several times during a test. After the test it destroys all created chassis.

Parameters

6.4. Ironic 45

Page 50: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• get_ironic_chassis_steps (function) – function to get ironic steps

• cleanup_chassis (function) – function to cleanup chassis after test

Yields IronicChassisSteps – instantiated ironic chassis steps

stepler.baremetal.conftest.ironic_client(get_ironic_client)Callable function fixture to get ironic client.

Parameters get_ironic_client (function) – function to get ironic client

Returns instantiated ironic client

Return type ironicclient.v1.client.

stepler.baremetal.conftest.ironic_client_v1(get_api_ironic_client)Function fixture to get ironic client v1.

Parameters get_api_ironic_client (function) – function to get ironic client

Returns instantiated ironic client

Return type ironicclient.get_client

stepler.baremetal.conftest.ironic_node(ironic_node_steps)Function fixture to create ironic node with default options.

Parameters ironic_node_steps (function) – function to get ironic steps

Returns ironic node

Return type object

stepler.baremetal.conftest.ironic_node_steps(unexpected_node_cleanup,get_ironic_node_steps, cleanup_nodes)

Callable function fixture to get ironic steps.

Can be called several times during a test. After the test it destroys all created nodes.

Parameters

• get_ironic_node_steps (function) – function to get ironic steps

• cleanup_nodes (function) – function to cleanup nodes after test

Yields IronicNodeSteps – instantiated ironic node steps

stepler.baremetal.conftest.ironic_port(ironic_node, ironic_port_steps)Fixture to create ironic port with default options before test.

Parameters ironic_node (object) – ironic node of the ports should be associated with

Returns ironic port

Return type (object)

stepler.baremetal.conftest.ironic_port_steps(get_ironic_port_steps)Callable function fixture to get ironic steps.

Can be called several times during a test.

Parameters get_ironic_port_steps (function) – function to get ironic steps

Returns instantiated ironic port steps

Return type IronicPortSteps

stepler.baremetal.conftest.ironic_steps_v1(get_api_ironic_steps)Function fixture to get ironic steps for v1.

46 Chapter 6. Deep to structure

Page 51: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters get_api_ironic_steps (function) – function to get ironic steps

Returns instantiated ironic steps v1

Return type ironicStepsV1

stepler.baremetal.conftest.multitenancy_networks(request, network_steps, neu-tron_nets_for_projects)

Function fixture to prepare multitenancy networks.

Can be parametrized with dict {‘shared_network’: True}. If shared_network is True - fixture returns sharednetwork, otherwise it returns 2 networks for each of projects.

Parameters

• request (obj) – py.test SubRequest

• network_steps (obj) – instantiated network steps

• neutron_nets_for_projects (obj) – networks for different projects fixture

Returns created resources

Return type attrdict.AttrDict

stepler.baremetal.conftest.multitenancy_resources(request, projects, mul-titenancy_networks,get_neutron_security_group_steps,get_neutron_security_group_rule_steps,get_server_steps,get_keypair_steps,glance_steps, baremetal_flavor,baremetal_ubuntu_image,port_steps, create_floating_ip,public_network)

Function fixture to prepare environment for ironic multitenancy tests.

This fixture:

• creates projects;

• creates net, subnet, router in each project;

• creates security groups in each project;

• add ping + ssh rules for 1’st project’s security group;

• add ssh rules for 2’nd project security group;

• creates 2 servers in 1’st project;

• creates 2 servers in 2’nd project with same fixed ip as for 1’st project;

• add floating ips for one of servers in each project.

All created resources are to be deleted after test.

Parameters

• request (obj) – py.test SubRequest

• projects (obj) – projects fixture

• multitenancy_networks (obj) – multitenancy tests networks fixture

• get_neutron_security_group_steps (function) – function to get neutron se-curity group steps

6.4. Ironic 47

Page 52: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• get_neutron_security_group_rule_steps (function) – function to get neu-tron security group rule steps

• get_server_steps (function) – function to get server steps

• get_keypair_steps (function) – function to get keypair steps

• glance_steps (obj) – instantiated glance steps

• baremetal_flavor (obj) – baremetal flavor

• baremetal_ubuntu_image (oobj) – baremetal ubuntu image

• port_steps (obj) – instantiated port steps

• create_floating_ip (function) – function to create floating ip

• public_network (dict) – neutron public network

Returns created resources

Return type attrdict.AttrDict

stepler.baremetal.conftest.primary_chassis(get_ironic_chassis_steps, cleanup_chassis,uncleanable)

Session fixture to remember primary chassis before tests.

Also optionally in finalization it deletes all unexpected chassis which are remained after tests.

Parameters

• get_ironic_chassis_steps (function) – Function to get ironic steps.

• cleanup_chassis (function) – Function to cleanup volumes.

• uncleanable (AttrDict) – Data structure with skipped resources.

stepler.baremetal.conftest.primary_nodes(get_ironic_node_steps, cleanup_nodes, unclean-able)

Session fixture to remember primary nodes before tests.

Also optionally in finalization it deletes all unexpected nodes which are remained after tests.

Parameters

• get_ironic_node_steps (function) – Function to get ironic steps.

• cleanup_nodes (function) – Function to cleanup nodes.

• uncleanable (AttrDict) – Data structure with skipped resources.

stepler.baremetal.conftest.unexpected_chassis_cleanup(primary_chassis,get_ironic_chassis_steps,cleanup_chassis)

Function fixture to clear unexpected volumes.

It provides cleanup before and after test.

stepler.baremetal.conftest.unexpected_node_cleanup(primary_nodes,get_ironic_node_steps,cleanup_nodes)

Function fixture to clear unexpected nodes.

It provides cleanup before and after test.

48 Chapter 6. Deep to structure

Page 53: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Ironic steps

class stepler.baremetal.steps.IronicNodeSteps(client)Node steps.

check_ironic_nodes_attribute_value(nodes, attribute, expected_value, node_timeout=0)Check ironic nodes attribute value.

Parameters

• nodes (list) – the list of ironic nodes.

• attribute (str) – the node attribute.

• expected_value (str) – the value of the node attribute.

• node_timeout (int) – seconds to wait a result of check.

Raises TimeoutExpired – if check failed after timeout.

check_ironic_nodes_maintenance(nodes, state, node_timeout=0)Check ironic node maintenance was changed.

Parameters

• nodes (list) – The list of ironic nodes.

• state (Bool) – the maintenance mode; either a Boolean or a string representation of aBoolean (eg, ‘true’, ‘on’, ‘false’, ‘off’). True to put the node in maintenance mode; Falseto take the node out of maintenance mode.

• node_timeout (int) – seconds to wait a result of check.

Raises TimeoutExpired – if check failed after timeout.

check_ironic_nodes_power_state(nodes, state, node_timeout=0)Check ironic node power state was changed.

Parameters

• nodes (list) – The list of ironic nodes.

• state (str) – the power state mode; on to put the node in power state mode on; off toput the node in power state mode off; reboot to reboot the node.

• node_timeout (int) – seconds to wait a result of check.

Raises TimeoutExpired – if check failed after timeout.

check_ironic_nodes_presence(nodes, must_present=True, node_timeout=0)Verify step to check ironic node is present.

Parameters

• nodes (list) – list of ironic nodes.

• must_present (bool) – flag whether node should present or not.

• node_timeout (int) – seconds to wait a result of check.

Raises TimeoutExpired – if check failed after timeout.

check_ironic_nodes_provision_state(nodes, state, node_timeout=0)Check ironic node provision state was changed.

Parameters

• nodes (list) – the list of ironic nodes.

6.4. Ironic 49

Page 54: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• state (str) – the provision state mode.

• node_timeout (int) – seconds to wait a result of check.

Raises TimeoutExpired – if check failed after timeout.

create_ironic_nodes(driver=’fake’, nodes_names=None, count=1, check=True, **kwargs)Step to create a ironic node.

Parameters

• driver (str) – The name or UUID of the driver.

• nodes_names (list) – names of created nodes, if not specified one node name will begenerated.

• count (int) – count of nodes to be created.

• check (str) – For checking node presence

• **kwargs (optional) – A dictionary containing the attributes

• the resource that will be created (of) – chassis_uuid - The uuid of thechassis. driver_info - The driver info. extra - Extra node parameters. uuid - The uuid ofthe node. properties - Node properties. name - The name of the node. network_interface -The network interface of the node. resource_class - The resource class of the node.

Raises TimeoutExpired – if check failed after timeout.

Returns nodes_list – list of created ironic nodes

Return type list

delete_ironic_nodes(nodes, check=True)Step to delete node.

Parameters

• nodes (list) – list of ironic nodes.

• check (bool) – flag whether to check step or not.

get_ironic_node(check=True, **kwargs)Find one node by provided **kwargs.

Parameters

• check (bool) – flag whether to check step or not.

• **kwargs – like: {‘name’: ‘test_node’, ‘status’: ‘active’}

Returns ironic node.

Return type object

Raises ValueError – if ‘**kwargs’ were not provided.

get_ironic_nodes(check=True, **kwargs)Step to retrieve nodes.

Parameters check (bool) – flag whether to check step or not.

Returns list of nodes. **kwargs: like: {‘name’: ‘test_node’, ‘status’: ‘active’}

Return type list of objects

Raises AssertionError – if nodes collection is empty.

50 Chapter 6. Deep to structure

Page 55: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

get_node_by_instance_uuid(server_uuid, check=True)Step to get node by instance uuid.

Parameters

• server_uuid (str) – the uuid of the nova server.

• check (bool) – flag whether to check step or not.

Returns ironic node.

Return type object

Raises AssertionError – if node is empty.

set_ironic_nodes_power_state(nodes, state, check=True)Set the power state for the node.

Parameters

• nodes (list) – The list of ironic nodes.

• state (str) – the power state mode; on to put the node in power state mode on; off toput the node in power state mode off; reboot to reboot the node.

• check (bool) – flag whether to check step or not.

Raises InvalidAttribute – if state is an invalid string.

set_maintenance(nodes, state, reason=None, check=True)Set the maintenance mode for the nodes.

Parameters

• nodes (list) – The list of ironic nodes.

• state (Bool) – the maintenance mode; either a Boolean or a string representation of aBoolean (eg, ‘true’, ‘on’, ‘false’, ‘off’). True to put the node in maintenance mode; Falseto take the node out of maintenance mode.

• reason (str) – Optional string. Reason for putting node into maintenance mode.

• check (bool) – flag whether to check step or not.

Raises InvalidAttribute – if state is an invalid string.

class stepler.baremetal.steps.IronicPortSteps(client)Ironic port steps.

check_ports_presence(ports, must_present=True, port_timeout=0)Step to check ports is present.

Parameters

• ports (list) – list of ironic ports

• must_present (bool) – flag whether ports should be present or not

• port_timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

create_ports(node, addresses=None, count=1, check=True, **kwargs)Step to create ironic ports with kwargs dictionary of attributes.

Parameters

• addresses (list) – MAC addresses for ports

6.4. Ironic 51

Page 56: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• node (object) – node of the ports should be associated with

• count (int) – count of created ports

• check (bool) – For checking ports were created correct with correct addresses

• kwargs – Optional. A dictionary containing the attributes of the resource that will becreated:

– extra (dictionary) - Extra node parameters

– local_link_connection (dictionary) - Contains the port binding profile

– pxe_enabled (bool) - Indicates whether PXE is enabled for the port

– uuid (str) - The uuid of the port

Returns ports – list of created ironic ports

Return type list

Raises TimeoutExpired|AssertionError – if check failed after timeout

delete_ports(ports, check=True)Step to delete ports.

Parameters

• ports (list) – list of ironic ports

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

get_ports(check=True)Step to get ports.

Parameters check (bool) – flag whether to check step or not

Returns ports – list of ironic ports

Return type list

Raises AssertionError – if check failed

class stepler.baremetal.steps.IronicChassisSteps(client)Chassis steps.

check_ironic_chassis_presence(chassis_list, must_present=True, chassis_timeout=0)Verify step to check ironic chassis is present.

Parameters

• chassis_list (list) – list of ironic chassis to check presence status

• must_present (bool) – flag whether chassis should present or not

• chassis_timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

create_ironic_chassis(descriptions=None, count=1, check=True)Step to create a ironic chassis.

Parameters

• descriptions (list) – descriptions of created chassis, if not specified one chassisdescription will be generate

52 Chapter 6. Deep to structure

Page 57: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• count (int) – count of created chassis, it’s ignored if chassis_descriptions are specified;one chassis is created if both args are missing

• check (str) – flag for checking chassis presence

Raises TimeoutExpired – if check was triggered to False after timeout

Returns list of the created chassis or None in case of exception, and an exception, if it appears.

Return type list

delete_ironic_chassis(chassis_list, check=True)Step to delete chassis.

Parameters

• chassis_list (list) – list of ironic chassis

• check (bool) – flag whether to check step or not

get_ironic_chassis(check=True)Step to retrieve chassis.

Returns list of chassis.

Return type list of objects

Raises AssertionError – if chassis collection is empty.

Ironic node tests

Ironic node tests

stepler.baremetal.tests.test_baremetal_node.test_node_create(ironic_node)Scenario: Verify that ironic node can be created and deleted.

Setup:

1.Create ironic node

Teardown:

1.Delete ironic node

stepler.baremetal.tests.test_baremetal_node.test_set_node_maintenance(ironic_node,ironic_node_steps)

Scenario: Verify that ironic node maintenance can be changed.

Setup:

1.Create ironic node

Steps:

1.Change ironic node maintenance

Teardown:

1.Delete ironic node

6.4. Ironic 53

Page 58: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Ironic baremetal node tests

stepler.baremetal.tests.test_boot_baremetal_server.test_boot_server_simple(keypair,baremetal_flavor,baremetal_ubuntu_image,baremetal_network,server_steps)

*Scenario: Boot one baremetal server.

Setup:

1.Create keypair

2.Create baremetal flavor

3.Upload baremetal ubuntu image

Steps:

1.Create and boot server, check that server status is active

Teardown:

1.Delete server

2.Delete image

3.Delete flavor

4.Delete keypair

stepler.baremetal.tests.test_boot_baremetal_server.test_boot_servers_concurrently_on_ironic_node(keypair,baremetal_flavor,baremetal_ubuntu_image,baremetal_network,cre-ate_floating_ip,server_steps,ironic_node_steps)

Scenario: Boot two baremetal servers concurrently.

Setup:

1.Create keypair

2.Create baremetal flavor

3.Upload baremetal ubuntu image

Steps:

1.Create and boot server_1 and server_2

2.Check that servers status is active

3.Get ironic_node_1

4.Get ironic_node_2

5.Check that ironic nodes provision state is active

6.Create floating ip for server_1

7.Attach floating ip to server_2

8.Create floating ip for server_2

54 Chapter 6. Deep to structure

Page 59: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

9.Attach floating ip to server_2

10.Check ssh access to server_1

11.Check ssh access to server_2

Teardown:

1.Delete servers

2.Delete floating ips

3.Delete image

4.Delete flavor

5.Delete keypair

stepler.baremetal.tests.test_boot_baremetal_server.test_boot_servers_consequently_on_ironic_node(keypair,baremetal_flavor,baremetal_ubuntu_image,baremetal_network,cre-ate_floating_ip,server_steps,ironic_node_steps)

Scenario: Boot two baremetal servers consequently.

Setup:

1.Create keypair

2.Create baremetal flavor

3.Upload baremetal ubuntu image

Steps:

1.Create and boot server_1

2.Check that server_1 status is active

3.Create and boot server_2

4.Check that server_2 status is active

5.Get ironic_node_1

6.Get ironic_node_1

7.Check that ironic nodes provision state is active

8.Create floating ip for server_1

9.Attach floating ip to server_2

10.Create floating ip for server_2

11.Attach floating ip to server_2

12.Check ssh access to server_1

13.Check ssh access to server_2

Teardown:

1.Delete servers

2.Delete floating ips

6.4. Ironic 55

Page 60: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

3.Delete image

4.Delete flavor

5.Delete keypair

stepler.baremetal.tests.test_boot_baremetal_server.test_create_server_on_baremetal_node(keypair,baremetal_ubuntu_image,baremetal_flavor,baremetal_network,float-ing_ip,server_steps)

Scenario: Launch server on baremetal node.

Setup:

1.Create keypair

2.Create baremetal flavor

3.Upload baremetal ubuntu image

4.Create floating ip

Steps:

1.Create and boot server

2.Check that server status is active

3.Attach floating ip to server

4.Check ssh access to server

Teardown:

1.Delete server

2.Delete floating ip

3.Delete image

4.Delete flavor

5.Delete keypair

stepler.baremetal.tests.test_boot_baremetal_server.test_create_server_on_baremetal_node_in_maintenance_state(ironic_node_steps,baremetal_network,baremetal_ubuntu_image,baremetal_flavor,server_steps)

Scenario: Launch server on baremetal node in maintenance state.

Setup:

1.Create baremetal flavor

2.Upload baremetal ubuntu image

Steps:

1.Get Ironic nodes

2.Set all Ironic nodes into maintenance mode

3.Create and boot server

56 Chapter 6. Deep to structure

Page 61: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

4.Check that server status is error

5.Check that instance doesn’t exist in ironic node

Teardown:

1.Delete server

2.Delete image

3.Delete flavor

stepler.baremetal.tests.test_boot_baremetal_server.test_hard_reboot_server_on_ironic_node(keypair,baremetal_flavor,baremetal_ubuntu_image,baremetal_network,float-ing_ip,server_steps)

Scenario: Hard reboot server on ironic node.

Setup:

1.Create keypair

2.Create baremetal flavor

3.Upload baremetal ubuntu image

4.Create floating ip

Steps:

1.Create and boot server

2.Check that server status is active

3.Attach floating ip to server

4.Check ssh access to server

5.Reboot server

6.Check that server status is hard reboot

7.Check that server status is active

8.Check ssh access to server

Teardown:

1.Delete server

2.Delete floating ip

3.Delete image

4.Delete flavor

5.Delete keypair

stepler.baremetal.tests.test_boot_baremetal_server.test_stop_start_server_on_baremetal_node(keypair,baremetal_flavor,baremetal_ubuntu_image,baremetal_network,float-ing_ip,server_steps)

6.4. Ironic 57

Page 62: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Scenario: Shut off and restart server on baremetal node.

Setup:

1.Create keypair

2.Create baremetal flavor

3.Upload baremetal ubuntu image

4.Create floating ip

Steps:

1.Create and boot server

2.Check that server status is active

3.Attach floating ip to server

4.Check ssh access to server

5.Stop server

6.Check that server status is shutoff

7.Start server

8.Check that server status is active

9.Check ssh access to server

Teardown:

1.Delete server

2.Delete floating ip

3.Delete image

4.Delete flavor

5.Delete keypair

Ironic services tests

stepler.baremetal.tests.test_ironic_services.test_ironic_api_service(keypair,baremetal_flavor,baremetal_network,baremetal_ubuntu_image,float-ing_ip,ironic_api_node,server_steps,os_faults_steps)

Scenario: Launch server with stopped service ironic-api on one of node.

Setup:

1.Create keypair

2.Create baremetal flavor

3.Upload baremetal ubuntu image

4.Create floating ip

58 Chapter 6. Deep to structure

Page 63: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

5.Get node with service ironic-api

Steps:

1.Create and boot server

2.Stop service ironic-api

3.Check that server status is active

4.Attach floating ip to server

5.Check ssh access to server

6.Start service ironic-api

Teardown:

1.Delete server

2.Delete floating ip

3.Delete image

4.Delete flavor

5.Delete keypair

Ironic chassis tests

Ironic baremetal chassis tests

stepler.baremetal.tests.test_baremetal_chassis.test_chassis_create(ironic_chassis_steps)Scenario: Verify that ironic chassis can be created and deleted.

Steps:

1.Create ironic chassis

2.Delete ironic chassis

Ironic multitenancy tests

Ironic baremetal multitenancy tests

stepler.baremetal.tests.test_multitenancy.test_per_project_l3_isolation(multitenancy_resources)Check user can’t get access to other project’s instance.

Setup:

1.Create 2 projects and 2 users

2.Create network, subnet, router on each project

3.Upload public baremetal ubuntu image

4.Create baremetal flavor

5.Create keypairs

6.Boot 2 servers on 1’st project and 1 server on 2’nd project

7.Assign Floating IPs to one server from 1’st project and server from 2’nd project

6.4. Ironic 59

Page 64: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Steps:

1.Check that users can see only own project’s servers

2.Check that 1’nd user can’t ping 2’st project server via fixed IP

3.Check that 1’nd user can ping 2’st project server via floating IP

4.Check ping between 1’st project servers

Teardown:

1.Delete servers

2.Delete floating ips

3.Delete networks, subnets, routers

4.Delete image

5.Delete flavor

6.Delete keypairs

7.Delete projects and users

stepler.baremetal.tests.test_multitenancy.test_shared_network(multitenancy_resources)Check different projects with shared network connectivity.

Setup:

1.Create 2 projects and 2 users

2.Create shared network, subnet, router

3.Upload public baremetal ubuntu image

4.Create baremetal flavor

5.Boot 2 servers on 1’st project and 1 server on 2’nd project

6.Assign Floating IPs to one server from 1’st project and server from 2’nd project

Steps:

1.Check that 1’nd user can ping 2’st project server via fixed IP

Teardown:

1.Delete servers

2.Delete floating ips

3.Delete network, subnet, router

4.Delete image

5.Delete flavor

6.Delete keypairs

7.Delete projects and users

60 Chapter 6. Deep to structure

Page 65: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Glance

Glance conftest

Contains fixtures specific for glance.

stepler.glance.conftest.api_glance_client_v1(get_glance_client)Function fixture to get API glance client v1.

Parameters get_glance_client (function) – function to get glance client

Returns instantiated API glance client v1

Return type api_clients.ApiClientV1

stepler.glance.conftest.api_glance_client_v2(get_glance_client)Function fixture to get API glance client v2.

Parameters get_glance_client (function) – function to get glance client

Returns instantiated API glance client v2

Return type api_clients.ApiClientV2

stepler.glance.conftest.api_glance_steps(get_glance_steps)Function fixture to get API glance steps.

Parameters get_glance_steps (function) – function to get API glance steps

Returns instantiated glance steps

Return type GlanceSteps

stepler.glance.conftest.api_glance_steps_v1(get_glance_steps)Function fixture to get API glance steps for v1.

Parameters get_glance_steps (function) – function to get glance steps

Returns instantiated glance steps v1

Return type GlanceStepsV1

stepler.glance.conftest.api_glance_steps_v2(get_glance_steps)Function fixture to get API glance steps for v2.

Parameters get_glance_steps (function) – function to get API glance steps

Returns instantiated glance steps

Return type GlanceSteps

stepler.glance.conftest.baremetal_ubuntu_image(get_glance_steps, uncleanable, creden-tials)

Module fixture to create baremetal ubuntu image with default options.

Parameters

• get_glance_steps (function) – function to get glance steps

• uncleanable (AttrDict) – data structure with skipped resources

• credentials (object) – CredentialsManager instance

Returns ubuntu image

Return type object

6.5. Glance 61

Page 66: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.glance.conftest.change_glance_credentials(os_faults_steps, glance_steps,user_steps)

Function fixture to change glance credentials in config and keystone.

Original credentials will be restored after test.

Parameters

• os_faults_steps (obj) – instantiated os-faults steps

• glance_steps (obj) – instantiated glance steps

• user_steps (obj) – instantiated user-steps

stepler.glance.conftest.cirros_image(get_glance_steps, uncleanable, credentials)Module fixture to create cirros image with default options.

Parameters

• get_glance_steps (function) – function to get glance steps

• uncleanable (AttrDict) – data structure with skipped resources

• credentials (object) – CredentialsManager instance

Returns cirros glance image

Return type object

stepler.glance.conftest.cirros_image_private(get_glance_steps, uncleanable, creden-tials)

Module fixture to create private cirros image with default options.

Parameters

• get_glance_steps (function) – function to get glance steps

• cirros_image (object) – cirros glance image

Returns private cirros glance image

Return type object

stepler.glance.conftest.conntrack_cirros_image(get_glance_steps, uncleanable, creden-tials)

Function fixture to create cirros image with patches for conntrack.

Parameters

• get_glance_steps (function) – function to get glance steps

• uncleanable (AttrDict) – data structure with skipped resources

• credentials (object) – CredentialsManager instance

Returns public cirros glance image

Return type object

stepler.glance.conftest.create_images_context(get_glance_steps, uncleanable, cre-dentials, image_names, image_url,**kwargs)

Context manager to create image and delete it later. :param get_glance_steps: function to get glance steps :typeget_glance_steps: function :param uncleanable: data structure with skipped resources :type uncleanable: Attr-Dict :param credentials: CredentialsManager instance :type credentials: object :param image_names: desiredimage name :type image_names: str :param image_url: url to download image from :type image_url: str :param**kwargs: Additional arguments to pass to API

62 Chapter 6. Deep to structure

Page 67: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Returns ubuntu glance image

Return type object

stepler.glance.conftest.enable_multi_locations(patch_ini_file_and_restart_services,get_glance_steps)

Fixture to enable glance multiple locations.

Parameters

• patch_ini_file_and_restart_services (function) – callable fixture topatch ini file and restart services

• get_glance_steps (function) – callable session fixture to get glance steps.

stepler.glance.conftest.get_glance_client(get_session)Callable session fixture to get glance client v1.

Parameters get_session (function) – function to get keystone session

Returns function to get glance client v1

Return type function

stepler.glance.conftest.get_glance_steps(request, get_glance_client)Callable session fixture to get glance steps.

Parameters get_glance_client (function) – function to get glance client

Returns function to get glance steps

Return type function

stepler.glance.conftest.glance_client_v1(get_glance_client)Function fixture to get glance client v1.

Parameters get_glance_client (function) – function to get glance client

Returns instantiated glance client

Return type glanceclient.v1.client.Client

stepler.glance.conftest.glance_client_v2(get_glance_client)Function fixture to get glance client v2.

Parameters get_glance_client (function) – function to get glance client

Returns instantiated glance client

Return type glanceclient.v2.client.Client

stepler.glance.conftest.glance_steps(get_glance_steps, images_cleanup)Function fixture to get API glance steps.

Parameters

• get_glance_steps (function) – function to get glance steps

• images_cleanup (function) – function to cleanup images after test

Yields object – instantiated glance steps of current version

stepler.glance.conftest.glance_steps_v1(get_glance_steps)Function fixture to get glance steps for v1.

Parameters get_glance_steps (function) – function to get glance steps

Returns instantiated glance steps v1

6.5. Glance 63

Page 68: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Return type GlanceStepsV1

stepler.glance.conftest.glance_steps_v2(get_glance_steps)Function fixture to get glance steps for v2.

Parameters get_glance_steps (function) – function to get glance steps

Returns instantiated glance steps v2

Return type GlanceStepsV2

stepler.glance.conftest.images_cleanup(uncleanable)Callable function fixture to cleanup images after test.

Parameters uncleanable (AttrDict) – data structure with skipped resources

Returns function to cleanup images

Return type function

stepler.glance.conftest.set_glance_storage_to_file_with_quota(os_faults_steps,get_glance_steps)

Fixture to set glance storage to file and set user_storage_quota.

Parameters

• os_faults_steps (obj) – instantiated os-faults steps

• get_glance_steps (function) – function to get glance steps.

stepler.glance.conftest.ubuntu_image(get_glance_steps, uncleanable, credentials)Module fixture to create ubuntu image. Creates image from config.UBUNTU_QCOW2_URL with default op-tions.

Parameters

• get_glance_steps (function) – function to get glance steps

• uncleanable (AttrDict) – data structure with skipped resources

• credentials (object) – CredentialsManager instance

Returns ubuntu glance image

Return type object

stepler.glance.conftest.ubuntu_xenial_image(get_glance_steps, uncleanable, credentials)Module fixture to create ubuntu xenial image. Creates image from config.UBUNTU_XENIAL_QCOW2_URLwith default options.

Parameters

• get_glance_steps (function) – function to get glance steps

• uncleanable (AttrDict) – data structure with skipped resources

• credentials (object) – CredentialsManager instance

Returns ubuntu xenial glance image

Return type object

Glance steps

Contains steps specific for glance.

64 Chapter 6. Deep to structure

Page 69: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

class stepler.glance.steps.GlanceStepsV1(client)Glance steps for v1.

check_image_update_is_forbidden(images, status)Step to check that it is forbidden to update images.

Parameters

• images (object) – glance images

• status (str) – status to be set for images

Raises AssertionError – if check triggered an error

upload_image(image, image_path, check=True)Step to upload image.

Parameters

• image (obj) – glance image

• image_path (str) – path image file

• check (bool, optional) – flag whether to check this step or not

Raises AssertionError – if check failed

class stepler.glance.steps.GlanceStepsV2(client)Glance steps for v2.

add_locations(image, urls, check=True)Step to add location to image.

Parameters

• image (obj) – glance image

• urls (list) – urls for adding to image location

• check (bool) – flag whether to check step or not

Raises AssertionError – if locations was not added

bind_project(image, project, check=True)Step to bind image to project.

Parameters

• image (object) – image to bind to project

• project (object) – project to bind to image

• check (bool) – flag whether to check binding or not

check_glance_service_available(should_be=True, timeout=15)Step to check glance service availability.

Parameters

• should_be (bool) – flag whether glance should available or not

• timeout (int) – seconds to wait glance availability status

Raises TimeoutExpired – if check failed after timeout

check_image_bind_status(image, project, must_bound=True, timeout=0)Check step image binding status.

Parameters

6.5. Glance 65

Page 70: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• image (object) – image bound/unbound with project

• project (object) – project bound/unbound with image

• must_bound (bool) – flag whether project and image should be bound or unbound

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_image_container_and_disk_format(image_name, image_container, disk_format)Check image container format and disk format.

Parameters

• image_name (object) – image bound/unbound with project

• image_container (str) – type of image container

• disk_format (str) – type of disk format

Raises AssertionError – if check failed

check_image_content(image, path)Step to compare image content with file content.

Parameters

• image (obj) – glance image

• path (str) – path to file to compare image with

Raises AssertionError – if check failed

check_image_data_corresponds_to_source(image, file_path)Step to check that image data correspond to image source.

Parameters

• image (obj) – image object

• file_path (str) – path to file image upload from

Raises AssertionError – if image checksum not equal to source file checksum

check_image_hash(image_path_1, image_path_2)Step to check hash sum of uploaded image and downloaded image.

Parameters

• image_path_1 (str) – path to first image

• image_path_2 (str) – path to second image

Raises AssertionError – if hash sum has been mismatched

check_that_image_id_is_changed(image_name, image_id)Step to check that after updating heat stack image_id was changed.

Parameters

• image_name (str) – image name that was replaced

• image_id (str) – before updating

Raises AssertionError – if check failed

create_images(image_path, image_names=None, disk_format=’qcow2’, container_format=’bare’,visibility=’private’, upload=True, check=True, **kwargs)

Step to create images.

66 Chapter 6. Deep to structure

Page 71: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• image_path (str) – path to image at local machine

• image_names (list) – names of created images, if not specified one image name willbe generated

• disk_format (str) – format of image disk

• container_format (str) – format of image container

• visibility (str) – image visibility (private or public). Default is private.

• upload (bool) – flag whether to upload image after creation or not (upload=False isused in some negative tests)

• check (bool) – flag whether to check step or not

• **kwargs – Optional. A dictionary containing the attributes of the resource

Returns glance images

Return type list

Raises AssertionError – if check failed

get_image(check=True, **kwargs)Find one image by provided **kwargs.

Parameters

• check (bool) – flag whether to check step or not

• **kwargs – like: {‘name’: ‘TestVM’, ‘status’: ‘active’}

Returns glance image

Return type object

Raises ValueError – if ‘**kwargs’ were not provided

get_images(name_prefix=None, check=True, **kwargs)Step to retrieve images from glance.

Parameters

• name_prefix (str) – name prefix to filter images

• check (bool) – flag whether to check step or not

• **kwargs – like: {‘name’: ‘TestVM’, ‘status’: ‘active’}

Returns images list

Return type list

Raises AssertionError – if check triggered an error

unbind_project(image, project, check=True)Step to unbind image to project.

Parameters

• image (object) – image to unbind from project

• project (object) – project to unbind from image

• check (bool) – flag whether to check unbinding or not

6.5. Glance 67

Page 72: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

upload_image(image, image_path, check=True)Step to upload image.

Parameters

• image (obj) – glance image

• image_path (str) – path image file

• check (bool, optional) – flag whether to check this step or not

Raises AssertionError – if check failed

Glance tests

Image tests

stepler.glance.tests.test_images.test_change_image_status_directly(glance_steps,api_glance_steps_v1)

Scenario: Verify that user can’t change image status directly.

This test verify that user can’t change image status directly with v1 API.

Note: This test verify bug #1496798.

Setup:

1.Create cirros image

Steps:

1.Get token

2.Send PUT request to glance image endpoint with {‘x-image-meta-status’: ‘queued’} headers

3.Check that image’s status is still active

Teardown:

1.Delete cirros image

stepler.glance.tests.test_images.test_create_update_delete_image(glance_steps)Scenario: Check that image can be created, updated and deleted.

Steps:

1.Create cirros image with min-ram 512 and min-disk 1

2.Update image ram size

3.Delete image

stepler.glance.tests.test_images.test_images_list(glance_steps)Scenario: Request list of images.

Steps:

1.Get list of images

stepler.glance.tests.test_images.test_share_glance_image(cirros_image_private,project, glance_steps)

Scenario: Check sharing glance image to another project.

Setup:

68 Chapter 6. Deep to structure

Page 73: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Create private image

2.Create project

Steps:

1.Bind another project to image

2.Unbind project from image

Teardown:

1.Delete project

2.Delete image

Glance service tests

stepler.glance.tests.test_services.test_kill_glance_on_controller(os_faults_steps,glance_steps)

Scenario: Kill glance services on controller and upload image.

Steps:

1.Kill all glance services on controller

2.Wait glance becomes available

3.Upload image to glance

stepler.glance.tests.test_services.test_restart_all_glance_services(cirros_image,flavor,keypair,net_subnet_router,secu-rity_group,server,get_ssh_proxy_cmd,glance_steps,os_faults_steps,server_steps)

Scenario: Check that glance works after restarting services.

Setup:

1.Create cirros image

2.Create flavor

3.Create keypair

4.Create network with subnet and router

5.Create security group

6.Create server_1

Steps:

1.Check that ping from server_1 to 8.8.8.8 is successful

2.Create image_1 and check its content

3.Restart glance services

4.Wait for glance service availability

6.5. Glance 69

Page 74: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

5.Check that image_1 is in images list and its content is expected as well

6.Create image_2 and check its content

7.Create server_2 and check ping to 8.8.8.8 from it

Teardown:

1.Delete images

2.Delete servers

3.Delete security group

4.Delete network, subnet, router

5.Delete keypair

6.Delete flavor

7.Delete cirros image

Glance security tests

stepler.glance.tests.test_security.test_change_glance_credentials(request, cir-ros_image,glance_steps)

Scenario: Check image available after changing glance credentials.

Setup:

1.Create cirros image

Steps:

1.Change glance credentials on keystone and glance_api.conf

2.Download cirros image

3.Check that image downloaded successful

Teardown:

1.Restore glance credentials

2.Delete cirros image

stepler.glance.tests.test_security.test_user_storage_quota_bypass(get_glance_steps,os_faults_steps,api_version)

Scenario: Check user can’t bypass quota with deleting images.

Note: This test verifies bug #1414685

Setup:

1.Set ‘file’ storage on glance-api.conf

2.Set ‘user_storage_quota’ to 604979776 on glance-api.conf (a little more than the size of the image)

3.Restart glance-api service

Steps:

1.Create ubuntu image without uploading

70 Chapter 6. Deep to structure

Page 75: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Start upload image file in background

3.Wait few seconds

4.Delete created image

5.Repeat steps above 10 times

6.Wait for all uploads to be done

7.Check that glance disk usage is not exceed quota

Teardown:

1.Restore original glance config

2.Restart glance-api

Heat

Heat conftest

Contains fixtures specific for heat.

stepler.heat.conftest.create_stack(stack_steps)Fixture to create heat stack with options.

Can be called several times during test. All created stacks will be deleted at teardown.

Parameters stack_steps (obj) – initialized heat stack steps

Returns function to create heat stack

Return type function

stepler.heat.conftest.empty_stack(create_stack, read_heat_template)Function fixture to create empty heat stack.

Parameters

• create_stack (function) – fixture to create stack

• read_heat_template (function) – fixture to read template

Returns created stack

Return type obj

stepler.heat.conftest.get_template_path()Callable session function fixture to get template path.

Can be called several times during a test.

Returns function to get template path

Return type function

stepler.heat.conftest.heat_client(session)Function fixture to get heat client.

Parameters session (object) – authenticated keystone session

Returns instantiated heat client

Return type heatclient.Client

6.6. Heat 71

Page 76: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.heat.conftest.heat_resource_steps(heat_client)Function fixture to get heat resource steps.

Parameters heat_client (object) – initialized heat client

Returns initialized heat resource steps

Return type stepler.heat.steps.ResourceSteps

stepler.heat.conftest.heat_resource_type_steps(heat_client)Function fixture to get heat resource types steps.

Parameters heat_client (object) – initialized heat client

Returns

initialized heat resource types steps

Return type stepler.heat.steps.ResourceTypeSteps

stepler.heat.conftest.read_heat_template(get_template_path)Session fixture to read template from stepler/heat/templates folder.

Can be called several times during a test.

Returns function to read template

Return type function

stepler.heat.conftest.stack_steps(heat_client)Function fixture to get heat stack steps.

Parameters heat_client (object) – initialized heat client

Returns initialized heat stack steps

Return type stepler.heat.steps.StackSteps

stepler.heat.conftest.stacks_cleanup(stack_steps)Callable function fixture to clear created stacks after test.

It stores ids of all stacks before test and remove all new stacks after test done.

Parameters stack_steps (obj) – initialized heat stack steps

Heat steps

Contains steps specific for heat.

class stepler.heat.steps.StackSteps(client)Heat stack steps.

check_output_list(output_list)Step to check stack attributes in format: output_key - description.

Parameters output_list (dict) – stack output list

Raises AssertionError – if check failed

check_output_show(stack, output_key, expected_attr_values=None, timeout=0)Step to check stack attributes.

Parameters

• stack (obj) – stack object

• output_key (str) – the name of a stack output

72 Chapter 6. Deep to structure

Page 77: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• expected_attr_values (dict|None) – expected attribute values If None, onlycheck that elements of output_show are not empty

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_presence(stack, must_present=True, timeout=0)Check-step to check heat stack presence.

Parameters

• stack (obj|str) – heat stack object or id

• must_present (bool) – flag to check is stack present or absent

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_stack_status(stack, status, transit_statuses=(), timeout=0)Verify step to check stack’s stack_status property.

Parameters

• stack (obj) – heat stack to check its status

• status (str) – expected stack status

• transit_statuses (iterable) – allowed transit statuses

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check was failed after timeout

check_status(stack, status, transit_statuses=(), timeout=0)Verify step to check stack’s status property.

Parameters

• stack (obj) – heat stack to check its status

• status (str) – expected stack status

• transit_statuses (iterable) – allowed transit statuses

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired|AssertionError – if check failed after timeout

create(name, template, parameters=None, files=None, check=True)Step to create stack.

Parameters

• name (str) – name of stack

• template (str) – yaml template content for create stack from

• parameters (dict|None) – parameters for template

• files (dict|None) – in case if template uses file as reference e.g: “type: vol-ume_with_attachment.yaml”

• check (bool) – flag whether check step or not

Returns heat stack

Return type object

6.6. Heat 73

Page 78: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

delete(stack, check=True)Step to delete stack.

Parameters

• stack (obj) – stack to delete

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

get_events_list(stack, check=True)Step to get stack’s events list.

Parameters

• stack (obj) – heat stack

• check (bool, optional) – flag whether check step or not

Raises AssertionError – if events list is empty

Returns stack’s events list

Return type list

get_output(stack, output_key, check=True)Step to get stack output by output_key.

Parameters

• stack (obj) – stack object

• output_key (str) – output key

• check (bool) – flag whether check step or not

Returns stack output

Return type dict

Raises AssertionError – if output is none or empty

get_stack_output_list(stack, check=True)Step to get output list.

Parameters

• stack (obj) – stack object

• check (bool) – flag whether check step or not

Returns stack output list

Return type list

Raises AssertionError – if check failed

get_stack_output_show(stack, output_key, check=True)Step to get output show.

Parameters

• stack (obj) – stack object

• output_key (str) – the name of a stack output

• check (bool) – flag whether check step or not

Returns stack output

74 Chapter 6. Deep to structure

Page 79: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Return type dict

Raises AssertionError – if check failed

get_stack_template(stack, check=True)Step to get stack’s template.

Parameters

• stack (obj) – heat stack

• check (bool, optional) – flag whether check step or not

Raises AssertionError – if stack’s template is empty

Returns stack’s template

Return type dict

get_stacks(check=True)Step to retrieve stacks from heat.

Parameters check (bool) – flag whether to check step or not

Returns stacks list

Return type list

suspend(stack, check=True)Step to suspend stack.

Parameters

• stack (obj) – heat stack

• check (bool, optional) – flag whether check step or not

Raises AssertionError – if stack’s stack_status is not con-fig.STACK_STATUS_SUSPEND_COMPLETE after suspending

update_stack(stack, template=None, parameters=None, check=True)Step to update stack.

Parameters

• stack (obj) – stack object

• template (str, optional) – stack template on which to perform the operation.Default is None.

• parameters (dict, optional) – stack parameters to update

• check (bool) – flag whether check step or not

Raises TimeoutExpired – if check failed after timeout

class stepler.heat.steps.ResourceSteps(client)Heat resource steps

check_that_resource_id_changed(physical_resource_id, stack, resource_name)Step to check that after stack updating physical_resource_id was changed.

Parameters

• physical_resource_id (str) – resource id before updating

• stack (object) – heat stack

• resource_name (str) – name of the resource

6.6. Heat 75

Page 80: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Raises AssertionError – if physical_resource_id wasn’t changed

get_resource(stack, name, check=True)Step to get resource.

Parameters

• stack (object) – heat stack

• name (str) – resource name

• check (bool) – flag whether check step or not

Returns stack resource

Return type object

get_resources(stack, name=None, check=True)Step to get list of resources.

Parameters

• stack (object) – heat stack

• name (str) – resource name

• check (bool) – flag whether check step or not

Returns resource list for stack

Return type list

Raises AssertionError – if check failed

class stepler.heat.steps.ResourceTypeSteps(client)Heat resource type steps.

get_resource_types(check=True)Step to get list of resource types.

Parameters check (bool) – flag whether check step or not

Returns resource types list for stack

Return type list

Raises AssertionError – if list is empty

Heat tests

Heat stack tests

stepler.heat.tests.test_stack.test_check_output_show_during_stack_creation(create_stack,read_heat_template,stack_steps)

Scenario: Check stack output show during stack creation.

Steps:

1.Read template from file

2.Launch creation stack with template

3.Get output show

4.Check that output contains expected attribute values

76 Chapter 6. Deep to structure

Page 81: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Teardown:

1.Delete stack

stepler.heat.tests.test_stack.test_create_stack_with_aws(net_subnet_router,read_heat_template,public_network, cre-ate_stack, port_steps)

Scenario: Create stack with AWS resources.

Setup:

1.Create network

2.Create subnet

3.Create router

4.Set router default gateway to public network

5.Add router interface to created network

Steps:

1.Read AWS template from file

2.Create stack with template with parameters: internal_network, internal_subnet, external_network

3.Check stack reach “COMPLETE” status

Teardown:

1.Delete stack

2.Delete router

3.Delete subnet

4.Delete network

stepler.heat.tests.test_stack.test_create_stack_with_docker(keypair, flavor,net_subnet_router,ubuntu_xenial_image,read_heat_template,public_network,create_stack,stack_steps)

Scenario: Create stack with Docker.

Setup:

1.Create network

2.Create subnet

3.Create router

4.Set router default gateway to public network

5.Add router interface to created network

Steps:

1.Read docker host template from file

2.Create stack with template with parameters: key, flavor, image, public_net, int_network_id

3.Check stack reach “COMPLETE” status

6.6. Heat 77

Page 82: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

4.Get created server floating_ip

5.Read docker_containers template

6.Create stack with template with docker_endpoint parameter

7.Check stack reach “COMPLETE” status

Teardown:

1.Delete stacks

2.Delete router

3.Delete subnet

4.Delete network

stepler.heat.tests.test_stack.test_create_stack_with_heat_resources(read_heat_template,cre-ate_stack)

Scenario: Create stack with heat resources.

Steps:

1.Read Heat resources template from file

2.Create stack with template

3.Check stack reach “COMPLETE” status

Teardown:

1.Delete stack

stepler.heat.tests.test_stack.test_create_stack_with_neutron_resources(cirros_image,fla-vor,pub-lic_network,net_subnet_router,read_heat_template,cre-ate_stack)

Scenario: Create stack with Neutron resources.

Setup:

1.Create cirros image

2.Create network

3.Create subnet

4.Create router

5.Set router default gateway to public network

6.Add router interface to created network

Steps:

1.Read Heat resources template from file

2.Create stack with template with parameters: image, flavor, public_net_id, private_net_id, pri-vate_subnet_id

3.Check stack reach “COMPLETE” status

78 Chapter 6. Deep to structure

Page 83: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Teardown:

1.Delete stack

2.Delete router

3.Delete subnet

4.Delete network

5.Delete cirros image

stepler.heat.tests.test_stack.test_create_stack_with_nova_resources(cirros_image,flavor,pub-lic_network,net_subnet_router,read_heat_template,cre-ate_stack)

Scenario: Create stack with Nova resources.

Setup:

1.Create cirros image

2.Create flavor

3.Create network

4.Create subnet

5.Create router

6.Set router default gateway to public network

7.Add router interface to created network

Steps:

1.Read Heat resources template from file

2.Create stack with template with parameters: image, flavor, public_net_id, private_net_id, pri-vate_subnet_id

3.Check stack reach “COMPLETE” status

Teardown:

1.Delete stack

2.Delete router

3.Delete subnet

4.Delete network

5.Delete flavor

6.Delete cirros image

6.6. Heat 79

Page 84: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.heat.tests.test_stack.test_create_stack_with_wait_condition(cirros_image,flavor,net_subnet_router,read_heat_template,cre-ate_stack,port_steps)

Scenario: Create stack with WaitCondition resources.

Setup:

1.Create cirros image

2.Create flavor

3.Create network

4.Create subnet

5.Create router

6.Set router default gateway to public network

Steps:

1.Read template with WaitCondition resources

2.Create stack with template with parameters: image, flavor, private_net

3.Check stack reach “COMPLETE” status

Teardown:

1.Delete stack

2.Delete flavor

3.Delete image

stepler.heat.tests.test_stack.test_get_stack_template(empty_stack, stack_steps)Scenario: Show template of created stack.

Setup:

1.Create stack

Steps:

1.Get template for stack

2.Check that template is not empty

Teardown:

1.Delete stack

stepler.heat.tests.test_stack.test_stack_output_list(create_stack,read_heat_template,stack_steps)

Scenario: Check stack output list has correct output.

Steps:

1.Read template from file

2.Create stack with template

3.Get output list

80 Chapter 6. Deep to structure

Page 85: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

4.Check that output list has correct output

Teardown:

1.Delete stack

stepler.heat.tests.test_stack.test_stack_output_show(create_stack,read_heat_template,stack_steps)

Scenario: Check stack output show has correct output.

Steps:

1.Read template from file

2.Create stack with template

3.Get output show

4.Check that attribute output_show exist

Teardown:

1.Delete stack

stepler.heat.tests.test_stack.test_stack_update_parameter_replace(create_stack,read_heat_template,stack_steps,heat_resource_steps,glance_steps)

Scenario: Update stack with changed template.

Steps:

1.Read template from file

2.Create stack with template

3.Get physical_resource_id

4.Get image

5.Check that image container_format is bare

6.Check that image disk_format is qcow2

7.Update stack

8.Check that image container_format is ami

9.Check that image disk_format is ami

10.Check that image_id was changed

11.Check that physical_resource_id was changed

Teardown:

1.Delete stack

6.6. Heat 81

Page 86: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Horizon

Tests launching

py.test stepler/horizon

Special environment variables:

• VIRTUAL_DISPLAY says py.test to use xvfb. Not specified by default.

Required software:

• firefox v45 or less - modern firefox versions require geckodriver, which is unstable still

• avconv - is used to capture tests video

• xvfb - optionally, if you are going to use virtual X11 display

Note: It requires X11 display to launch firefox. With server distributive it’s recommended to use xvfb. Environmentvariable DISPLAY should be defined and point to actual X11 display. Otherwise tests will be failed.

Horizon conftest

Contains fixtures specific for horizon (UI testing).

stepler.horizon.conftest.admin_only(credentials, admin_project_resources)Function fixture to set admin credentials to log in horizon.

Note: It should be used only in test and never in other fixture in order to avoid undefined behavior.

See also:

•any_one()

•user_only()

stepler.horizon.conftest.allocate_floating_ip(floating_ips_steps_ui)Fixture to create floating IP with options.

Can be called several times during test.

Parameters floating_ips_steps_ui (object) – instantiated floating ips steps

Yields function – function to allocate floating IP

stepler.horizon.conftest.any_one(request, credentials, admin_project_resources,user_project_resources)

Session fixture to define user to log in horizon.

Parameters request (object) – pytest request parametrized with values admin and user.

Note: It should be used only in test and never in other fixture in order to avoid undefined behavior.

See also:

82 Chapter 6. Deep to structure

Page 87: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

•admin_only()

•user_only()

stepler.horizon.conftest.api_access_steps_ui(login, horizon)Fixture to get api access steps.

Parameters

• login (None) – should log in horizon before steps using

• horizon (Horizon) – instantiated horizon web application

Returns instantiated UI api access steps

Return type stepler.horizon.steps.ApiAccessSteps

stepler.horizon.conftest.auth_steps(horizon)Function fixture to get auth steps.

Parameters horizon (object) – instantiated horizon web application

Returns instantiated auth steps

Return type stepler.horizon.steps.AuthSteps

stepler.horizon.conftest.container(create_container_ui)Fixture to create container with default options before test.

Parameters

• create_container_ui (function) – function to create container

• options (with) –

Returns dict with container name

Return type AttrDict

stepler.horizon.conftest.containers_steps_ui(login, horizon)Fixture to get containers steps.

Parameters

• login (None) – should log in horizon before steps using

• horizon (Horizon) – instantiated horizon web application

Returns instantiated containers steps

Return type stepler.horizon.steps.ContainersSteps

stepler.horizon.conftest.create_container_ui(containers_steps_ui)Callable fixture to create container with options.

Can be called several times during test.

Parameters containers_steps_ui (obj) – instantiated containers steps

Yields function – function to create container with options

stepler.horizon.conftest.defaults_steps_ui(login, horizon)Fixture to get defaults steps.

Parameters

• login (None) – should log in horizon before steps using

• horizon (Horizon) – instantiated horizon web application

6.7. Horizon 83

Page 88: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Returns instantiated UI defaults steps

Return type stepler.horizon.steps.DefaultsSteps

stepler.horizon.conftest.flavors_steps_ui(flavor_steps, login, horizon)Fixture to get flavors steps.

flavor_steps instance is used for flavors cleanup.

Parameters

• flavor_steps (object) – instantiated flavor steps

• login (None) – should log in horizon before steps using

• horizon (Horizon) – instantiated horizon web application

Returns instantiated flavors steps

Return type stepler.horizon.steps.FlavorsSteps

stepler.horizon.conftest.floating_ip(allocate_floating_ip)Fixture to create floating IP with default options before test.

Parameters allocate_floating_ip (function) – function to allocate floating IP

Returns floating IP

Return type AttrDict

stepler.horizon.conftest.floating_ips_steps_ui(network_setup, login, horizon)Fixture to get floating IPs steps.

Parameters

• network_setup (None) – should set up network before steps using

• login (None) – should log in horizon before steps using

• horizon (Horizon) – instantiated horizon web application

Returns instantiated floating IP steps

Return type stepler.horizon.steps.FloatingIPsSteps

stepler.horizon.conftest.horizon()Function fixture to launch browser and open horizon page.

It launches browser before tests and closes after.

Yields stepler.horizon.app.Horizon – instantiated horizon web application

stepler.horizon.conftest.horizon_autouse(logger, video_capture, admin_project_resources,user_project_resources)

Function fixture to aggregate and execute other fixtures.

It is used as one entry point for fixtures, which would like to be executed as autouse.

stepler.horizon.conftest.horizon_create_security_group(neutron_security_group_steps)Callable function fixture to create security group with options.

Parameters neutron_security_group_steps (object) – instantiated security groupssteps

Returns function to create security group

Return type function

84 Chapter 6. Deep to structure

Page 89: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.horizon.conftest.horizon_image(horizon_images)Fixture to create cirros image with default options.

Parameters horizon_images (list) – list of created images

Returns glance image

Return type object

stepler.horizon.conftest.horizon_images(request, get_glance_steps, uncleanable, creden-tials)

Fixture to create cirros images with default options.

Parameters

• request (object) – py.test’s SubRequest instance

• get_glance_steps (function) – function to get glance steps

• uncleanable (AttrDict) – data structure with skipped resources

• credentials (object) – CredentialsManager instance

Returns images list

Return type list

stepler.horizon.conftest.horizon_security_group(horizon_create_security_group)Function fixture to create security group before test.

Args: horizon_create_security_group (function): function to create security

group with options.

Returns security group

Return type dict

stepler.horizon.conftest.horizon_server(horizon_servers)Function fixture to create server with default options before test.

Parameters horizon_servers (list) – list with one nova server

Returns nova server

Return type object

stepler.horizon.conftest.horizon_server_with_private_image(horizon_servers_with_private_image)Function fixture to create server with default options before test.

Parameters horizon_servers (list) – list with one nova server

Returns nova server

Return type object

stepler.horizon.conftest.horizon_servers(request, cirros_image, security_group,net_subnet_router, flavor_steps, server_steps)

Function fixture to create servers with default options before test.

Parameters

• request (object) – py.test’s SubRequest instance

• cirros_image (object) – cirros image from glance

• security_group (object) – nova security group

6.7. Horizon 85

Page 90: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• net_subnet_router (tuple) – neutron network, subnet, router

• flavor_steps (FlavorSteps) – instantiated flavor steps

• server_steps (ServerSteps) – instantiated server steps

Returns nova servers

Return type list

stepler.horizon.conftest.horizon_servers_with_private_image(request, cir-ros_image_private,security_group,net_subnet_router,flavor_steps,server_steps)

Function fixture to create servers with default options before test.

Parameters

• request (object) – py.test’s SubRequest instance

• cirros_image (object) – cirros image from glance

• security_group (object) – nova security group

• net_subnet_router (tuple) – neutron network, subnet, router

• flavor_steps (FlavorSteps) – instantiated flavor steps

• server_steps (ServerSteps) – instantiated server steps

Returns nova servers

Return type list

stepler.horizon.conftest.host_aggregates_steps_ui(login, horizon)Fixture to get host aggregates steps.

Parameters

• login (None) – should log in horizon before steps using

• horizon (Horizon) – instantiated horizon web application

Returns

instantiated UI host aggregates steps

Return type stepler.horizon.steps.HostAggregatesSteps

stepler.horizon.conftest.images_steps_ui(glance_steps, login, horizon)Fixture to get images steps.

glance_steps instance is used for images cleanup.

Parameters

• glance_steps (GlanceSteps) – instantiated glance steps

• login (None) – should log in horizon before steps using

• horizon (Horizon) – instantiated horizon web application

Returns instantiated UI images steps

Return type stepler.horizon.steps.ImagesSteps

86 Chapter 6. Deep to structure

Page 91: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.horizon.conftest.instances_steps_ui(network_setup, server_steps, login, horizon)Function fixture to get instances steps.

server_steps instance is used for servers cleanup.

Parameters

• network_setup (None) – should set up network before steps using

• server_steps (ServerSteps) – instantiated server steps

• login (None) – should log in horizon before steps using

• horizon (Horizon) – instantiated horizon web application

Returns instantiated instances steps

Return type stepler.horizon.steps.InstancesSteps

stepler.horizon.conftest.keypairs_steps_ui(keypair_steps, login, horizon)Fixture to get keypairs steps.

keypair_steps instance is used for keypairs cleanup.

Parameters

• keypair_steps (object) – instantiated keypair steps

• login (None) – should log in horizon before steps using

• horizon (Horizon) – instantiated horizon web application

Returns instantiated UI keypairs steps

Return type stepler.horizon.steps.KeypairsSteps

stepler.horizon.conftest.logger(report_dir)Fixture to put test log in report.

stepler.horizon.conftest.login(auth_steps, credentials)Function fixture to log in horizon.

Logs in horizon UI before test. Logs out after test.

Parameters auth_steps (AuthSteps) – instantiated auth steps

stepler.horizon.conftest.namespaces_steps_ui(login, horizon)Fixture to get namespaces steps.

Parameters

• login (None) – should log in horizon before steps using

• horizon (Horizon) – instantiated horizon web application

Returns instantiated UI namespaces steps

Return type stepler.horizon.steps.NamespacesSteps

stepler.horizon.conftest.network_setup(credentials, admin_project_resources,user_project_resources, get_network_steps,get_router_steps, get_subnet_steps, uncleanable)

Session fixture to setup network.

For generated user and admin projects it creates internal network, subnet and router and joins them with externalnetwork via router. After tests it deletes created router, network and subnet.

Parameters

6.7. Horizon 87

Page 92: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• credentials (obj) – CredentialsManager instance

• admin_project_resources (AttrDict) – admin project resources

• user_project_resources (AttrDict) – user project resources

• get_network_steps (function) – function to get network steps

• get_router_steps (function) – function to get router steps

• get_subnet_steps (function) – function to get subnet steps

• uncleanable (AttrDict) – data structure with skipped resources

stepler.horizon.conftest.networks_steps_ui(network_setup, network_steps, login, horizon)Functional fixture to get UI networks steps.

network_steps instance is used for networks cleanup.

Parameters

• network_setup (None) – should set up network before steps using

• network_steps (NetworkSteps) – instantiated network steps

• login (None) – should log in horizon before steps using

• horizon (Horizon) – instantiated horizon web application

Returns instantiated UI network steps

Return type NetworkSteps

stepler.horizon.conftest.new_user_login(login, new_user_with_project, auth_steps)Fixture to log in as new user.

Parameters

• login (None) – should log in horizon before steps using

• new_user_with_project (AttrDict) – dict with username, password and projectname

• auth_steps (AuthSteps) – instantiated auth steps

Yields AttrDict – dict with username, password and project name

stepler.horizon.conftest.overview_steps_ui(login, horizon)Fixture to get overview steps.

Parameters

• login (None) – should log in horizon before steps using

• horizon (Horizon) – instantiated horizon web application

Returns instantiated UI overview steps

Return type stepler.horizon.steps.OverviewSteps

stepler.horizon.conftest.project_name_non_ascii(projects_steps_ui, ad-min_project_resources)

Fixture to create project with non ascii name and switch to it.

stepler.horizon.conftest.projects_steps_ui(login, horizon)Fixture to get projects steps.

Parameters

• login (None) – should log in horizon before steps using

88 Chapter 6. Deep to structure

Page 93: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• horizon (Horizon) – instantiated horizon web application

Returns instantiated UI projects steps

Return type stepler.horizon.steps.ProjectsSteps

stepler.horizon.conftest.report_dir(request)Create report directory to put test logs.

stepler.horizon.conftest.routers_steps_ui(network_setup, router_steps, login, horizon)Function fixture to get routers steps.

router_steps instance is used for routers cleanup.

Parameters

• network_setup (None) – should set up network before steps using

• router_steps (RouterSteps) – instantiated router steps

• login (None) – should log in horizon before steps using

• horizon (Horizon) – instantiated horizon web application

Returns instantiated routers steps

Return type RoutersSteps

stepler.horizon.conftest.security_groups_steps_ui(login, horizon)Fixture to get security groups steps.

Parameters

• login (None) – should log in horizon before steps using

• horizon (Horizon) – instantiated horizon web application

stepler.horizon.conftest.settings_steps_ui(login, horizon)Get settings steps.

Parameters

• login (None) – should log in horizon before steps using

• horizon (Horizon) – instantiated horizon web application

Returns instantiated settings steps

Return type stepler.horizon.steps.SettingsSteps

stepler.horizon.conftest.stacks_steps_ui(stack_steps, login, horizon)Functional fixture to get UI stacks steps. :param stack_steps: instantiated stack steps :type stack_steps: Stack-Steps :param login: should log in horizon before steps using :type login: None :param horizon: instantiatedhorizon web application :type horizon: Horizon

Returns instantiated stacks steps

Return type stepler.horizon.steps.StacksSteps

stepler.horizon.conftest.update_defaults(defaults_steps_ui)Callable fixture to update defaults.

Parameters defaults_steps_ui (DefaultsSteps) – instantiated defaults steps

Yields function – function to update defaults

stepler.horizon.conftest.update_settings(settings_steps_ui)Update settings.

6.7. Horizon 89

Page 94: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters settings_steps (SettingsSteps) – instantiated settings steps

Yields function – function to update user settings

stepler.horizon.conftest.user_only(credentials, user_project_resources)Function fixture to set user credentials to log in horizon.

Note: It should be used only in test and never in other fixture in order to avoid undefined behavior.

See also:

•admin_only()

•any_one()

stepler.horizon.conftest.users_steps_ui(login, horizon)Fixture to get users steps.

Parameters

• login (None) – should log in horizon before steps using

• horizon (Horizon) – instantiated horizon web application

Returns instantiated users steps

Return type stepler.horizon.steps.UsersSteps

stepler.horizon.conftest.video_capture(virtual_display, report_dir)Capture video of test.

stepler.horizon.conftest.virtual_display(request)Run test in virtual X server if env var is defined.

stepler.horizon.conftest.volume_types_steps_ui(horizon, login)Get volume types UI steps.

Parameters

• horizon (Horizon) – instantiated horizon web application

• login (None) – should log in horizon before steps using

stepler.horizon.conftest.volumes_steps_ui(volume_steps, snapshot_steps, backup_steps,login, horizon)

Fixture to get volumes steps.

volume_steps instance is used for volumes cleanup. snapshot_steps instance is used for snapshots cleanup.backup_steps instance is used for backups cleanup.

Parameters

• volume_steps (VolumeSteps) – instantiated volume steps

• snapshot_steps (SnapshotSteps) – instantiated snapshot steps

• backup_steps (BackupSteps) – instantiated backup steps

• horizon (Horizon) – instantiated horizon web application

• login (None) – should log in horizon before steps using

90 Chapter 6. Deep to structure

Page 95: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Horizon steps

Contains steps specific for horizon (UI testing).

class stepler.horizon.steps.ApiAccessSteps(app)Api access steps.

download_ec2(check=True)Step to download ec2 file.

download_rc_v2(check=True)Step to download RCv2 file.

download_rc_v2_via_menu(check=True)Step to download RCv2 file via menu.

download_rc_v3(check=True)Step to download RCv3 file.

download_rc_v3_via_menu(check=True)Step to download RCv3 file via menu.

view_credentials(check=True)Step to view credentials.

class stepler.horizon.steps.AuthSteps(app)Authentication steps.

check_alert_present()Step to check alert message is present.

check_login_time()Step to check time authorizing into Horizon.

login(username, password, check=True)Step to log in user account.

Parameters

• username (-) – string, user name.

• password (-) – string, user password.

logout(check=True)Step to log out user account.

class stepler.horizon.steps.ContainersSteps(app)Containers steps.

check_container_name_volume_backups()Step to check that container has name ‘volumebackups’.

check_folder_available_by_public_url(folder_name, public_url)Step to check that folder is available by public URL.

create_container(container_name, public=False, check=True)Step to create container.

create_folder(folder_name, check=True)Step to create folder.

delete_container(container_name, check=True)Step to delete container.

6.7. Horizon 91

Page 96: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

delete_file(file_name, check=True)Step to delete file.

delete_folder(folder_name, check=True)Step to delete folder.

get_container(container_name)Step to enter to container.

get_container_info(container_name)Step to get container info.

get_folder(folder_name)Step to enter to folder.

upload_file(file_path, file_name=None, check=True)Step to upload file.

class stepler.horizon.steps.DefaultsSteps(app)Access & security steps.

get_defaults(defaults)Step to get defaults.

update_defaults(defaults, check=True)Step to update defaults.

class stepler.horizon.steps.FlavorsSteps(app)Flavors steps.

create_flavor(flavor_name=None, cpu_count=1, ram=1024, root_disk=1, check=True)Step to create flavor.

delete_flavor(flavor_name, check=True)Step to delete flavor.

delete_flavors(flavor_names, check=True)Step to delete flavors as batch.

get_metadata(flavor_name)Step to get flavor metadata.

modify_access(flavor_name, project, check=True)Step to modify flavor access.

update_flavor(flavor_name, new_flavor_name=None, check=True)Step to update flavor.

update_metadata(flavor_name, metadata, check=True)Step to update flavor metadata.

class stepler.horizon.steps.FloatingIPsSteps(app)Floating IPs steps.

allocate_floating_ip(check=True)Step to allocate floating IP.

associate_floating_ip(ip, instance_name, check=True)Step to associate floating IP.

release_floating_ip(ip, check=True)Step to release floating IP.

92 Chapter 6. Deep to structure

Page 97: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

class stepler.horizon.steps.HostAggregatesSteps(app)Host aggregates steps.

create_host_aggregate(host_aggregate_name=None, check=True)Step to create host aggregate.

delete_host_aggregate(host_aggregate_name, check=True)Step to delete host_aggregate.

delete_host_aggregates(host_aggregate_names, check=True)Step to delete host aggregates.

class stepler.horizon.steps.ImagesSteps(app)Images steps.

add_metadata(image_name, metadata, check=True)Step to add image metadata.

Parameters

• image_name (str) – image name

• metadata (dict) – image metadata {name: value}

• check (bool) – flag whether to check step or not

Raises

• TimeoutExpired – if image status is not ‘Active’

• AssertionError – if check failed

check_flavors_limited_in_launch_instance_form(image_name, disk_size, ram_size)Step to check flavors are limited in launch instance form.

check_image_info(image_name, expected_description=None, expected_metadata=None)Step to check image detailed info.

This step checks that values of description/metadata in detailed info are correct. For ‘None’ values, thesedata must be missing.

Parameters

• image_name (str) – image name

• expected_description (str|None) – expected image description

• expected_metadata (dict|None) – expected image metadata {name: value} (max= 2 keys)

Raises AssertionError – if real and expected data are different

check_image_present(image_name, timeout=None)Step to check image is present.

check_images_pagination(image_names)Step to check images pagination.

check_non_public_image_not_visible(image_name)Step to check non-public image is not visible for other projects.

Parameters image_name (str) – image name

Raises AssertionError – if image is available in public images list

check_page_is_available(image_name, check=True)Step to check page is available and then close it.

6.7. Horizon 93

Page 98: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters image_name – image name

check_public_image_visible(image_name)Step to check public image is visible.

create_image(image_name, image_description=None, image_url=’http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img’, image_file=None,disk_format=’QCOW2’, min_disk=None, min_ram=None, protected=False,big_image=False, check=True)

Step to create image.

Parameters

• image_name (str) – image name

• image_description (object|None) – image description

• image_url (str) – URL of image location

• image_file (str) – path of image file

• disk_format (str) – disk format

• min_disk (int) – min disk size (in Gb)

• min_ram (int) – min RAM size (in Mb)

• protected (bool) – indicator whether image is protected or not

• big_image (bool) – indicator whether image has big size or not

• check (bool) – flag whether to check step or not

create_volume(image_name, volume_name, check=True)Step to create volume from image.

delete_image(image_name, check=True)Step to delete image.

delete_images(image_names, check=True)Step to delete images.

delete_metadata(image_name, metadata, check=True)Step to delete metadata.

Parameters

• image_name (str) – image name

• metadata (dict) – image metadata {name: value}

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if image status is not ‘Active’

get_metadata(image_name)Step to get image metadata.

launch_instance(image_name, instance_name, network_name, flavor, check=True)Step to launch instance from image.

open_link_in_new_tab(image_name, check=True)Step to open link of image info in new tab.

Parameters image_name (str) – image name

switch_to_new_tab(check=True)Step to switch to new tab.

94 Chapter 6. Deep to structure

Page 99: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

update_image(image_name, new_image_name=None, description=None, min_disk=None,min_ram=None, protected=False, check=True)

Step to update image.

Parameters

• image_name (str) – image name

• new_image_name (str) – new image name

• description (str|None) – image description

• metadata (dict|None) – image metadata {name: value} (max = 2 keys)

• min_disk (int|None) – minimal disk size

• min_ram (int|None) – minimal ram

• protected (bool) – flag whether to set protected or not

• check – flag whether to check step or not

view_image(image_name, check=True)Step to view image.

class stepler.horizon.steps.InstancesSteps(app)Instances steps.

add_security_group(instance_name, security_group_name, check=True)Step to add security group.

admin_delete_instance(instance_name, check=True)Step to delete instance as admin.

admin_delete_instances(instance_names, check=True)Step to delete instances as admin.

admin_filter_instances(query, check=True)Step to filter instances as admin.

admin_reset_instances_filter(check=True)Step to reset instances filter as admin.

check_admin_instances_pagination(instance_names)Step to check instances pagination as admin.

check_admin_instances_pagination_filter(instance_names)Step to check instances pagination with filtering as admin.

check_flavor_absent_in_instance_launch_form(flavor)Step to check flavor is absent in instance launch form.

check_instance_active(instance_name)Step to check instance has active status.

check_instance_pause(instance_name)Step to check that instance was paused.

check_instance_suspend(instance_name)Step to check that instance was suspended.

check_instances_pagination(instance_names)Step to check instances pagination.

check_instances_pagination_filter(instance_names)Step to check instances pagination with filtering.

6.7. Horizon 95

Page 100: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

check_instances_sum(instance_names, min_instances_sum=2)Step to check quantity of instances.

create_instance(instance_name=None, network_name=’internal_net’, count=1, check=True)Step to create instance.

create_instance_snapshot(instance_name, snapshot_name=None, check=True)Step to create instance snapshot.

delete_instance(instance_name, check=True)Step to delete instance.

delete_instances(instance_names, check=True)Step to delete instances.

filter_instances(query, check=True)Step to filter instances.

lock_instance(instance_name, check=True)Step to lock instance.

nova_associate_floating_ip(instance_name, ip, check=True)Step to associate floating IP.

nova_disassociate_floating_ip(instance_name, check=True)Step to disassociate floating IP.

rename_instance(instance_name, new_instance_name=None, check=True)Step to rename instance.

reset_instances_filter(check=True)Step to reset instances filter.

resize_instance(instance_name, flavor=None, check=True)Step to resize instance.

unlock_instance(instance_name, check=True)Step to unlock instance.

view_instance(instance_name, check=True)Step to view instance.

class stepler.horizon.steps.KeypairsSteps(app)Keypairs steps.

check_button_import_key_pair_disabled()Step to check import Key Pair disabled if quota exceeded.

check_keypairs_time()Step to check time opening Keypairs page.

create_keypair(keypair_name=None, check=True)Step to create keypair.

delete_keypair(keypair_name, check=True)Step to delete keypair.

delete_keypairs(keypair_names, check=True)Step to delete keypairs.

import_keypair(keypair_name, public_key, check=True)Step to import keypair.

96 Chapter 6. Deep to structure

Page 101: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

class stepler.horizon.steps.NamespacesSteps(app)Namespaces steps.

create_namespace(namespace_name=None, namespace_source=’Direct Input’, check=True)Step to create namespace.

delete_namespace(namespace_name, check=True)Step to delete namespace.

class stepler.horizon.steps.NetworksSteps(app)networks steps.

add_subnet(network_name, subnet_name=None, network_address=‘10.109.3.0/24’, check=True)Step to add subnet for network.

admin_delete_network(network_name, check=True)Step to delete network as admin.

admin_filter_networks(query, check=True)Step to filter networks.

admin_update_network(network_name, new_network_name=False, shared=False, check=True)Step to update network as admin.

check_network_present(network_name)Step to check network is present.

check_network_share_status(network_name, is_shared=True)Step to check network share status.

check_networks_time()Step to check time opening Networks tab.

create_network(network_name=None, shared=False, create_subnet=False, sub-net_name=’subnet’, network_adress=‘192.168.0.0/24’, gate-way_ip=‘192.168.0.1’, check=True)

Step to create network.

delete_network(network_name, check=True)Step to delete network.

delete_networks(network_names, check=True)Step to delete networks as batch.

network_topology_page_availability(check=True)Step to go to network topology page.

user_try_to_create_shared_network(check=True)Step to check user can’t create shared network.

class stepler.horizon.steps.OverviewSteps(app)Overview steps.

check_resource_item_changed(resource_name, resource_before_creating, check=True)Step to check that quantity of resource were grown.

get_used_resource_overview(resource_name)Step to get used overview resources.

class stepler.horizon.steps.ProjectsSteps(app)Projects steps.

check_project_cant_disable_itself()Step for trying to disable current project.

6.7. Horizon 97

Page 102: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

create_project(project_name=None, check=True)Step to create project.

delete_project(project_name, check=True)Step to delete project.

filter_projects(query, check=True)Step to filter projects.

manage_project_members(project_name, admin_project_resources, check=True)Step to manage project members.

toggle_project(project, enable, check=True)Step to disable/enable project.

update_project_name(project_name, new_project_name, check=True)Step to update project name.

class stepler.horizon.steps.RoutersSteps(app)Routers steps.

check_routers_time()Step to check time opening Routers tab.

create_router(router_name=None, admin_state=None, external_network=None, check=True)Step to create router.

delete_router(router_name, check=True)Step to delete router.

class stepler.horizon.steps.SecurityGroupsSteps(app)Security groups steps.

add_group_rule(group_name, port_number=‘25’, check=True)Step to add rule to the security group.

create_security_group(group_name=None, description=None, check=True)Step to create security group.

delete_group_rule(port_number, check=True)Step to remove rule from the security group.

delete_security_group(group_name, check=True)Step to delete security group.

class stepler.horizon.steps.SettingsSteps(app)Settings steps.

change_user_password(current_password, new_password, check=True)Step to change user password.

check_current_settings(expected_settings)Step to check current settings.

check_dashboard_help_url(help_url)Step to check dashboard help URL.

get_current_settings()Current user settings.

update_settings(lang=None, timezone=None, items_per_page=None, instance_log_length=None,check=True)

Step to update user settings.

98 Chapter 6. Deep to structure

Page 103: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

class stepler.horizon.steps.StacksSteps(app)Stacks steps.

change_stack_template(stack, admin_password, env_data=’\nresource_registry:\nOS::Nova::Server::MyServer: myserver.yaml\n\nparameter_defaults:\nNetworkName: my_network’, template_data=’\nheat_template_version:2013-05-23\n\ndescription: Just an example\n\nparameters:\nkey_name:\n type: string\n default: test\n description: Name of anexisting key pair to use for the instance\n flavor:\n type: string\n descrip-tion: Instance type for the instance to be created\n default: m1.tiny_test\nimage:\n type: string\n default: TestCirros-0.3.5\n description: ID orname of the image to use for the instance\n\nresources:\n my_instance:\ntype: OS::Nova::Server\n properties:\n name: My Cirros Instance\nimage: { get_param: image }\n flavor: { get_param: flavor }\nkey_name: { get_param: key_name }’, template_source=’DirectInput’, env_source=’Direct Input’, new_flavor=’m1.tiny_test’,new_image=’TestCirros-0.3.5’, new_keypair=’test’, check=True)

Step to change stack template.

check_stack(stack, check=True)Step to check stack status.

create_stack(stack_name, admin_password, keypair, template_source=’Direct Input’,env_source=’Direct Input’, flavor=’m1.extra_tiny_test’, image=’TestCirros-0.3.5’,check=True)

Step to create stack.

delete_stack(stack, check=True)Step to delete stack.

delete_stacks(stacks, check=True)Step to delete stacks.

preview_stack(stack_name, template_source=’Direct Input’, env_source=’Direct Input’,check=True)

Step to preview stack.

resume_stack(stack, check=True)Step to resume stack.

suspend_stack(stack, check=True)Step to suspend stack.

view_stack(stack, check=True)Step to view stack.

class stepler.horizon.steps.UsersSteps(app)Users steps.

change_user_password(username, new_password, check=True)Step to change user password.

check_no_users_page_in_menu()Step to check users items is absent in menu.

check_user_cant_disable_itself()Step to try to disable current user.

check_user_enable_status(user_name, is_enabled=True)Step to check user enable status.

6.7. Horizon 99

Page 104: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

check_user_not_deleted(user_name)Step to check user is not deleted.

check_user_present(user_name)Step to check user is present.

create_user(username, password, project, role, check=True)Step to create user.

delete_user(username, check=True)Step to delete user.

delete_users(usernames, check=True)Step to delete users.

filter_users(query, check=True)Step to filter users.

sort_users(reverse=False, check=True)Step to sort users.

toggle_user(username, enable, check=True)Step to disable user.

update_user(username, new_username, check=True)Step to update user.

class stepler.horizon.steps.VolumeTypesSteps(app)Volume types steps.

create_qos_spec(qos_spec_name=None, consumer=None, check=True)Step to create qos spec.

create_volume_type(volume_type_name=None, description=None, check=True)Step to create volume type.

delete_qos_spec(qos_spec_name, check=True)Step to delete qos spec.

delete_volume_type(volume_type_name, check=True)Step to delete volume type.

delete_volume_types(volume_type_names, check=True)Step to delete volume types.

class stepler.horizon.steps.VolumesSteps(app)Volumes steps.

accept_transfer(transfer_id, transfer_key, volume_name, check=True)Step to accept transfer.

attach_instance(volume_name, instance_name, check=True)Step to attach instance.

change_volume_status(volume_name, status=None, check=True)Step to change volume status.

change_volume_type(volume_name, volume_type=None, check=True)Step to change volume type.

check_backup_creation_form_name_field_max_length(volume_name, ex-pected_length)

Step to check max possible length of backup name input.

Parameters

100 Chapter 6. Deep to structure

Page 105: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• volume_name (str) – name of volume to open backup creating form on it

• expected_length (int) – expected max form field length

Raises AssertionError – if actual max length is not equal to expected_length

check_backups_pagination(backup_names)Step to check backups pagination.

check_default_migration_policy(volume_name)Step to check default migration policy.

Parameters volume_name (str) – name of volume to open snapshot create form on it

Raises AssertionError – if default migration policy not equal On Demand

check_snapshot_creation_form_name_field_max_length(volume_name, ex-pected_length)

Step to check max length of snapshot creation form name input.

Parameters

• volume_name (str) – name of volume to open snapshot create form on it

• expected_length (int) – expected max form field length

Raises AssertionError – if actual max length is not equal to expected_length

check_snapshots_pagination(snapshot_names)Step to check snapshots pagination.

check_volume_present(volume_name, timeout=None)Check volume is present.

check_volume_present_in_admin_volume(volume_name)Step to check that volume present in table admin volumes.”” :param volume_name: name of expectedvolume :type volume_name: str

Raise: AssertionError: volume_name is not present in list of names

check_volumes_pagination(volume_names)Step to check volumes pagination.

create_backup(volume_name, backup_name=None, description=None, container=None,check=True)

Step to create volume backup.

create_snapshot(volume_name, snapshot_name=None, description=None, check=True)Step to create volume snapshot.

create_transfer(volume_name, transfer_name, check=True)Step to create transfer.

create_volume(volume_name=None, source_type=’Image’, source_name=None, vol-ume_type=None, volume_size=None, description=None, check=True)

Step to create volume.

Parameters

• volume_name (str) – name of volume

• source_type (str) – type of source. Should be one of “Image” or “Volume”

• source_name (str) – name of source (image or volume) to create volume from it

• volume_type (str) – type of volume

6.7. Horizon 101

Page 106: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• volume_size (int) – Size of volume in GB

• description (str) – description of volume

• check (bool) – flag whether to check step or not

Returns name of created volume

Return type str

Raises AssertionError – if check failed

create_volume_from_snapshot(snapshot_name, check=True)Step to create volume from snapshot.

delete_backups(backup_names, check=True)Step to delete volume backups.

delete_snapshot(snapshot_name, check=True)Step to delete volume snapshot.

delete_snapshots(snapshot_names, check=True)Step to delete volume snapshots.

delete_volume(volume_name, check=True)Step to delete volume.

delete_volumes(volume_names, check=True)Step to delete volumes.

detach_instance(volume_name, instance_name, check=True)Step to detach instance.

edit_volume(volume_name, new_volume_name, check=True)Step to edit volume.

extend_volume(volume_name, new_size=2, check=True)Step to extend volume size.

launch_volume_as_instance(volume_name, instance_name, network_name, count=1,check=True)

Step to launch volume as instance.

migrate_volume(volume_name, new_host=None, check=True)Step to migrate host.

update_snapshot(snapshot_name, new_snapshot_name, description=None, check=True)Step to update volume snapshot.

upload_volume_to_image(volume_name, image_name, check=True)Step to upload volume to image.

view_volume(volume_name, check=True)Step to view volume.

Horizon tests

Auth tests

stepler.horizon.tests.test_auth.test_login(credentials, auth_steps)Scenario: Verify that one can login and logout.

Steps:

102 Chapter 6. Deep to structure

Page 107: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Login to horizon

2.Switch to user project

3.Logout

Container tests

class stepler.horizon.tests.test_containers.TestAnyOneTests for any one.

test_available_public_container_url(create_container_ui, containers_steps_ui)Scenario: Verify that public container url is available.

Steps:

1.Create public container using UI

2.Create folder using UI

3.Check folder is available by public url

4.Delete folder

Teardown:

1.Delete container using UI

test_create_public_container(create_container_ui)Scenario: Verify that one can create public container.

Steps:

1.Create public container using UI

Teardown:

1.Delete container using UI

test_upload_file_to_container(container, containers_steps_ui)Scenario: Verify that one can upload file to container.

Setup:

1.Create container using UI

Steps:

1.Upload file to container

2.Delete file from container

Teardown:

1.Delete container using UI

test_upload_file_to_folder(container, containers_steps_ui)Scenario: Verify that one can upload file to folder.

Setup:

1.Create container using UI

Steps:

1.Create folder using UI

2.Upload file to folder

6.7. Horizon 103

Page 108: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

3.Delete file from folder

4.Delete folder

Teardown:

1.Delete container using UI

Credentials tests

class stepler.horizon.tests.test_credentials.TestAdminOnlyTests for admin only.

test_download_rc_v2_non_ascii_project_name(project_name_non_ascii,api_access_steps_ui)

Scenario: Verify that RCv2 is correct with non-ASCII project name.

Setup:

1.Create project with non-ASCII name

2.Switch to project with non-ASCII name

Steps:

1.Download RCv2 file using UI

Teardown:

1.Delete project with non-ASCII name

class stepler.horizon.tests.test_credentials.TestAnyOneTests for any one.

test_download_ec2(api_access_steps_ui)Scenario: Verify that user can download EC2 credentials.

Steps:

1.Download ec2 file using UI

test_download_rc_v2(api_access_steps_ui)Scenario: Verify that user can download RCv2.

Steps:

1.Download RCv2 file using UI

test_download_rc_v2_via_menu(api_access_steps_ui)Scenario: Verify that user can download RCv2 via menu.

Steps:

1.Download RCv2 file via menu using UI

test_download_rc_v3(api_access_steps_ui)Scenario: Verify that user can download RCv3.

Steps:

1.Download RCv3 file using UI

test_download_rc_v3_via_menu(api_access_steps_ui)Scenario: Verify that user can download RCv3 via menu.

Steps:

104 Chapter 6. Deep to structure

Page 109: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Download RCv3 file via menu using UI

test_view_credentials(api_access_steps_ui)Scenario: Verify that user can view credentials.

Steps:

1.View credentials using UI

Quota tests

class stepler.horizon.tests.test_defaults.TestAdminOnlyTests for admin only.

test_update_defaults(update_defaults)Scenario: Verify that admin can update default quotas.

Steps:

1.Update volumes parameter using UI

Teardown:

1.Restore original value for volumes parameter

Flavor tests

class stepler.horizon.tests.test_flavors.TestAdminOnlyTests for admin only.

test_create_delete_flavor(flavors_steps_ui)Scenario: Verify that admin can create and delete flavor.

Steps:

1.Create flavor using UI

2.Delete flavor using UI

test_delete_flavors(flavors, flavors_steps_ui)Scenario: Verify that admin can delete flavors as bunch.

Setup:

1.Create flavors using API

Steps:

1.Delete flavors as bunch using UI

test_flavor_update_metadata(flavor, flavors_steps_ui)Scenario: Verify that admin can update flavor metadata.

Setup:

1.Create flavor using API

Steps:

1.Update flavor metadata using UI

Teardown:

1.Delete flavor using API

6.7. Horizon 105

Page 110: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

test_modify_flavor_access(flavor, auth_steps, flavors_steps_ui, instances_steps_ui)Scenario: Verify that admin can modify flavor access.

Setup:

1.Create flavor using API

Steps:

1.Change flavor access using UI

2.Logout

3.Login with user credentials

4.Check flavor is absent in instance launch form

5.Logout

6.Login with admin credentials

Teardown:

1.Delete flavor using API

test_update_flavor(flavor, flavors_steps_ui)Scenario: Verify that admin cat update flavor.

Setup:

1.Create flavor using API

Steps:

1.Update flavor name using UI

Teardown:

1.Delete flavor using API

Floating IP tests

class stepler.horizon.tests.test_floatingips.TestAnyOneTests for anyone.

test_floating_ip_associate(horizon_server, floating_ip, floating_ips_steps_ui)Scenario: Verify that user can associate floating IP.

Setup:

1.Create floating IP using API

2.Create server using API

Steps:

1.Associate floating IP to server using UI

Teardown:

1.Delete floating IP using API

2.Delete server using API

106 Chapter 6. Deep to structure

Page 111: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Host aggregate tests

class stepler.horizon.tests.test_host_aggregates.TestAdminOnlyTests for admin only.

test_create_delete_host_aggregate(host_aggregates_steps_ui)Scenario: Admin can create and delete host aggregate.

Steps:

1.Create host aggregate using UI

2.Delete host aggregate using UI

Image tests

class stepler.horizon.tests.test_images.TestAnyOneTests for any one.

test_add_delete_image_metadata(horizon_image, images_steps_ui)Scenario: Check addition and deletion of image metadata.

Setup:

1.Create image using API

Steps:

1.Check that no metadata in Custom properties

2.Add metadata using UI

3.Check that metadata appeared in Custom properties and values are correct

4.Delete metadata using UI

5.Check that metadata disappeared in Custom properties

Teardown:

1.Delete image using API

test_create_volume_from_image(horizon_image, images_steps_ui, volumes_steps_ui)Scenario: Verify that user can create volume from image.

Setup:

1.Create image using API

Steps:

1.Create volume from image using UI

2.Check that volume is present

3.Delete volume using UI

Teardown:

1.Delete image using API

test_delete_images(horizon_images, images_steps_ui)Scenario: Verify that user can delete images as bunch.

Setup:

1.Create images using API

6.7. Horizon 107

Page 112: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Steps:

1.Delete images as bunch using UI

test_edit_image(horizon_image, images_steps_ui)Scenario: Verify that user can edit image.

Setup:

1.Create image using API

Steps:

1.Edit image name using UI

Teardown:

1.Delete image using API

test_edit_image_description(horizon_image, images_steps_ui)Scenario: Check addition of image description.

Setup:

1.Create image using API

Steps:

1.Click on image and check that description is missing

2.Edit image by adding description using UI

3.Click on image and check description in detailed info

Teardown:

1.Delete image using API

test_edit_image_disk_and_ram(horizon_image, images_steps_ui)Scenario: Check edition of minimum disk and RAM.

Setup:

1.Create image using API

Steps:

1.Edit image and set Minimum Disk = 60Gb and Minimum RAM = 0

2.Try to launch instance

3.Check that all flavors with disk < 60Gb are unavailable

4.Edit image and set Minimum Disk = 0Gb and Minimum RAM = 4096Mb

5.Try to launch instance

6.Check that all flavors with ram < 4096Mb are unavailable

Teardown:

1.Delete image using API

test_images_pagination(glance_steps, horizon_images, update_settings, images_steps_ui)Scenario: Verify images pagination works right and back.

Setup:

1.Create images using API

108 Chapter 6. Deep to structure

Page 113: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Steps:

1.Update items_per_page parameter to 1 using UI

2.Check images pagination using UI

Teardown:

1.Delete images using API

test_launch_instance_from_image(horizon_image, images_steps_ui, instances_steps_ui)Scenario: Verify that user can launch instance from image.

Setup:

1.Create image using API

Steps:

1.Launch instance from image using UI

2.Check that instance is present

3.Delete instance using UI

Teardown:

1.Delete image using API

test_open_image_info_in_new_tab(horizon_image, images_steps_ui)Scenario: Check opening image info in new tab works.

Setup:

1.Create image using API

Steps:

1.Open image info link in new tab

2.Switch to the new tab with info

3.Check this page exists and is available

Teardown:

1.Delete image using API

test_public_image_visibility(images_steps_ui)Scenario: Verify that public image is visible for other users.

Steps:

1.Check that public image is visible for different users using UI

test_remove_protected_image(horizon_image, images_steps_ui)Scenario: Verify that user can’t delete protected image.

Setup:

1.Create image using API

Steps:

1.Make image protected using UI

2.Try to delete image using UI

3.Close error notification

6.7. Horizon 109

Page 114: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

4.Check that image is present

5.Make image public using UI

Teardown:

1.Delete image using API

test_set_image_disk_and_ram_size(images_steps_ui)Scenario: Image limits has influence on flavor choice.

Steps:

1.Create image with min disk and min ram using UI

2.Check that image limits has influence on flavor choice using UI

Teardown:

1.Delete image using API

test_update_image_metadata(horizon_image, images_steps_ui)Scenario: Verify that user can update image metadata.

Setup:

1.Create image using API

Steps:

1.Update image metadata using UI

2.Check metadata has been updated

Teardown:

1.Delete image using API

test_view_image(horizon_image, images_steps_ui)Scenario: Verify that user can view image info.

Setup:

1.Create image using API

Steps:

1.View image using UI

Teardown:

1.Delete image using API

class stepler.horizon.tests.test_images.TestUserOnlyTests for user only.

test_big_image_create_delete(images_steps_ui)Scenario: Check big image creation and deletion from file.

Steps:

1.Create file 100Gb

2.Create image from this file using UI

Teardown:

1.Delete big file

2.Delete image using API

110 Chapter 6. Deep to structure

Page 115: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

test_image_privacy(glance_steps, images_steps_ui)Scenario: Non public image is not visible for other users.

Setup:

1.Login as user to another project

Steps:

1.Create image with public=False as admin using API

2.Check that image is not available as public image using UI

Teardown:

1.Delete image using API

Instance tests

class stepler.horizon.tests.test_instances.TestAdminOnlyTests for admin only.

test_admin_delete_instance(horizon_server, instances_steps_ui)Scenario: Verify that user can delete instance as admin.

Setup:

1.Create server using API

Steps:

1.Delete server using UI as admin

test_admin_delete_instances(horizon_servers, instances_steps_ui)Scenario: Verify that user can delete instances as bunch as admin.

Setup:

1.Create 3 servers using API

Steps:

1.Delete servers as bunch using UI as admin

test_admin_filter_instances(horizon_servers, instances_steps_ui)Scenario: Verify that user can filter instances as admin.

Setup:

1.Create two servers using API

Steps:

1.Filter servers using UI as admin

2.Reset filter using UI as admin

Teardown:

1.Delete two servers using API

test_admin_instances_pagination(server_steps, horizon_servers, update_settings, in-stances_steps_ui)

Scenario: Verify that instances pagination work for admin.

Setup:

6.7. Horizon 111

Page 116: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Create 3 servers using API

Steps:

1.Check sum of instances

2.Update items_per_page parameter to 1 using UI as admin

3.Check instances pagination using UI as admin

Teardown:

1.Delete 3 servers using API

test_admin_instances_pagination_filter(server_steps, horizon_servers, update_settings,instances_steps_ui)

Scenario: Verify that instances pagination work with filter for admin.

Setup:

1.Create 3 servers using API

Steps:

1.Update items_per_page parameter to 1 using UI as admin

2.Check instances pagination with filtering using UI as admin

Teardown:

1.Delete 3 servers using API

test_delete_instances(horizon_servers, instances_steps_ui)Scenario: Verify that user can delete instances as bunch.

Setup:

1.Create servers using API

Steps:

1.Delete servers as bunch using UI

test_edit_instance_name(horizon_server, instances_steps_ui)Scenario: Verify that user can edit instance name.

Setup:

1.Create server using API

Steps:

1.Rename instance

Teardown:

1.Delete server using API

test_edit_instance_security_group(horizon_security_group, horizon_server, in-stances_steps_ui)

Scenario: Verify that user can edit instance security group.

Setup:

1.Create server using API

Steps:

1.Add security group to instance

112 Chapter 6. Deep to structure

Page 117: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Teardown:

1.Delete server using API

test_launch_instances_together(instances_steps_ui, update_defaults)Scenario: Verify that user can create 20 instances together.

Steps:

1.Set quotas to be able to run 50 servers

2.Launch 5 servers at the same time

3.Delete 5 servers as bunch

Teardown:

1.Restore original value for instances parameter

test_nova_associate_ip(horizon_server, floating_ip, instances_steps_ui)Scenario: Verify associate/disassociate ip to instance.

Setup:

1.Create server using API

2.Create floating IP using API

Steps:

1.Associate floating ip to instance

2.Disassociate floating ip from instance

Teardown:

1.Delete server using API

2.Delete floating IP using API

test_pause_instance(instances_steps_ui, server)Scenario: Verify that instance was paused.

Setup:

1.Create server using API

Steps:

1.Check instance pause

test_suspend_instance(instances_steps_ui, server)Scenario: Verify that instance was suspended.

Setup:

1.Create server using API

Steps:

1.Check instance suspend

class stepler.horizon.tests.test_instances.TestAnyOneTests for anyone.

test_create_instance(instances_steps_ui)Scenario: Verify that user can create and delete instance.

Steps:

6.7. Horizon 113

Page 118: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Create server using UI

2.Delete server using UI

test_create_instance_snapshot(horizon_server, instances_steps_ui, images_steps_ui)Scenario: Verify that user can create instance snapshot.

Setup:

1.Create server using API

Steps:

1.Create snapshot

2.Check that snapshot created

3.Delete snapshot

Teardown:

1.Delete server using API

test_filter_instances(horizon_servers, instances_steps_ui)Scenario: Verify that user can filter instances.

Setup:

1.Create servers using API

Steps:

1.Filter servers using UI

2.Reset filter using UI

Teardown:

1.Delete servers using API

test_instances_pagination(server_steps, horizon_servers, update_settings, in-stances_steps_ui)

Scenario: Verify that instances pagination works.

Setup:

1.Create 3 servers using API

Steps:

1.Check sum of instances

2.Update items_per_page parameter to 1 using UI

3.Check instances pagination using UI

Teardown:

1.Delete 3 servers using API

test_instances_pagination_filter(server_steps, horizon_servers, update_settings, in-stances_steps_ui)

Scenario: Verify that instances pagination work with filter.

Setup:

1.Create 3 servers using API

Steps:

114 Chapter 6. Deep to structure

Page 119: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Update items_per_page parameter to 1 using UI

2.Check instances pagination with filtering using UI

Teardown:

1.Delete 3 servers using API

test_lock_instance(horizon_server, instances_steps_ui)Scenario: Verify that user can lock instance.

Setup:

1.Create server using API

Steps:

1.Lock server using UI

2.Unlock server using UI

Teardown:

1.Delete server using API

test_resize_instance(horizon_server, instances_steps_ui)Scenario: Verify that user can resize instance.

Setup:

1.Create server using API

Steps:

1.Resize instance

Teardown:

1.Delete server using API

test_view_instance(horizon_server, instances_steps_ui)Scenario: Verify that user can view instance details.

Setup:

1.Create server using API

Steps:

1.View server using UI

Teardown:

1.Delete server using API

class stepler.horizon.tests.test_instances.TestUserOnlyTests for user only.

test_delete_instances(horizon_servers_with_private_image, instances_steps_ui)Scenario: Verify that user can delete instances as bunch.

Setup:

1.Create servers using API

Steps:

1.Delete servers as bunch using UI

6.7. Horizon 115

Page 120: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

test_edit_instance_name(horizon_server_with_private_image, instances_steps_ui)Scenario: Verify that user can edit instance name.

Setup:

1.Create server using API

Steps:

1.Rename instance

Teardown:

1.Delete server using API

test_edit_instance_security_group(horizon_security_group, hori-zon_server_with_private_image, instances_steps_ui)

Scenario: Verify that user can edit instance security group.

Setup:

1.Create server using API

Steps:

1.Add security group to instance

Teardown:

1.Delete server using API

test_nova_associate_ip(horizon_server_with_private_image, floating_ip, instances_steps_ui)Scenario: Verify associate/disassociate ip to instance.

Setup:

1.Create server using API

2.Create floating IP using API

Steps:

1.Associate floating ip to instance

2.Disassociate floating ip from instance

Teardown:

1.Delete server using API

2.Delete floating IP using API

Keypair tests

class stepler.horizon.tests.test_keypairs.TestAdminOnlyTests for admin only.

test_import_key_pair_quota_exceeded(keypair, update_defaults, keypairs_steps_ui)Scenario: Verify button import Key Pair is disabled if quota exceeded.

Setup:

1.Create key pair using API

Steps:

1.Set key pairs quota to 1

116 Chapter 6. Deep to structure

Page 121: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Check that button import Key Pair is disabled

Teardown:

1.Delete key pair using API

class stepler.horizon.tests.test_keypairs.TestAnyOneTests for any user.

test_create_keypair(keypairs_steps_ui)Scenario: Verify that user can create keypair.

Steps:

1.Create keypair using UI

2.Delete keypair using UI

test_import_keypair(keypairs_steps_ui)Scenario: Verify that user can import keypair.

Steps:

1.Import keypair using UI

Teardown:

1.Delete keypair using API

Metadata definitions tests

class stepler.horizon.tests.test_metadata_definitions.TestAdminOnlyTests for admin only.

test_create_namespace(namespaces_steps_ui)Scenario: Verify that user can create namespace.

Steps:

1.Create namespace using UI

2.Delete namespace using UI

Network tests

class stepler.horizon.tests.test_networks.TestAdminOnlyTests for admin only.

test_create_shared_network(networks_steps_ui)Scenario: Verify that admin can create shared network.

Steps:

1.Create shared network using UI

2.Delete network using UI

class stepler.horizon.tests.test_networks.TestAnyOneTests for any user.

test_network_topology_page_exists(networks_steps_ui)Scenario: Verify that page Network Topology exists.

Steps:

6.7. Horizon 117

Page 122: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Open Network Topology page

test_subnet_add(network, networks_steps_ui)Scenario: Verify that user can add subnet.

Setup:

1.Create network using API

Steps:

1.Add subnet to network using UI

Teardown:

1.Delete subnet using API

2.Delete network using API

class stepler.horizon.tests.test_networks.TestUserOnlyTests for demo only.

test_not_create_shared_network(networks_steps_ui)Scenario: Verify that user can not create shared network.

Steps:

1.Check that user can’t make network shared

Project tests

class stepler.horizon.tests.test_projects.TestAdminOnlyTests for admin only.

test_create_project(projects_steps_ui)Scenario: Verify that admin can create project.

Steps:

1.Create project using UI

2.Delete project using UI

test_disable_enable_project(project, projects_steps_ui)Scenario: Disable and enable created project.

Setup:

1.Create project with API

Steps:

1.Disable created project with UI

2.Enable it using UI

Teardown:

1.Delete project via API

test_manage_project_members(project, admin_project_resources, projects_steps_ui)Scenario: Check we can manage project members.

Setup:

1.Create project with API

118 Chapter 6. Deep to structure

Page 123: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Steps:

1.Manage project members using UI

Teardown:

1.Delete project with UI

test_switch_projects(admin_project_resources, project, projects_steps_ui, overview_steps_ui,security_groups_steps_ui)

Scenario: Check resources in different projects.

Setup:

1.Create project with API

Steps:

1.Check overview of base project before creating resource

2.Create security group for base project using UI

3.Check that quantity of resource for base project has been grown

4.Manage project members using UI

5.Switch on created project

6.Check overview before creating resource

7.Create security group using UI

8.Check that quantity of resource has been grown

Teardown:

1.Delete project via API

test_try_to_disable_current_project(projects_steps_ui)Scenario: Verify that project can’t disable itself.

Steps:

1.Try to disable current project

test_update_project_name(project, projects_steps_ui)Scenario: Check that project can be deleted after update name.

Setup:

1.Create project with API

Steps:

1.Update project name

Teardown:

1.Delete project via API

Router tests

class stepler.horizon.tests.test_router.TestAnyOneTests for any user.

6.7. Horizon 119

Page 124: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

test_create_delete_router(routers_steps_ui)Scenario: Verify that user can create and delete router.

Steps:

1.Create router using UI

2.Delete router using UI

Security group tests

class stepler.horizon.tests.test_security_groups.TestAnyOneTests for any user.

test_add_delete_rule(security_groups_steps_ui, security_group)Scenario: Verify that user can manage rules for security group.

Setup:

1.Create security group using API

Steps:

1.Add rule using UI

2.Delete rule using UI

Teardown:

1.Remove security group using API

test_create_delete_security_group(security_groups_steps_ui)Scenario: Verify that user can create and delete security group.

Steps:

1.Create security group using UI

2.Delete security group using UI

User settings tests

class stepler.horizon.tests.test_user_settings.TestAdminOnlyTests for admin only.

test_change_own_password(new_user_login, auth_steps, settings_steps_ui)Scenario: Verify that user can change it’s password.

Setup:

1.Create user using API

2.Login as new user

Steps:

1.Change user password using UI

2.Try to login using old password

3.Check that alert is present

4.Login using new password

Teardown:

120 Chapter 6. Deep to structure

Page 125: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Delete user using API

test_change_own_settings(new_user_login, update_settings, settings_steps_ui)Scenario: Verify that user can change his settings.

Setup:

1.Create user using API

2.Login as new user

Steps:

1.Update user settings using UI

2.Refresh page

3.Check that settings have been updated using UI

Teardown:

1.Restore initial values for settings

2.Delete user using API

test_dashboard_help_url(new_user_login, settings_steps_ui)Scenario: Verify that user can open dashboard help url.

Setup:

1.Create user using API

2.Login as new user

Steps:

1.Check dashboard help url using UI

Teardown:

1.Delete user using API

Users tests

class stepler.horizon.tests.test_users.TestAdminOnlyTests for admin only.

test_change_user_password(new_user_with_project, users_steps_ui, auth_steps)Scenario: Verify that admin can change user password.

Setup:

1.Create user using API

Steps:

1.Change user password using UI

2.Logout

3.Login with user credentials

4.Logout

5.Login with admin credentials

Teardown:

6.7. Horizon 121

Page 126: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Delete user using API

test_create_user(users_steps_ui)Scenario: Verify that admin can create and delete user.

Steps:

1.Create user using UI

2.Delete user using UI

test_delete_users(users, users_steps_ui)Scenario: Verify that admin can delete users as bunch.

Setup:

1.Create users using API

Steps:

1.Delete users as bunch using UI

test_disable_enable_user(user, users_steps_ui)Scenario: Verify that admin can enable and disable user.

Setup:

1.Create user using API

Steps:

1.Disable user using UI

2.Enable user using UI

Teardown:

1.Delete user using API

test_filter_users(users_steps_ui)Scenario: Verify that admin can filter users.

Steps:

1.Filter users using UI

test_impossible_delete_admin_via_button(users_steps_ui)Scenario: Verify that admin can’t delete himself.

Steps:

1.Try to delete admin user using UI

2.Close error notification

3.Check that admin user is present

test_impossible_delete_admin_via_dropdown(users_steps_ui)Scenario: Admin can’t be deleted with dropdown menu.

Steps:

1.Try to delete admin user from dropdown menu using UI

test_impossible_disable_admin(users_steps_ui)Scenario: Verify that admin can’t disable himself.

Steps:

122 Chapter 6. Deep to structure

Page 127: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Try to disable admin user using UI

2.Check that user is enabled

test_sort_users(users_steps_ui)Scenario: Verify that admin can sort users.

Steps:

1.Sort users using UI

2.Refresh page

3.Sort users in reversed order using UI

test_try_to_disable_current_user(users_steps_ui)Scenario: Verify that user can’t disable himself.

Steps:

1.Try to disable current user

test_update_user(user, users_steps_ui)Scenario: Verify that admin can update user.

Setup:

1.Create user using API

Steps:

1.Update user name using UI

Teardown:

1.Delete user using API

class stepler.horizon.tests.test_users.TestUserOnlyTests for demo user only.

test_unavailable_users_list_for_unprivileged_user(users_steps_ui)Scenario: Verify that demo user can’t see users list.

Steps:

1.Check that users page is absent for demo user

Volume backup tests

class stepler.horizon.tests.test_volume_backups.TestAnyOneTests for any user.

test_create_volume_backup(volume, volumes_steps_ui)Scenario: Create volume backup.

Setup:

1.Create volume using API

Steps:

1.Create backup using UI

Teardown:

1.Delete backup using API

6.7. Horizon 123

Page 128: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Delete volume using API

test_create_volume_backup_with_description(volume, volumes_steps_ui)Scenario: Create volume backup with description.

Setup:

1.Create volume using API

Steps:

1.Create backup with description

Teardown:

1.Delete backup using API

2.Delete volume using API

test_create_volume_backup_with_max_length_description(volume, vol-umes_steps_ui)

Scenario: Create volume backup with description length == max.

Setup:

1.Create volume using API

Steps:

1.Create backup with long (255 symbols) description using UI

Teardown:

1.Delete backup using API

2.Delete volume using API

test_delete_volume_backups(volume_backups, volumes_steps_ui)Scenario: Delete volume backups as bunch.

Setup:

1.Create volume using API

2.Create backups using API

Steps:

1.Delete backups as bunch using UI

Teardown:

1.Delete volume using API

test_volume_backup_form_max_name_length(volume, volumes_steps_ui)Scenario: Create volume backup with name length > 255.

Setup:

1.Create volume using API

Steps:

1.Open backup creation form using UI

2.Check that backup name input can’t contains more than 255 symbols

Teardown:

1.Delete volume using API

124 Chapter 6. Deep to structure

Page 129: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

test_volume_backups_pagination(backup_steps, volume_backups, update_settings, vol-umes_steps_ui)

Scenario: Verify that volume backups pagination works.

Setup:

1.Create volume using API

2.Create some backups using API

Steps:

1.Update items_per_page parameter to 1 using UI

2.Check backups pagination using UI

Teardown:

1.Delete backups using API

2.Delete volumes using API

Volume snapshot tests

class stepler.horizon.tests.test_volume_snapshots.TestAnyOneTests for any user.

test_create_volume_from_snapshot(volume_snapshot, volumes_steps_ui)Scenario:** Verify that user can create volume from snapshot.

Setup:

1.Create volume using API

2.Create snapshot using API

Steps:

1.Create volume from snapshot using UI

2.Delete created volume using UI

Teardown:

1.Delete snapshot using API

2.Delete volume using API

test_create_volume_snapshot(volume, volumes_steps_ui)Scenario: Create volume snapshot.

Setup:

1.Create volume using API

Steps:

1.Create snapshot using UI

Teardown:

1.Delete snapshot using API

2.Delete volume using API

6.7. Horizon 125

Page 130: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

test_create_volume_snapshot_with_description(volume, volumes_steps_ui)Scenario: Create volume snapshot with description.

Setup:

1.Create volume using API

Steps:

1.Create volume snapshot with description using UI

Teardown:

1.Delete snapshot using API

2.Delete volume using API

test_create_volume_snapshot_with_long_name(volume, volumes_steps_ui)Scenario: Create volume snapshot with name length > 255.

Setup:

1.Create volume using API

Steps:

1.Check that snapshot’s name on snapshot’s creation form can contain max 255 symbols

Teardown:

1.Delete snapshot using API

2.Delete volume using API

test_create_volume_snapshot_with_max_length_description(volume, vol-umes_steps_ui)

Scenario: Create volume snapshot with description length == max.

Setup:

1.Create volume using API

Steps:

1.Create snapshot with long (255 symbols) description using UI

Teardown:

1.Delete snapshot using API

2.Delete volume using API

test_delete_volume_snapshot(volume_snapshot, volumes_steps_ui)Scenario: Create volume snapshot.

Setup:

1.Create volume using API

2.Create snapshot using API

Steps:

1.Delete snapshot using UI

Teardown:

1.Delete volume using API

126 Chapter 6. Deep to structure

Page 131: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

test_edit_volume_snapshot(volume_snapshot, volumes_steps_ui)Scenario:** Verify that user can edit volume snapshot.

Setup:

1.Create volume using API

2.Create snapshot using API

Steps:

1.Edit snapshot name using UI

Teardown:

1.Delete snapshot using API

2.Delete volume using API

test_volume_snapshots_pagination(snapshot_steps, volume_snapshots, update_settings,volumes_steps_ui)

Scenario:** Verify that snapshots pagination works right and back.

Setup:

1.Create volume using API

2.Create some snapshots using API

Steps:

1.Update items_per_page parameter to 1 using UI

2.Check snapshots pagination using UI

Teardown:

1.Delete snapshots using API

2.Delete volume using API

Volume type tests

class stepler.horizon.tests.test_volume_types.TestAdminOnlyVolume type tests are available for admin only.

test_qos_spec_create(volume_types_steps_ui)Verify that QoS Spec can be created and deleted.

Steps:

1.Create QoS Spec using UI

2.Delete QoS Spec using UI

test_volume_type_create(volume_types_steps_ui)Verify that volume type can be created and deleted.

Steps:

1.Create volume type using UI

2.Delete volume type using UI

6.7. Horizon 127

Page 132: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Volume tests

class stepler.horizon.tests.test_volumes.TestAdminOnlyTests for admin only.

test_change_volume_status(volume, volumes_steps_ui)Scenario: Verify that admin can change volume status.

Setup:

1.Create volume using API

Steps:

1.Change volume status to Error using UI

2.Change volume status to Available using UI

Teardown:

1.Delete volume using API

test_change_volume_type(volume_type, volume, volumes_steps_ui)Scenario: Verify that user can change volume type.

Setup:

1.Create volume using API

2.Create volume type using API

Steps:

1.Change volume type using UI

Teardown:

1.Delete volume using API

2.Delete volume type using API

test_container_name_volume_backup(volume, containers_steps_ui, volumes_steps_ui)Scenario: Verify that container has name ‘volumebackups’.

Setup:

1.Create volume using API

Steps:

1.Create volume backup without container name

2.Check that container has name ‘volumebackups’

Teardown:

1.Delete volume using API

test_launch_volume_as_instance(bootable_volume, instances_steps_ui, volumes_steps_ui)Scenario: Verify that admin can launch volume as instance.

Setup:

1.Create bootable volume using API

Steps:

1.Launch volume as instance using UI

128 Chapter 6. Deep to structure

Page 133: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Change that instance status is Active using UI

3.Delete instance using UI

Teardown:

1.Delete volume using API

test_manage_volume_attachments(volume, server, volumes_steps_ui)Scenario: Verify that admin can manage volume attachments.

Setup:

1.Create volume using API

2.Create server using API

Steps:

1.Attach server to volume using UI

2.Detach server from volume using UI

Teardown:

1.Delete server using API

2.Delete volume using API

test_migrate_volume(volume, volumes_steps_ui)Scenario: Verify that admin can migrate volume.

Setup:

1.Create volume using API

Steps:

1.Migrate volume to new host using UI

2.Migrate volume to old host using UI

Teardown:

1.Delete volume using API

test_transfer_volume(volume, auth_steps, volumes_steps_ui)Scenario: Verify that volume can be transferred between users.

Setup:

1.Create volume using API

Steps:

1.Create volume transfer as admin user using UI

2.Logout

3.Login as user user

4.Accept volume transfer using UI

Teardown:

1.Delete volume using API

test_volume_present_in_admin_volumes(volumes_steps_ui, volume)Scenario: Verify that volume present in admin volumes.

6.7. Horizon 129

Page 134: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Setup:

1.Create volume using API

Steps:

1.Check that volume present in admin volumes

Teardown:

1.Delete volume using API

class stepler.horizon.tests.test_volumes.TestAnyOneTests for any user.

test_create_bigger_volume_from_volume(volume, volumes_steps_ui)Scenario: Create bigger volume from another volume.

Setup:

1.Create volume using API

Steps:

1.Create volume from created volume with bigger size using UI

2.Check that volume is created

Teardown:

1.Delete volumes

test_create_volume_with_description(volumes_steps_ui)Scenario: Create volume with description.

Steps:

1.Create volume with description using UI

2.Check that volume created

3.Check that description is correct

Teardown:

1.Delete volume using API

test_create_volume_with_escaped_symbols(volumes_steps_ui)Scenario: Create volume and snapshot with escaped symbols.

Steps:

1.Create volume with specific name using UI

2.Create volume snapshot with the same name as volume

Teardown:

1.Delete snapshot using API

2.Delete volume using API

test_default_migration_policy(volume, volumes_steps_ui)Verify that Migration Policy is On Demand by default.

Setup:

1.Create volume using API

130 Chapter 6. Deep to structure

Page 135: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Steps:

1.Check that Migration policy is On Demand by default when user changes volume type

Teardown:

1.Delete volume using API

test_delete_volumes(volumes, volumes_steps_ui)Scenario: Verify that user can delete volumes as bunch.

Setup:

1.Create volumes using API

Steps:

1.Delete volume as bunch using UI

test_edit_volume(volume, volumes_steps_ui)Scenario: Verify that user can edit volume.

Setup:

1.Create volume using API

Steps:

1.Edit volume name using UI

Teardown:

1.Delete volume using API

test_upload_volume_to_image(volume, images_steps_ui, volumes_steps_ui)Scenario: Verify that user can upload volume to image.

Setup:

1.Create volume using API

Steps:

1.Upload volume to image using UI

2.Check image presence

3.Delete image using UI

Teardown:

1.Delete volume using API

test_view_volume(volume, volumes_steps_ui)Scenario: Verify that user can view volume info.

Setup:

1.Create volume using API

Steps:

1.View volume using UI

Teardown:

1.Delete volume using API

6.7. Horizon 131

Page 136: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

test_volume_extend(volume, volumes_steps_ui)Scenario: Verify that user can extend volume size.

Setup:

1.Create volume using API

Steps:

1.Extend volume using UI

Teardown:

1.Delete volume using API

test_volumes_pagination(volume_steps, volumes, volumes_steps_ui, update_settings)Scenario: Verify that volumes pagination works right and back.

Setup:

1.Create some volumes using API

Steps:

1.Update items_per_page parameter to 1 using UI

2.Check volumes pagination using UI

Teardown:

1.Delete volumes using API

class stepler.horizon.tests.test_volumes.TestUserOnlyTests for user only.

test_launch_volume_as_instance(instances_steps_ui, bootable_volume_with_private_image,volumes_steps_ui)

Scenario: Verify that admin can launch volume as instance.

Setup:

1.Create bootable volume using API

Steps:

1.Launch volume as instance using UI

2.Change that instance status is Active using UI

3.Delete instance using UI

Teardown:

1.Delete volume using API

Keystone

Keystone conftest

stepler.keystone.conftest.admin(user_steps)Function fixture to get admin.

Parameters user_steps (object) – instantiated user steps

Returns user ‘admin’

132 Chapter 6. Deep to structure

Page 137: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Return type object

stepler.keystone.conftest.admin_role(role_steps)Fixture to get admin role.

stepler.keystone.conftest.create_domain(domain_steps)Fixture to create domain with options.

Can be called several times during test.

stepler.keystone.conftest.create_group(group_steps)Callable function fixture to create single keystone group with options.

Can be called several times during a test. After the test it destroys all created groups.

Parameters group_steps (object) – instantiated keystone steps

Returns function to create single keystone group with options

Return type function

stepler.keystone.conftest.create_project(project_steps)Fixture to create project with options.

Can be called several times during test.

stepler.keystone.conftest.create_role(role_steps)Fixture to create role with options.

Can be called several times during test.

stepler.keystone.conftest.create_user(user_steps)Session callable fixture to create user with options.

Can be called several times during a test. After the test it destroys all created users.

Examples of using this fixture in test: create_user(‘user1’, ‘qwerty!’) create_user(user_name=’user2’, pass-word=’user2’, domain=’ldap2’)

Parameters user_steps (object) – instantiated user steps

Yields function – function to create user with options

stepler.keystone.conftest.current_project(get_current_project)Function fixture to get current project.

Parameters get_current_project (function) – function to get current project

Returns current project

Return type obj

stepler.keystone.conftest.current_user(session, user_steps)Fixture to get current user.

Parameters

• session (obj) – keystone session

• user_steps (obj) – instantiated user steps

Returns current user

Return type obj

stepler.keystone.conftest.domain(create_domain)Fixture to create domain with default options before test.

6.8. Keystone 133

Page 138: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.keystone.conftest.domain_steps(keystone_client)Fixture to get domain steps.

stepler.keystone.conftest.ec2_credentials(ec2_steps, current_project, current_user)Fixture to create EC2 credentials for current user.

After the test it destroys created credentials.

Parameters

• ec2_steps (obj) – instantiated EC2 steps

• current_project (obj) – current project

• current_user (obj) – current user

Yields keystoneclient.v3.ec2.Ec2 – ec2 credentials object

stepler.keystone.conftest.ec2_steps(keystone_client)Fixture to get ec2 steps.

Parameters keystone_client (object) – keystone client for authorizing

Returns object with ec2 credentials steps

Return type object

stepler.keystone.conftest.get_current_project(get_session, get_project_steps)Callable session fixture to get current project.

Parameters

• get_session (function) – function to get keystone session

• get_project_steps (function) – function to get project steps

Returns function to get current project

Return type function

stepler.keystone.conftest.get_keystone_client(get_session)Callable session fixture to get keystone client.

Parameters get_session (function) – function to get authenticated keystone session

Returns function to get keystone client

Return type function

stepler.keystone.conftest.get_project_steps(get_keystone_client)Callable session fixture to get project steps.

Parameters get_keystone_client (function) – function to get keystone client.

Returns function to get project steps.

Return type function

stepler.keystone.conftest.get_role_steps(get_keystone_client)Callable session fixture to get role steps.

Parameters get_keystone_client (function) – function to get keystone client.

Returns function to get role steps.

Return type function

stepler.keystone.conftest.get_service_steps(get_keystone_client)Callable session fixture to get service steps.

134 Chapter 6. Deep to structure

Page 139: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters get_keystone_client (function) – function to get keystone client

Returns function to get project steps

Return type function

stepler.keystone.conftest.get_user_steps(get_keystone_client)Callable session fixture to get users steps.

Parameters get_keystone_client (function) – function to get keystone client.

Returns function to get users steps.

Return type function

stepler.keystone.conftest.group(create_group)Function fixture to create single keystone group.

Parameters create_group (function) – function to create group with options

Returns keystone group

Return type object

stepler.keystone.conftest.group_steps(keystone_client)Function fixture to get group steps.

Parameters keystone_client (object) – instantiated keystone client

Returns instantiated group steps

Return type stepler.keystone.steps.GroupSteps

stepler.keystone.conftest.keystone_client(get_keystone_client)Function fixture to get keystone client.

Parameters get_keystone_client (function) – function to get keystone client

Returns authenticated keystone client

Return type keystoneclient.client.Client

stepler.keystone.conftest.new_user_with_project(request, create_user_with_project)Fixture to create new project with new ‘_member_’ user.

Parameters

• request (obj) – pytest SubRequest instance

• create_user_with_project (function) – function to create project resources

Yields dict – dict with username, password and project_name

stepler.keystone.conftest.project(create_project)Fixture to create project with default options before test.

stepler.keystone.conftest.project_steps(get_project_steps)Function fixture to get project steps.

Parameters get_project_steps (function) – function to get project steps

Returns instantiated project steps.

Return type ProjectSteps

stepler.keystone.conftest.projects(request, role_steps, create_project, create_user)Function fixture to create different projects.

6.8. Keystone 135

Page 140: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

By default count of projects equal to 2 , but if you want another count please add this quantity before yourfunction.

All created resources are to be deleted after test.

Parameters

• role_steps (obj) – instantiated role steps

• create_project (function) – function to create project

• create_user (function) – function to create user

Returns created resources

Return type attrdict.AttrDict

stepler.keystone.conftest.role(create_role)Fixture to create role with default options before test.

stepler.keystone.conftest.role_steps(get_role_steps)Function fixture to get role steps.

Parameters get_role_steps (function) – function to get role steps

Returns instantiated role steps.

Return type RoleSteps

stepler.keystone.conftest.service_steps(get_service_steps)Function fixture to get service steps.

Parameters get_service_steps (function) – function to get service steps

Returns instantiated service steps

Return type ServiceSteps

stepler.keystone.conftest.token_steps(keystone_client)Callable session fixture to get keystone steps.

Parameters keystone_client (function) – function to get keystone client

Returns function to instantiated keystone token steps

Return type function

stepler.keystone.conftest.user(create_user)Function fixture to create user with default options before test.

Parameters create_user (function) – function to create user with options

Returns user

Return type object

stepler.keystone.conftest.user_steps(get_user_steps)Function fixture to get user steps.

Parameters get_user_steps (function) – function to get user steps

Returns instantiated user steps

Return type stepler.keystone.steps.UserSteps

stepler.keystone.conftest.users(request, user_steps)Function fixture to create users with default options before test.

Parameters

136 Chapter 6. Deep to structure

Page 141: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• request (obj) – py.test’s SubRequest instance

• user_steps (UserSteps) – instantiated user steps

Returns users

Return type list

Keystone steps

class stepler.keystone.steps.DomainSteps(client)Domain steps.

check_domain_presence(domain, must_present=True, timeout=0)Step to check domain presence.

Parameters

• domain (object) – domain

• must_present (bool) – flag whether domain should present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

create_domain(domain_name, check=True)Step to create domain.

Parameters

• domain_name (str) – domain name

• check (bool) – flag whether to check step or not

Returns domain

Return type object

delete_domain(domain, check=True)Step to delete domain.

Parameters

• domain (object) – domain

• check (bool) – flag whether to check step or not

get_domain(name, check=True)Step to find domain.

Parameters name (str) –

Raises NotFound – if domain does not exist

Returns domain

Return type object

get_domains(check=True)Step to get domains.

Parameters check (bool) – flag whether to check step or not

Returns list of domains

Return type list of objects

6.8. Keystone 137

Page 142: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

class stepler.keystone.steps.Ec2Steps(client)Ec2 credentials steps

check_presence(credentials, must_present=True, timeout=0)Step to check EC2 credentials presence.

Parameters

• credentials (keystoneclient.v3.ec2.Ec2) – ec2 credentials object

• must_present (bool) – flag whether credentials should present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

create(user, project, check=True)Step to create EC2 credentials.

Parameters

• user (object) – user

• project (object) – project

• check (bool) – flag whether to check step or not

Returns ec2 credentials object

Return type keystoneclient.v3.ec2.Ec2

Raises AssertionError – if check failed

delete(credentials, check=True)Step to delete EC2 credentials.

Parameters

• credentials (keystoneclient.v3.ec2.Ec2) – ec2 credentials object

• check (bool) – flag whether to check step or not

Raises AssertionError – if check failed

list(user, check=True)Step to list all ec2 credentials.

Parameters

• user (object) – user

• check (bool) – flag whether to check step or not

Returns list of ec2 credentials

Return type keystoneclient.v3.ec2.Ec2

Raises AssertionError – if check failed

class stepler.keystone.steps.GroupSteps(client)Group steps.

check_group_presence(group, must_present=True, timeout=0)Step to check group presence.

Parameters

• group (object) – the keystone group to be checked

138 Chapter 6. Deep to structure

Page 143: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• must_present (bool) – flag whether group should present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check is triggered to an error after timeout

create_group(name, domain=None, description=None, check=True)Step to create a group.

Parameters

• name (str) – the name of the group

• domain (str or class keystoneclient.v3.domains.Domain) – the domain of the group

• description (str) – the description of the group

Returns

the created group returned from server

Return type keystoneclient.v3.groups.Group

Raises TimeoutExpired|AssertionError – if check was triggered to an error

delete_group(group, check=True)Step to delete group.

Parameters group (object) – the group to be deleted

get_group(name, domain=’default’, check=True)Step to find group.

Parameters

• name (str) –

• domain (str or object) – domain

Raises NotFound – if group does not exist

Returns group

Return type object

get_groups(domain=’default’, check=True)Step to get groups.

Parameters

• domain (str or object) – domain

• check (bool) – flag whether to check step or not

Returns list of groups

Return type list of objects

class stepler.keystone.steps.ProjectSteps(client)Project steps.

check_get_projects_requires_authentication()Step to check unauthorized request returns (HTTP 401)

Raises AssertionError – if check failed

check_project_presence(project, must_present=True, timeout=0)Check step that project is present.

6.8. Keystone 139

Page 144: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• project (object) – keystone project to check presence status

• must_present (bool) – flag whether project should present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

create_project(project_name, domain=’default’, check=True)Step to create project.

Parameters

• project_name (str) – project name

• domain (str or object) – domain

• check (bool) – flag whether to check step or not

Returns project

Return type object

delete_project(project, check=True)Step to delete project.

Parameters

• project (object) – keystone project

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

get_current_project(session, check=True)Step to get current project.

Parameters

• session (object) – session object

• check (bool) – flag whether to check step or not

Raises

• AssertionError – if id of retrieved project is not equal to

• session project id

Returns project

Return type object

get_projects(check=True)Step to get projects.

Parameters check (bool) – flag whether to check step or not

Returns projects – list of projects

Return type list

Raises AssertionError – if no projects found

class stepler.keystone.steps.RoleSteps(client)Role steps.

140 Chapter 6. Deep to structure

Page 145: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

check_role_grant_status(role, user=None, group=None, domain=None, project=None,must_granted=True, timeout=0)

Check step if a user or group has a role on a domain or project.

Parameters

• role (str or obj) – the role to be checked on a domain or project

• user (str or obj) – check for role grants for the specified user on a resource. Domainor project must be specified. User and group are mutually exclusive.

• group (str or obj) – check for role grants for the specified user on a resource. Do-main or project must be specified. User and group are mutually exclusive.

• domain (str or obj) – check for role grants on the specified domain. Either user orgroup must be specified. Project and domain are mutually exclusive.

• project (str or obj) – check for role grants on the specified project. Either user orgroup must be specified. Project and domain are mutually exclusive.

• must_granted (bool) – flag whether role should present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_role_presence(role, must_present=True, timeout=0)Check step that role is present.

Parameters

• role (str or obj) – the role to be checked on the server

• must_present (bool) – flag whether role should present or no

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

create_role(role_name=None, check=True)Step to create role.

Parameters

• role_name (str) – the name of the role

• check (bool) – flag whether to check step or not

Returns new role

Return type keystoneclient.v3.roles.Role

Raises TimeoutExpired – if check failed after timeout

delete_role(role, check=True)Step to delete role.

Parameters

• role (object) – role

• check (bool) – flag whether to check step or not

Raises TimeoutExpired|AssertionError – if check failed

get_role(check=True, **kwgs)Step to retrieve role.

Parameters

6.8. Keystone 141

Page 146: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• check (bool) – flag whether to check step or not

• **kwgs – any suitable to role keyword arguments

Returns role

Return type keystoneclient.v3.roles.Role

grant_role(role, user=None, group=None, domain=None, project=None, check=True)Step to grant role to user or group on domain or project.

Parameters

• role (str or obj) – the role to be granted on the server

• user (str or obj) – the specified user to have the role granted on a resource. Domainor project must be specified. User and group are mutually exclusive.

• group (str or obj) – the specified group to have the role granted on a resource.Domain or project must be specified. User and group are mutually exclusive.

• domain (str or obj) – the domain in which the role will be granted. Either user orgroup must be specified. Project and domain are mutually exclusive.

• project (str or obj) – the project in which the role will be granted. Either user orgroup must be specified. Project and domain are mutually exclusive.

• check (bool) – flag whether to check step or not

Raises NotFound – if check failed after timeout

revoke_role(role, user=None, group=None, domain=None, project=None, check=True)Step to revoke role from user or group on domain or project.

Parameters

• role (str or obj) – the role to be revoked on the server

• user (str or obj) – the specified user to have the role revoked on a resource. Domainor project must be specified. User and group are mutually exclusive.

• group (str or obj) – revoke role grants for the specified group on a resource. Do-main or project must be specified. User and group are mutually exclusive.

• domain (str or obj) – revoke role grants on the specified domain. Either user orgroup must be specified. Project and domain are mutually exclusive.

• project (str or obj) – revoke role grants on the specified project. Either user orgroup must be specified. Project and domain are mutually exclusive.

• check (bool) – flag whether to check step or not

Raises NotFound – if check failed after timeout

class stepler.keystone.steps.UserSteps(client)User steps.

add_user_to_group(user, group, check=True)Step to add the specified user as a member of the specified group.

Parameters

• user (str or keystoneclient.v3.users.User) – the user to be added to thegroup

• group (str or keystoneclient.v3.groups.Group) – the group to put theuser in

142 Chapter 6. Deep to structure

Page 147: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• check (bool) – flag whether to check step or not

Raises NotFound – if check was triggered to an error

check_user_in_group(user, group, must_present=True, timeout=0)Step to check if the user is a member of the group.

Parameters

• user (str or keystoneclient.v3.users.User) – the user to be verified inthe group

• group (str or keystoneclient.v3.groups.Group) – the group to check theuser in

• must_present (bool) – flag whether group should present or not

• timeout (int) – seconds to wait a result of check

Returns if check is triggered to an error after timeout

Return type TimeoutExpired

check_user_presence(user, must_present=True, timeout=0)Step to check user presence.

Parameters

• user (object) – user

• must_present (bool) – flag whether user should present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

create_user(user_name, password, domain=’default’, enabled=True, email=None, descrip-tion=None, default_project=None, check=True, **kwargs)

Step to create new user.

Parameters

• user_name (str) – the new name of the user

• password (str) – the new password of the user

• domain (str or keystoneclient.v3.domains.Domain) – the new domainof the user

• enabled (str) – whether the user is enabled

• email (str) – the new email of the user

• description (str) – the new description of the user

• default_project (str or keystoneclient.v3.projects.Project) –the new default project of the user

• check (bool) – flag whether to check step or not

• kwargs – any other attribute provided will be passed to server

Returns new user

Return type keystoneclient.v3.users.User

Raises TimeoutExpired|AssertionError – if check was triggered to an error

6.8. Keystone 143

Page 148: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

delete_user(user, check=True)Step to delete user.

Parameters

• user (object) – user

• check (bool) – flag whether to check step or not

get_user(name, domain=’default’, group=None, check=True)Step to find user.

Parameters

• name (str) –

• domain (str or object) – domain

• group (str or object) – group

• check (bool) – flag whether to check step or not

Raises NotFound – if user does not exist

Returns user

Return type object

get_user_by_id(user_id, check=True)Step to find user by id.

Parameters

• user_id (str) – user ID

• check (bool) – flag whether to check step or not

Raises NotFound – if user does not exist

Returns user

Return type object

get_user_token(check=True)Step to get user token.

Parameters check (bool) – flag whether to check step or not

Returns token – user token

Return type str

get_users(domain=’default’, group=None, check=True)Step to get users.

Parameters

• domain (str or object) – domain

• group (str or object) – group

• check (bool) – flag whether to check step or not

Returns list of users

Return type list of object

update_user(user, check=True, **kwargs)Step to update the user.

144 Chapter 6. Deep to structure

Page 149: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• user (str or keystoneclient.v3.users.User) – the user to be updated onthe server

• name (str) – the new name of the user

• domain (str or keystoneclient.v3.domains.Domain) – the new domainof the user

• password (str) – the new password of the user

• email (str) – the new email of the user

• description (str) – the new description of the user

• enabled (str) – whether the user is enabled

• default_project (str or keystoneclient.v3.projects.Project) –the new default project of the user

kwargs: any other attribute provided will be passed to server

Raises TimeoutExpired|AssertionError – if check was triggered to an error

class stepler.keystone.steps.TokenSteps(client)Token steps.

check_token_is_revoked(token, must_revoked=True, timeout=0)Step to check if token is revoked.

Parameters

• token (str) – The token to be checked.

• must_revoked (bool) – flag whether volume should present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

get_token_data(token, include_catalog=True, check=True)Step to fetch the data about a token from the identity server.

Parameters

• token (str) – The ID of the token to be fetched

• include_catalog (bool) – Whether the service catalog should be included in theresponse.

• check (bool) – flag whether to check step or not

Returns data about the token

Return type dict

get_token_validate(token, include_catalog=True, check=True)Step to get validate a token.

Parameters

• token (str) – The ID of the token to be fetched

• include_catalog (bool) – Whether the service catalog should be included in theresponse.

• check (bool) – flag whether to check step or not

6.8. Keystone 145

Page 150: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Returns token access info

Return type keystoneclient.access.AccessInfoV3

revoke_token(token, check=True)Step to revoke a token.

Parameters

• token (str) – The token to be revoked.

• check (bool) – flag whether to check step or not

Returns token

Return type keystoneclient.access.AccessInfo

class stepler.keystone.steps.ServiceSteps(client)Services steps.

check_service_presence(service, must_present=True, timeout=0)Step to check that service is present.

Parameters

• service (object) – openstack service to check presence status

• must_present (bool) – flag whether service should present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

create_service(service_name, service_type=None, enabled=True, description=None,check=True)

Step to create service.

Parameters

• service_name (str) – service name

• service_type (str) – service type

• enabled (bool) – whether the service appears in the catalog

• description (str) – the description of the service

• check (bool) – flag whether to check step or not

Raises AssertionError – if check failed

Returns service

Return type object

delete_service(service, check=True)Step to delete service.

Parameters

• service (object) – openstack service

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

get_service(service_name)Step to get service by name.

Parameters service_name (str) – openstack service name to find

146 Chapter 6. Deep to structure

Page 151: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Returns service

Return type obj

Raises LookupError – if no services are found

get_services(check=True)Step to get services.

Parameters check (bool) – flag whether to check step or not

Returns services

Return type list

Raises AssertionError – if no services are found

Keystone tests

Keystone tests

stepler.keystone.tests.test_keystone.test_check_objects_are_revoked(role_steps,get_project_steps,cre-ate_project,cre-ate_user)

Scenario: Check that keystone objects are revoked correctly.

https://bugs.launchpad.net/mos/+bug/1546197 When you delete a role assignment using a user+role+projectpairing, unscoped tokens between the user+project are unnecessarily revoked as well. In fact, two events arecreated for each role assignment deletion (one that is scoped correctly and one that is scoped too broadly).

Setup:

1.Create project

2.Create user

Steps:

1.Add new project in admin tenant

2.Login under this user

3.Get projects

4.Delete new user from admin tenant

5.Get projects

Teardown:

1.Delete user

2.Delete project

stepler.keystone.tests.test_keystone.test_create_user_and_authenticate(new_user_with_project,get_server_steps)

Scenario: Create new user

Setup:

1.Create new user

6.8. Keystone 147

Page 152: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Create new project

3.Create new user role

4.Grant role to user for project

Steps:

1.Perform user authentication

2.Get list of servers

Teardown:

1.Delete user role

2.Delete project

3.Delete user

stepler.keystone.tests.test_keystone.test_keystone_permission_lose(admin,project,ad-min_role,project_steps,role_steps,user_steps)

Scenario: Check that admin have access to users and projects in this session.

Setup:

1.Create new project

Steps:

1.Add admin member with admin role to this project

2.Remove the admin role for this project

3.Check that admin is able to get projects and users

Teardown:

1.Delete project

stepler.keystone.tests.test_keystone.test_list_ec2(ec2_steps, ec2_credentials, cur-rent_user)

Scenario: List all ec2 credentials.

Steps:

1.Get the list of all ec2 credentials

stepler.keystone.tests.test_keystone.test_modify_project_members_update_quotas(admin_role,cre-ate_project,cre-ate_group,role_steps,project_steps)

Scenario: Failed to modify project members and update project quotas.

https://bugs.launchpad.net/horizon/+bug/1326668

Setup:

1.Get admin role

148 Chapter 6. Deep to structure

Page 153: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Steps:

1.Create project

2.Create group

3.Add new project in admin tenant

4.Get projects

5.Delete new project from admin tenant

6.Get projects

Teardown:

1.Delete group

2.Delete project

stepler.keystone.tests.test_keystone.test_restart_keystone_service(cirros_image,flavor,keypair,net_subnet_router,secu-rity_group,server,float-ing_ip,user, cre-ate_user,user_steps,os_faults_steps,server_steps,get_session)

Scenario: Check that keystone works after restarting services.

Setup:

1.Create cirros image

2.Create flavor

3.Create keypair

4.Create network with subnet and router

5.Create security group

6.Create server_1

7.Create user_1

Steps:

1.Attach floating IP

2.Check that ping from server_1 to 8.8.8.8 is successful

3.Restart keystone services

4.Check that user_1 is in user list

5.Create server_2

6.Attach floating IP

6.8. Keystone 149

Page 154: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

7.Check ping from server_2 to 8.8.8.8 and to server_1

8.Create user_2 and check its presence in user list

Teardown:

1.Delete users

2.Delete servers

3.Delete security group

4.Delete network, subnet, router

5.Delete keypair

6.Delete flavor

7.Delete cirros image

stepler.keystone.tests.test_keystone.test_service_list(service_steps, ser-vice_name)

Scenario: Check if service is present.

Steps:

1.Get service by name and check if it exists

stepler.keystone.tests.test_keystone.test_user_list(user_steps)Scenario: Request list of users.

Steps:

1.Get list of users

Neutron

Neutron conftest

stepler.neutron.conftest.add_router_interfaces(router_steps)Fixture to add interfaces to router.

Can be called several times during a test.

Parameters router_steps (object) – instantiated router steps

Returns function to add interfaces to router

Return type function

stepler.neutron.conftest.agent_steps(get_agent_steps)Function fixture to get agent steps.

Parameters get_agent_steps (function) – function to get instantiated agent steps

Returns instantiated agent steps

Return type stepler.neutron.steps.AgentSteps

stepler.neutron.conftest.baremetal_network(network_steps)Function fixture to find baremetal network before test.

Args: network_steps (object): instantiated network steps

Returns baremetal network

150 Chapter 6. Deep to structure

Page 155: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Return type object

stepler.neutron.conftest.change_neutron_quota(request, current_project, neu-tron_quota_steps)

Function fixture to change neutron quota values for test.

After test all neutron quota values will be restored with original values.

Note: This fixture should be parametrized.

Example

@pytest.mark.parametrize('change_neutron_quota', [{'network': 30,'router': 30,'subnet': 30,'port': 90}

], indirect=True)def test_foo(change_neutron_quota):

# test logic

Parameters

• request (obj) – py.test’s SubRequest

• current_project (obj) – current project

• neutron_quota_steps (obj) – instantiated neutron quota steps

Yields dict – dict with new quota values

stepler.neutron.conftest.create_floating_ip(floating_ip_steps, public_network)Fixture to create floating_ip with options.

Can be called several times during a test. After the test it destroys all created floating_ips.

Parameters

• floating_ip_steps (object) – instantiated floating ip steps

• public_network (obj) – public network

Returns function to create floating_ip as batch with options

Return type function

stepler.neutron.conftest.create_max_networks_with_instances(cirros_image, flavor,security_group,sorted_hypervisors,create_network,create_subnet,current_project,router_steps, neu-tron_quota_steps,hypervisor_steps,server_steps)

Callable fixture to create max networks, boot and delete servers.

6.9. Neutron 151

Page 156: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

This fixture returns fuction to create max count of networks, subnet for each network, connect networks torouter, boot nova server with cirros on each network and then delete created servers.

Parameters

• cirros_image (obj) – cirros image

• flavor (obj) – nova flavor

• security_group (obj) – nova security group

• sorted_hypervisors (list) – nova hypervisors list

• create_network (function) – function to create network

• create_subnet (function) – function to create subnet with options

• current_project (obj) – current project

• router_steps (obj) – instantiated router steps

• neutron_quota_steps (obj) – instantiated neutron quota steps

• hypervisor_steps (obj) – instantiated nova hypervisor steps

• server_steps (obj) – instantiated nova server steps

Returns function to create max count of networks

Return type function

stepler.neutron.conftest.create_network(network_steps)Callable fixture to create network with default options.

Can be called several times during test.

Parameters network_steps (object) – instantiated network steps

Yields function – function to create network with default options

stepler.neutron.conftest.create_port(port_steps)Function fixture to create port with options.

Can be called several times during a test. After the test it destroys all created ports.

Parameters port_steps (object) – instantiated neutron steps

Returns function to create port as batch with options

Return type function

stepler.neutron.conftest.create_port(port_steps)Function fixture to create port with options.

Can be called several times during a test. After the test it destroys all created ports.

Parameters port_steps (object) – instantiated neutron steps

Returns function to create port as batch with options

Return type function

stepler.neutron.conftest.create_router(router_steps)Fixture to create router with options.

Can be called several times during a test. After the test it destroys all created routers.

Parameters router_steps (object) – instantiated neutron steps

Returns function to create router as batch with options

152 Chapter 6. Deep to structure

Page 157: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Return type function

stepler.neutron.conftest.create_subnet(subnet_steps)Fixture to create subnet with options.

Can be called several times during a test. After the test it destroys all created subnets.

Parameters subnet_steps (object) – instantiated neutron steps

Returns function to create subnet as batch with options

Return type function

stepler.neutron.conftest.floating_ip(create_floating_ip)Fixture to create floating_ip with default options before test.

Parameters create_floating_ip (function) – function to create floating_ip with options

Returns floating_ip

Return type dict

stepler.neutron.conftest.floating_ip_steps(get_floating_ip_steps)Function fixture to get floating_ip steps.

Parameters get_floating_ip_steps (function) – function to get instantiated floating_ipsteps

Returns instantiated floating_ip steps

Return type stepler.neutron.steps.SubnetSteps

stepler.neutron.conftest.get_agent_steps(get_neutron_client)Callable session fixture to get agent steps.

Parameters get_neutron_client (function) – function to get instantiated neutron client

Returns function to get instantiated agent steps

Return type function

stepler.neutron.conftest.get_floating_ip_steps(get_neutron_client)Callable session fixture to get router steps.

Parameters get_neutron_client (function) – function to get instantiated neutron client

Returns function to get instantiated floating_ip steps

Return type function

stepler.neutron.conftest.get_network_steps(get_neutron_client)Callable session fixture to get network steps.

Parameters get_neutron_client (function) – function to get instantiated neutron client

Returns function to get instantiated network steps

Return type function

stepler.neutron.conftest.get_neutron_client(get_session)Callable session fixture to get neutron client wrapper.

Parameters get_session (function) – function to get authenticated keystone session

Returns function to get instantiated neutron client wrapper

Return type function

6.9. Neutron 153

Page 158: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.neutron.conftest.get_neutron_quota_steps(get_neutron_client)Callable session fixture to get neutron quota steps.

Parameters get_neutron_client (function) – function to get instantiated neutron client

Returns function to get instantiated neutron quota steps

Return type function

stepler.neutron.conftest.get_neutron_security_group_rule_steps(get_neutron_client)Callable session fixture to get security group rules steps.

Parameters get_neutron_client (function) – function to get instantiated neutron client

Returns function to get instantiated security group rules steps

Return type function

stepler.neutron.conftest.get_neutron_security_group_steps(get_neutron_client)Callable session fixture to get neutron security group steps.

Parameters get_neutron_client (function) – function to get instantiated neutron client

Returns function to get instantiated neutron security group steps

Return type function

stepler.neutron.conftest.get_router_steps(get_neutron_client)Callable session fixture to get router steps.

Parameters get_neutron_client (function) – function to get instantiated neutron client

Returns function to get instantiated router steps

Return type function

stepler.neutron.conftest.get_subnet_steps(get_neutron_client)Callable session fixture to get router steps.

Parameters get_neutron_client (function) – function to get instantiated neutron client

Returns function to get instantiated subnet steps

Return type function

stepler.neutron.conftest.net_subnet_router(network, subnet, router, router_steps)Function fixture to create net, subnet, router and link them.

It deletes all created resources after test.

Parameters

• network (obj) – network object

• subnet (obj) – subnet object

• router (obj) – router object

• router_steps (obj) – instantiated router steps

Returns network, subnet, router objects

Return type tuple

stepler.neutron.conftest.network(network_steps)Function fixture to create network with default options before test.

Parameters network_steps (object) – instantiated network steps

154 Chapter 6. Deep to structure

Page 159: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Returns network

Return type object

stepler.neutron.conftest.network_steps(get_network_steps, uncleanable)Function fixture to get network steps.

Parameters

• get_network_steps (function) – function to get instantiated network steps

• uncleanable (AttrDict) – data structure with skipped resources

Yields stepler.neutron.steps.NetworkSteps – instantiated network steps

stepler.neutron.conftest.neutron_2_networks(request, net_subnet_router, public_network,create_network, create_subnet, cre-ate_router, router_steps)

Function fixture to prepare environment with 2 networks.

This fixture creates router(s), 2 networks and 2 subnets and connects networks to router(s). By default, bothnetworks will be connected to single router.

All created resources are to be deleted after test.

Can be parametrized with ‘different_routers’ to create 2 routers and connect each of networks to different router.

Example

@pytest.mark.parametrize(‘neutron_2_networks’, [’different_routers’], indirect=True)

def test_foo(neutron_2_networks): # Will be created 2 routers, each of them will be linked with one # of thesubnets.

Parameters

• request (obj) – py.test SubRequest

• net_subnet_router (tuple) – network, subnet, router

• public_network (dict) – neutron public network

• create_network (function) – function to create network

• create_subnet (function) – function to create subnet

• create_router (function) – function to create router

• router_steps (obj) – instantiated router steps

Returns created resources

Return type attrdict.AttrDict

6.9. Neutron 155

Page 160: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.neutron.conftest.neutron_2_servers_2_nets_diff_projects(request, neu-tron_nets_for_projects,sorted_hypervisors,cirros_image,public_flavor,pub-lic_network,get_neutron_security_group_steps,get_neutron_security_group_rule_steps,get_server_steps,get_floating_ip_steps,port_steps)

Function fixture to prepare environment for different projects tests.

This fixture:

•creates 2 projects;

•creates net, subnet, router in each project;

•creates security groups in each project;

•add ping + ssh rules for each security group;

•create server in each project;

•add floating ips for servers in each project.

All created resources are to be deleted after test.

Parameters

• request (obj) – py.test SubRequest

• neutron_nets_for_projects (AttrDict) – neutron networks, subnets, router(s)resources AttrDict instance

• sorted_hypervisors (list) – sorted hypervisors

• cirros_image (obj) – glance image

• public_flavor (obj) – nova flavor with is_public=True attribute

• public_network (obj) – public network

• get_neutron_security_group_steps (function) – function to get securitygroup steps

• get_neutron_security_group_rule_steps (function) – function to get se-curity group rules steps

• get_server_steps (function) – function to get server steps

• get_floating_ip_steps (function) – function to get floating ip steps

• port_steps (obj) – instantiated port steps

Returns created resources

Return type attrdict.AttrDict

156 Chapter 6. Deep to structure

Page 161: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.neutron.conftest.neutron_2_servers_2_projects_with_shared_net(request,pub-lic_network,con-ntrack_cirros_image,pub-lic_flavor,cre-ate_project,cre-ate_user,cre-ate_network,cre-ate_subnet,cre-ate_router,port_steps,role_steps,router_steps,get_server_steps,get_neutron_security_group_steps,get_neutron_security_group_rule_steps,get_floating_ip_steps)

Function fixture to prepare environment for different projects tests.

This fixture:

•creates 2 projects: admin and non-admin

•creates security groups in each project;

•add ping + ssh rules for each security group;

•creates shared net with subnet and router in admin project;

•create server in each project;

•add floating ips for servers in each project.

All created resources are to be deleted after test.

Parameters

• request (obj) – py.test SubRequest

• public_network (dict) – neutron public network

• conntrack_cirros_image (obj) – glance image with public visibility

• public_flavor (obj) – nova flavor with is_public=True attribute

• create_project (function) – function to create project

• create_user (function) – function to create user

• create_network (function) – function to create network

• create_subnet (function) – function to create subnet

• create_router (function) – function to create router

• port_steps (obj) – instantiated port steps

6.9. Neutron 157

Page 162: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• role_steps (obj) – instantiated role steps

• router_steps (obj) – instantiated router steps

• get_server_steps (function) – function to get server steps

• get_neutron_security_group_steps (function) – function to get securitygroup steps

• get_neutron_security_group_rule_steps (function) – function to get se-curity group rules steps

• get_floating_ip_steps (function) – function to get floating ip steps

Returns created resources

Return type attrdict.AttrDict

stepler.neutron.conftest.neutron_2_servers_diff_nets_with_floating(neutron_2_servers_different_networks,cre-ate_floating_ip,server_steps)

Function fixture to prepare environment with 2 servers.

This fixture creates resources using neutron_2_servers_different_networks fixture, creates and attaches floatingips for all servers.

All created resources are to be deleted after test.

Parameters

• neutron_2_servers_different_networks (AttrDict) – neutron networks,subnets, router(s) and servers resources AttrDict instance

• create_floating_ip (function) – function to create floating IP

• server_steps (obj) – instantiated nova server steps

Returns created resources

Return type attrdict.AttrDict

stepler.neutron.conftest.neutron_2_servers_different_networks(request, cir-ros_image, flavor,security_group,sorted_hypervisors,neu-tron_2_networks,hypervisor_steps,server_steps)

Function fixture to prepare environment with 2 servers.

This fixture creates router, 2 networks and 2 subnets, connects networks to router, boot nova server on eachnetwork on different computes.

All created resources are to be deleted after test.

Can be parametrized with ‘same_host’.

Example

@pytest.mark.parametrize(‘neutron_2_servers_different_networks’, [’same_host’], indirect=True)

def test_foo(neutron_2_servers_different_networks): # Instances will be created on the same compute

158 Chapter 6. Deep to structure

Page 163: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• request (obj) – py.test SubRequest

• cirros_image (obj) – cirros image

• flavor (obj) – nova flavor

• security_group (obj) – nova security group

• sorted_hypervisors (list) – available hypervisors

• neutron_2_networks (obj) – neutron networks, subnets, router(s) resources AttrDictinstance

• hypervisor_steps (obj) – instantiated nova hypervisor steps

• server_steps (obj) – instantiated nova server steps

Returns created resources

Return type attrdict.AttrDict

stepler.neutron.conftest.neutron_2_servers_different_subnets(cirros_image,flavor, se-curity_group,net_subnet_router,server, cre-ate_subnet,router_steps,subnet_steps,server_steps)

Function fixture to prepare environment with 2 servers.

This fixture creates router, network and 2 subnets, connects subnets to router, boot 2 nova servers on differentsubnets and on the same compute.

All created resources are to be deleted after test.

Parameters

• cirros_image (obj) – cirros image

• flavor (obj) – nova flavor

• security_group (obj) – nova security group

• net_subnet_router (tuple) – network, subnet, router

• server (obj) – nova server

• create_subnet (function) – function to create subnet

• router_steps (function) – instantiated neutron subnet steps

• subnet_steps (obj) – instantiated neutron subnet steps

• server_steps (obj) – instantiated nova server steps

Returns created resources

Return type attrdict.AttrDict

6.9. Neutron 159

Page 164: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.neutron.conftest.neutron_2_servers_iperf_different_networks(ubuntu_image,flavor,keypair,secu-rity_group,neu-tron_2_networks,hypervi-sor_steps,neu-tron_security_group_rule_steps,server_steps)

Function fixture to prepare environment with 2 ubuntu servers.

This fixture creates router, 2 networks and 2 subnets, connects networks to router, boots nova server with ubuntuon each network on different computes, installs iperf to both servers, starts TCP and UDP iperf servers.

All created resources are to be deleted after test.

Parameters

• ubuntu_image (obj) – ubuntu image

• flavor (obj) – nova flavor

• keypair (obj) – nova server keypair

• security_group (obj) – nova security group

• neutron_2_networks (obj) – neutron networks, subnets, router(s) resources AttrDictinstance

• hypervisor_steps (obj) – instantiated nova hypervisor steps

• neutron_security_group_rule_steps (obj) – instantiated neutron securitygroup rules steps

• server_steps (obj) – instantiated nova server steps

Returns created resources

Return type attrdict.AttrDict

stepler.neutron.conftest.neutron_2_servers_same_network(request, cirros_image,flavor, security_group,net_subnet_router,server, hypervisor_steps,server_steps)

Function fixture to prepare environment with 2 servers.

This fixture creates router, network and subnet, connects network to router, boot 2 nova servers on differentcomputes.

All created resources are to be deleted after test.

Can be parametrized with ‘same_host’.

Example

@pytest.mark.parametrize(‘neutron_2_servers_same_network’, [’same_host’], indirect=True)

def test_foo(neutron_2_servers_same_network): # Instances will be created on the same compute

160 Chapter 6. Deep to structure

Page 165: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• request (obj) – py.test SubRequest

• cirros_image (obj) – cirros image

• flavor (obj) – nova flavor

• security_group (obj) – nova security group

• net_subnet_router (tuple) – network, subnet, router

• server (obj) – nova server

• hypervisor_steps (obj) – instantiated nova hypervisor steps

• server_steps (obj) – instantiated nova server steps

Returns created resources

Return type attrdict.AttrDict

stepler.neutron.conftest.neutron_client(get_neutron_client)Function fixture to get neutron client wrapper.

Parameters get_neutron_client (function) – function to get instantiated neutron clientwrapper

stepler.neutron.conftest.neutron_conntrack_2_projects_resources(request, neu-tron_nets_for_projects,con-ntrack_cirros_image,public_flavor,sorted_hypervisors,hypervi-sor_steps,port_steps,cre-ate_floating_ip,get_neutron_security_group_steps,get_neutron_security_group_rule_steps,get_server_steps)

Function fixture to prepare environment for conntrack tests.

This fixture:

•creates 2 projects;

•creates net, subnet, router in each project;

•creates security groups in each project;

•add ping + ssh rules for 1’st project’s security group;

•add ssh rules for 2’nd project security group;

•creates 2 servers in 1’st project;

•creates 2 servers in 2’nd project with same fixed ip as for 1’st project;

•add floating ips for one of servers in each project.

All created resources are to be deleted after test.

Parameters

6.9. Neutron 161

Page 166: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• request (obj) – py.test SubRequest

• neutron_nets_for_projects (AttrDict) – neutron networks, subnets, router(s)resources AttrDict instance

• conntrack_cirros_image (obj) – glance image for conntrack tests

• public_flavor (obj) – nova flavor with is_public=True attribute

• sorted_hypervisors (list) – sorted hypervisors

• hypervisor_steps (obj) – instantiated nova hypervisor steps

• port_steps (obj) – instantiated port steps

• create_floating_ip (function) – function to create floating ip

• get_neutron_security_group_steps (function) – function to get securitygroup steps

• get_neutron_security_group_rule_steps (function) – function to get se-curity group rule steps

• get_server_steps (function) – function to get server steps

Returns created resources

Return type attrdict.AttrDict

stepler.neutron.conftest.neutron_create_security_group(neutron_security_group_steps)Callable function fixture to create security group with options.

Can be called several times during test. After the test it destroys all created security groups

Parameters neutron_security_group_steps (object) – instantiated security groupssteps

Returns function to create security group

Return type function

stepler.neutron.conftest.neutron_nets_for_projects(request, projects, create_network,create_subnet, create_router,router_steps, public_network)

Function fixture to prepare environment for different projects tests.

This fixture:

• creates net, subnet, router in each project;

• count of resources equal to count of projects;

All created resources are to be deleted after test.

Parameters

• projects (obj) – fixture of keystone projects

• create_network (function) – function to create network

• create_subnet (function) – function to create subnet

• create_router (function) – function to create router

• router_steps (obj) – instantiated router steps

• public_network (dict) – neutron public network

Returns created resources

162 Chapter 6. Deep to structure

Page 167: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Return type attrdict.AttrDict

stepler.neutron.conftest.neutron_quota_steps(get_neutron_quota_steps)Function fixture to get neutron quota steps.

Parameters get_neutron_quota_steps (function) – function to get instantiated neutronquota steps

Returns instantiated neutron quota steps

Return type stepler.neutron.steps.QuotaSteps

stepler.neutron.conftest.neutron_security_group(neutron_create_security_group, neu-tron_security_group_rule_steps)

Function fixture to create security group before test.

Can be called several times during test. After the test it destroys all created security groups

Parameters

• neutron_create_security_group (function) – function to create securitygroup with options

• neutron_security_group_rule_steps (object) – instantiated security groupsrules steps

Returns security group

Return type dict

stepler.neutron.conftest.neutron_security_group_rule_steps(get_neutron_security_group_rule_steps)Function fixture to get security group rule steps.

Parameters get_neutron_security_group_rule_steps (function) – function to getinstantiated security group rules steps

Returns

instantiated security group rules steps

Return type stepler.neutron.steps.NeutronSecurityGroupRuleSteps

stepler.neutron.conftest.neutron_security_group_steps(get_neutron_security_group_steps,neu-tron_security_groups_cleanup)

Function fixture to get neutron security group steps.

Parameters

• get_neutron_security_group_steps (function) – function to get instantiatedneutron security group steps

• neutron_security_groups_cleanup (function) – function to cleanup createdsecurity groups

Returns

instantiated neutron security group steps

Return type stepler.neutron.steps.NeutronSecurityGroupSteps

stepler.neutron.conftest.neutron_security_groups_cleanup(get_neutron_security_group_steps)Function fixture to cleanup security groups after test.

Parameters get_neutron_security_group_steps (function) – function to get instan-tiated neutron security group steps

6.9. Neutron 163

Page 168: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.neutron.conftest.port(network, subnet, create_port)Fixture to create port with default options before test.

stepler.neutron.conftest.port_steps(neutron_client)Fixture to get port steps.

stepler.neutron.conftest.public_network(network_steps)Function fixture to return public network.

Parameters network_steps (object) – instantiated network steps

Returns public network

Return type dict

stepler.neutron.conftest.reschedule_router_active_l3_agent(agent_steps)Callable function fixture to reschedule router’s active L3 agent.

Parameters agent_steps (obj) – instantiated neutron agent steps

Returns function to reschedule router

Return type function

stepler.neutron.conftest.router(request, router_steps, create_router, public_network)Fixture to create router with default options before test.

Parameters

• request (obj) – py.test SubRequest

• router_steps (object) – instantiated neutron steps

• create_router (function) – function to create router with options

• public_network (dict) – public network

Returns router

Return type dict

stepler.neutron.conftest.router_steps(get_router_steps)Function fixture to get router steps.

Parameters get_router_steps (function) – function to get instantiated router steps

Returns instantiated router steps

Return type stepler.neutron.steps.RouterSteps

stepler.neutron.conftest.routers_cleanup(router_steps)Fixture to clear created routers after test.

It stores ids of all routers before test and removes all new routers after test.

Parameters router_steps (obj) – instantiated neutron routers steps

stepler.neutron.conftest.set_dhcp_agents_count_for_net(request, get_neutron_client,os_faults_steps,patch_ini_file_and_restart_services)

Function fixture to set DHCP agents count for network.

This fixture must be parametrized with DHCP agents count for each network.

164 Chapter 6. Deep to structure

Page 169: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Example

@pytest.mark.parametrize(‘set_dhcp_agents_count_for_net’, [1], indirect=True)

def test_foo(set_dhcp_agents_count_for_net): # Will be set 1 DHCP agent for network

Parameters

• request (obj) – py.test SubRequest

• get_neutron_client (function) – function to get instantiated neutron client wrap-per

• os_faults_steps (object) – instantiated os_faults steps

• patch_ini_file_and_restart_services (function) – callable fixture topatch ini file and restart services

stepler.neutron.conftest.subnet(create_subnet, network)Fixture to create subnet with default options before test.

Parameters

• create_subnet (function) – function to create subnet with options

• network (dict) – network

Returns subnet

Return type dict

stepler.neutron.conftest.subnet_steps(get_subnet_steps)Function fixture to get subnet steps.

Parameters get_subnet_steps (function) – function to get instantiated subnet steps

Returns instantiated subnet steps

Return type stepler.neutron.steps.SubnetSteps

Neutron steps

class stepler.neutron.steps.AgentSteps(client)Agent steps.

add_network_to_dhcp_agent(dhcp_agent, network, timeout=0, check=True)Step to add network to DHCP agent.

Parameters

• dhcp_agent (dict) – DHCP agent to add network to

• network (dict) – network to add to DHCP agent

• timeout (int) – seconds to wait a result of check

• check (bool, optional) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

add_router_to_l3_agent(l3_agent, router, timeout=0, check=True)Step to add router to L3 agent.

Parameters

6.9. Neutron 165

Page 170: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• l3_agent (dict) – L3 agent to add router to

• router (dict) – router to add to L3 agent

• timeout (int) – seconds to wait a result of check

• check (bool, optional) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

check_agents_count_for_net(network, expected_count, timeout=0)Step to check DHCP agents count for network.

Parameters

• network (dict) – network to check

• expected_count (int) – expected DHCP agents count for network

• timeout (int) – seconds to wait a result of check

Raises

• TimeoutExpired – if agents are not alive

• AssertionError – if check failed

check_alive(agents, must_alive=True, timeout=0)Verify step to check agents aliveness status.

Parameters

• agents (list) – neutron agents to check status

• must_alive (bool, optional) – flag whether all agents should be alive or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_l3_ha_router_rescheduled(router, old_l3_agent, timeout=0)Verify step to check that l3 ha router was rescheduled.

Parameters

• router (obj) – router to check

• old_l3_agent (dict) – l3 agent before rescheduling

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_network_is_on_agent(network, dhcp_agent, timeout=0)Step to check that network is on DHCP agent.

Parameters

• network (dict) – network to check

• dhcp_agent (dict) – DHCP agent to check

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_network_rescheduled(network, old_dhcp_agent, timeout=0)Step to check that network was rescheduled.

Parameters

166 Chapter 6. Deep to structure

Page 171: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• network (dict) – network to check

• old_dhcp_agent (dict) – DHCP agent before rescheduling

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_router_is_on_agent(router, l3_agent, timeout=0)Step to check that router is on L3 agent.

Parameters

• router (dict) – router to check

• l3_agent (dict) – L3 agent to check

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_router_rescheduled(router, old_l3_agent, timeout=0)Verify step to check that router was rescheduled.

Parameters

• router (dict) – router to check

• old_l3_agent (dict) – L3 agent before rescheduling

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

get_agents(node=None, check=True, **kwargs)Step to get agents by params in ‘**kwargs’.

Parameters

• node (obj) – NodeCollection instance to get agents. If node parameter is defined, ‘host’parameter can’t be used in **kwargs

• check (bool, optional) – flag whether to check step or not

• **kwargs – additional arguments to pass to API

Returns neutron agents

Return type list

Raises AssertionError – if list of agents is empty

get_dhcp_agents_for_net(network, filter_attrs=None, check=True)Step to retrieve network DHCP agents dicts list.

Parameters

• network (dict) – network to get DHCP agents

• filter_attrs (dict, optional) – filter attrs dict to return only matcheddhcp_agents

• check (bool, optional) – flag whether to check step or not

Returns list of DHCP agents dicts for network

Return type list

Raises AssertionError – if list of agents is empty

6.9. Neutron 167

Page 172: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

get_dhcp_agents_not_hosting_net(network, check=True)Step to retrieve DHCP agents which are not hosting network.

Parameters

• network (dict) – network to get DHCP agents which can’t be used

• check (bool, optional) – flag whether to check step or not

Returns list of DHCP agents which are not hosting network

Return type list

Raises AssertionError – if list of agents is empty

get_l3_agents_for_router(router, filter_attrs=None, check=True, timeout=0)Step to retrieve router L3 agents dicts list.

Parameters

• router (dict) – router to get L3 agents

• filter_attrs (dict, optional) – filter attrs dict to return only matchedl3_agents

• check (bool, optional) – flag whether to check step or not

• timeout (int) – seconds to wait a result of check

Returns list of L3 agents dicts for router

Return type list

Raises AssertionError – if list of agents is empty

remove_network_from_dhcp_agent(dhcp_agent, network, timeout=0, check=True)Step to remove network from DHCP agent.

Parameters

• dhcp_agent (dict) – DHCP agent to remove network from

• network (dict) – network to remove from DHCP agent

• timeout (int) – seconds to wait a result of check

• check (bool, optional) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

remove_router_from_l3_agent(l3_agent, router, timeout=0, check=True)Step to remove router from L3 agent.

Parameters

• l3_agent (dict) – L3 agent to remove router from

• router (dict) – router to remove from L3 agent

• timeout (int) – seconds to wait a result of check

• check (bool, optional) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

reschedule_network_to_dhcp_agent(target_dhcp_agent, network, timeout=0, check=True)Step to reschedule network’s active DHCP agent.

Parameters

168 Chapter 6. Deep to structure

Page 173: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• target_dhcp_agent (dict) – DHCP agent to reschedule network to

• network (dict) – network to be rescheduled

• timeout (int) – seconds to wait a result of check

• check (bool, optional) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

reschedule_router_to_l3_agent(target_l3_agent, router, timeout=0, check=True)Step to reschedule router’s active L3 agent.

Parameters

• target_l3_agent (dict) – L3 agent to reschedule router to

• router (dict) – router to be rescheduled

• timeout (int) – seconds to wait a result of check

• check (bool, optional) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

class stepler.neutron.steps.FloatingIPSteps(client)Floating IP steps.

attach_floating_ip(floating_ip, port, check=True)Step to attach floating IP to server with neutron.

Parameters

• floating_ip (dict) – floating ip

• port (dict) – server port to attach floating ip to

• check (bool, optional) – flag whether to check this step or not

Raises AssertionError – if check failed

check_negative_create_extra_floating_ip(network)Step to check that unable to create floating ips more than quota.

Parameters network (obj) – network

Raises AssertionError – if no OverQuotaClient exception occurs or exception message isnot expected

check_presence(floating_ip, must_present=True, timeout=0)Verify step to check floating_ip is present.

Parameters

• floating_ip (dict) – floating_ip to check presence status

• must_present (bool) – flag whether floating_ip must present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

create(network, port=None, check=True, **kwargs)Step to create floating_ip.

Parameters

• network (dict) – external network to create floating_ip on

6.9. Neutron 169

Page 174: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• port (dict, optional) – port to associate floating ip with it. By default createdfloating ip is not associated with any port.

• check (bool) – flag whether to check step or not

• **kwargs – other arguments to pass to API

Returns floating_ip

Return type dict

Raises AssertionError – if check failed

delete(floating_ip, check=True)Step to delete floating_ip.

Parameters

• floating_ip (dict) – floating_ip

• check (bool) – flag whether to check step or not

Raises AssertionError – if check failed

detach_floating_ip(floating_ip, check=True)Step to detach floating IP from server with neutron.

Parameters

• floating_ip (dict) – floating ip

• check (bool, optional) – flag whether to check this step or not

Raises AssertionError – if check failed

class stepler.neutron.steps.NeutronSecurityGroupRuleSteps(client)Security group rules steps.

add_rule_to_group(group_id, check=True, **rule_params)Step to add rule to security group.

Parameters

• group_id (str) – id of security group

• check (bool) – flag whether to check step or not

• **rule_params (dict, optional) – could be:

– direction (str): ‘egress’ or ‘ingress’

– ethertype (str): ‘IPv4’ or ‘IPv6’

– protocol (str): icmp, icmpv6, tcp, udp

– port_range_min (int|None): starting port range

– port_range_max (int|None): ending port range

– remote_ip_prefix (str): cidr

– remote-group-id (str): id or name of the remote security group

Raises AssertionError – if check failed

add_rules_to_group(group_id, rules_params, check=True)Step to add rules to security group.

Parameters

170 Chapter 6. Deep to structure

Page 175: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• group_id (str) – id of security group

• rules_params (list of dict) – params for each rule

• check (bool) – flag whether to check step or not

Returns security group rules

Return type list

Raises AssertionError – if check failed

check_negative_create_extra_group_rule(group_id, **rule_params)Step to check that unable to add group rules more than quota allows.

Parameters

• group_id (str) – id of security group

• **rule_params (dict, optional) – rule parameters

Raises AssertionError – if no OverQuotaClient exception occurs or exception messageis not expected

check_rule_presence(rule_id, group_id, must_present=True)Step to check rule presence for security group.

Parameters

• rule_id (str) – id of security group rule

• group_id (str) – id of security group

• must_present (bool) – flag whether rule must present or not

Raises AssertionError – if check failed after timeout

delete_rule_from_group(rule_id, group_id, check=True)Step to delete rule from security group.

Parameters

• rule_id (str) – id of security group rule

• group_id (str) – id of security group

• check (bool) – flag whether to check step or not

Raises AssertionError – if check failed

get_rules(check=True, **kwargs)Step to get security group rules.

Parameters

• check (bool) – flag whether to check step or not

• **kwargs – params to list security group rules

Returns security group rules

Return type list

Raises AssertionError – if no rules found or rule belongs to unexpected security group

class stepler.neutron.steps.NeutronSecurityGroupSteps(client)Neutron security group steps.

6.9. Neutron 171

Page 176: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

check_negative_create_extra_security_group()Step to check that unable to create security groups more than quota.

Raises AssertionError – if no OverQuotaClient exception occurs or exception messageis not expected

check_presence(group, must_present=True, timeout=0)Verify step to check security group is present.

Parameters

• group (dict) – security group to check presence status

• must_present (bool) – flag whether group must present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

create(group_name=None, description=None, check=True)Step to create security group.

Parameters

• group_name (str) – security group name

• description (str) – security group description

• check (bool) – flag whether to check step or not

Returns security group

Return type dict

delete(group, check=True)Step to delete security group.

Parameters

• group (dict) – security group

• check (bool) – flag whether to check step or not

get_security_groups(check=True, **kwargs)Step to get all security groups.

Parameters

• check (bool) – flag whether to check step or not

• **kwargs – params to list security groups

Returns security groups

Return type list

Raises AssertionError – if group list is empty or doesn’t correspond to given filter

class stepler.neutron.steps.NetworkSteps(client)Network steps.

check_negative_create_extra_network()Step to check that unable to create networks more than quota.

Raises AssertionError – if no OverQuotaClient exception occurs or exception messageis not expected

172 Chapter 6. Deep to structure

Page 177: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

check_nets_count_difference_for_agents(dhcp_agents, max_difference_in_percent)Step to check networks count for DHCP agent.

This step verifies that the difference between max and min networks count for all DHCP agents is lessthan max allowed percent. Max networks count is considered to be 100%.

Parameters

• dhcp_agents (list) – list of neutron agents dicts

• max_percentage_difference (int) – max allowed percentage for differencebetween max and min nets counts for agents

Raises AssertionError – if check failed

check_nets_count_for_agent(agent, expected_count, timeout=0)Step to check networks count for DHCP agent.

Parameters

• agent (dict) – neutron agent dict to check status

• expected_count (int) – expected networks count for DHCP agents

• timeout (int) – seconds to wait for a result of check

Raises TimeoutExpired – if check failed after timeout

check_presence(network, must_present=True, timeout=0)Verify step to check network is present.

Parameters

• network (dict) – network to check presence status

• must_present (bool) – flag whether network must present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

create(network_name, check=True, **kwargs)Step to create network.

Parameters

• network_name (str) – network name

• check (bool) – flag whether to check step or not

• **kwargs – other arguments to pass to API

Returns network

Return type dict

delete(network, check=True)Step to delete network.

Parameters

• network (dict) – network

• check (bool) – flag whether to check step or not

get_network(check=True, **kwargs)Step to get network by params in ‘**kwargs’.

Parameters

6.9. Neutron 173

Page 178: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• check (bool) – flag whether to check step or not

• kwargs (dict) – Params. Like: {‘router:external’: True, ‘status’: ‘ACTIVE’}

Returns network

Return type dict

get_network_by_name(name, **kwargs)Step to get network by name.

Parameters

• name (str) – network name

• **kwargs – other arguments to pass to API

Returns network

Return type dict

Raises LookupError – if zero or more than one networks found

get_network_id_by_mac(mac)Step to get network ID by server MAC.

Parameters mac (string) – mac address

Returns network ID

Return type string

get_networks(check=True, **kwargs)Step to get networks by params in ‘**kwargs’.

Parameters

• check (bool, optional) – flag whether to check step or not

• **kwargs – additional arguments to pass to API

Returns neutron networks

Return type list

Raises AssertionError – if list of networks is empty

get_networks_for_dhcp_agent(agent, check=True)Step to get networks list for DHCP agent.

Parameters

• agent (dict) – neutron agent dict to check status

• check (bool, optional) – flag whether to check step or not

Returns list of networks for agent

Return type list

Raises AssertionError – if check failed

get_public_network(check=True)Step to get public network.

Parameters check (bool, optional) – flag whether to check step or not

Returns network

Return type dict

174 Chapter 6. Deep to structure

Page 179: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Raises AssertionError – if check failed

update(network, check=True, **kwargs)Step to update network.

Parameters

• network (dict) – network

• check (bool) – flag whether to check step or not

• **kwargs – other arguments to pass to API

Raises AssertionError – if check failed

class stepler.neutron.steps.PortSteps(client)Port steps.

check_equal_ports(ports_1, ports_2)Step for comparing ports.

Parameters

• ports_1 (list) – first list of ports for comparing

• ports_2 (list) – second list of ports for comparing

Raises AssertionError – if lists are not equal

check_negative_create_extra_port(network)Step to check that unable to create ports more than quota.

Parameters network (obj) – network

Raises AssertionError – if no OverQuotaClient exception occurs or exception messageis not expected

check_ports_binding_difference(ports_before, ports_after, ex-pected_removed_count=None, ex-pected_added_count=None)

Step for comparing ports bindings.

Parameters

• ports_before (list) – first list of ports for comparing bindings

• ports_after (list) – second list of ports for comparing bindings

• expected_removed_count (int) – expected count of removed ports bindings

• expected_added_count (int) – expected count of new ports bindings

Raises AssertionError – if actual removed or added count of bindings doesn’t equal totheir expected values

check_ports_ids_equal(ports_1, ports_2)Step for comparing ports ids.

Parameters

• ports_1 (list) – first list of ports for comparing ids

• ports_2 (list) – second list of ports for comparing ids

Raises AssertionError – if ports ids of two lists are not equal

check_presence(port, must_present=True, timeout=0)Verify step to check port is present.

6.9. Neutron 175

Page 180: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• port (dict) – neutron port to check presence status

• must_present (bool) – flag whether port must present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

create(network, check=True, **kwargs)Step to create port.

Parameters

• network (dict) – network to create port on

• check (bool) – flag whether to check step or not

• **kwargs – other arguments to pass to API

Returns port

Return type dict

delete(port, check=True)Step to delete port.

Parameters

• port (dict) – port to delete

• check (bool) – flag whether to check step or not

get_port(check=True, **kwargs)Step to get port by params in ‘**kwargs’.

Parameters

• check (bool) – flag whether to check step or not

• **kwargs – params to filter port

Returns port

Return type dict

Raises

• LookupError – if zero or more than one networks found

• AssertionError – if port attributes are wrong

get_ports(check=True, **kwargs)Step to retrieve all ports in current project.

Parameters

• check (bool) – flag whether to check step or not

• **kwargs – params to list ports

Returns list of ports

Return type list

Raises AssertionError – if list of ports is empty

update(port, check=True, **kwargs)Step to update port attributes.

176 Chapter 6. Deep to structure

Page 181: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• port (dict) – port dict

• check (bool) – flag whether to check step or not

• **kwargs – attributes to pass to API

Raises AssertionError – if check failed

class stepler.neutron.steps.QuotaSteps(client)Neutron quota steps.

get(project, check=True)Step to retrieve quota.

Parameters

• project (obj) – project object

• check (bool|True) – flag whether to check step or not

Returns neutron quota values

Return type dict

Raises AssertionError – if check failed

update(project, values, check=True)Step to update quota.

Parameters

• project (obj) – project object

• values (dict) – new quota values mapping

• check (bool|True) – flag whether to check step or not

Raises AssertionError – if check was failed

class stepler.neutron.steps.RouterSteps(client)Router steps.

add_port_interface(router, port, check=True)Step to add router port interface.

Parameters

• router (dict) – router

• port (dict) – port

• check (bool) – flag whether to check step or not

add_subnet_interface(router, subnet, check=True)Step to add router to subnet interface.

Parameters

• router (dict) – router

• subnet (dict) – subnet

• check (bool) – flag whether to check step or not

check_gateway_presence(router, must_present=True, timeout=0)Verify step to check router gateway is present.

6.9. Neutron 177

Page 182: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• router (dict) – router to check gateway presence status

• must_present (bool) – flag whether router must present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_negative_create_extra_router()Step to check that unable to create routers more than quota.

Raises AssertionError – if no OverQuotaClient exception occurs or exception messageis not expected

check_port_interface_presence(router, port, must_present=True, timeout=0)Verify step to check port is in router interfaces.

Parameters

• router (dict) – router to check

• port (dict) – port to be found in router interfaces

• must_present (bool) – flag whether router should contain interface to port or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_presence(router, must_present=True, timeout=0)Verify step to check router is present.

Parameters

• router (dict) – router to check presence status

• must_present (bool) – flag whether router must present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_router_attrs(router, **kwargs)Step to check whether router has expected attributes or not.

Parameters

• router (dict) – router dict

• **kwargs – attributes to check

Raises AssertionError – if check failed

check_router_type_not_changed_to_centralized(router)Step to check router is not updated from distributed to centralized.

Parameters router (dict) – router dict

Raises AssertionError – if BadRequest is not appeared or exception message is unex-pected.

check_routers_count_for_agent(agent, expected_count, timeout=0)Step to check routers count for L3 agent.

Parameters

• agent (dict) – neutron agent dict to check routers count

178 Chapter 6. Deep to structure

Page 183: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• expected_count (int) – expected routers count for L3 agent

• timeout (int) – seconds to wait a result of check

Raises AssertionError – if check failed

check_subnet_interface_presence(router, subnet, must_present=True, timeout=0)Verify step to check subnet is in router interfaces.

Parameters

• router (dict) – router to check

• subnet (dict) – subnet to be found in router interfaces

• must_present (bool) – flag whether router should contain interface to subnet ornot

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_type_unchangeable_for_active_router(router)Step to check that router type can’t be changed for active router.

Parameters router (dict) – router dict

Raises AssertionError – if BadRequest is not appeared or exception message is unex-pected.

clear_gateway(router, check=True)Step to clear router gateway.

Parameters

• router (dict) – router

• check (bool) – flag whether to check step or not

create(router_name, distributed=None, check=True, **kwargs)Step to create router.

Parameters

• router_name (str) – router name

• distributed (bool) – should router be distributed

• check (bool) – flag whether to check step or not

• **kwargs – other arguments to pass to API

Returns router

Return type dict

delete(router, check=True)Step to delete router.

Parameters

• router (dict) – router

• check (bool) – flag whether to check step or not

get_router(**kwargs)Step to get router.

Parameters **kwargs – filter to match router

6.9. Neutron 179

Page 184: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Returns router

Return type dict

Raises LookupError – if zero or more than one routers found

get_routers(check=True)Step to retrieve all routers in current project.

Parameters check (bool) – flag whether to check step or not

Returns list of retrieved routers

Return type list

remove_port_interface(router, port, check=True)Step to remove router port interface.

After this, port can be also deleted.

Parameters

• router (dict) – router

• port (dict) – port

• check (bool) – flag whether to check step or not

remove_subnet_interface(router, subnet, check=True)Step to remove router to subnet interface.

Parameters

• router (dict) – router

• subnet (dict) – subnet

• check (bool, optional) – flag whether to check step or not

set_gateway(router, network, check=True)Step to set router gateway.

Parameters

• router (dict) – router

• network (dict) – network

• check (bool) – flag whether to check step or not

update_router(router, check=True, **kwargs)Step to update router attributes.

Parameters

• router (dict) – router dict

• check (bool) – flag whether to check step or not

• **kwargs – attributes to pass to API

Raises AssertionError – if check failed

class stepler.neutron.steps.SubnetSteps(client)Subnet steps.

check_negative_create_extra_subnet(network)Step to check that unable to create subnets more than quota.

180 Chapter 6. Deep to structure

Page 185: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters network (obj) – network

Raises AssertionError – if no OverQuotaClient exception occurs or exception messageis not expected

check_presence(subnet, must_present=True, timeout=0)Verify step to check subnet is present.

Parameters

• subnet (dict) – subnet to check presence status

• must_present (bool) – flag whether subnet must present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

create(subnet_name, network, cidr, check=True, **kwargs)Step to create subnet.

Parameters

• subnet_name (str) – subnet name

• network (dict) – network to create subnet on

• cidr (str) – cidr for subnet (like 192.168.1.0/24””)

• check (bool) – flag whether to check step or not

• **kwargs – other arguments to pass to API

Returns subnet

Return type dict

delete(subnet, check=True)Step to delete subnet.

Parameters

• subnet (dict) – subnet

• check (bool) – flag whether to check step or not

get_available_fixed_ips(subnet)Step to get available fixed ips from subnet.

Parameters subnet (obj) – subnet

Yields str – available ip address

Raises StopIteration – if there are no free ip addresses on subnet

Neutron tests

6.9. Neutron 181

Page 186: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Neutron l3 agent tests

stepler.neutron.tests.test_l3_agent.test_ban_all_l3_agents_restart_one(cirros_image,fla-vor,se-cu-rity_group,neu-tron_2_servers_diff_nets_with_floating,float-ing_ip,server_steps,os_faults_steps,agent_steps,agent_number)

Scenario: Ban all l3-agent agents and restart one.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router_1

5.Create server_1

6.Create network_2 with subnet_2

7.Create server_2 on another compute and connect it to network_2

8.Assign floating ips to servers

Steps:

1.Check that ping from server_1 to server_2 with floating ips and 8.8.8.8 is successful

2.Check that there is no ping between server_1 and server_2 via internal ips.

3.Get node with l3 agent for router_1

4.Ban l3 agent for the node with pcs

5.Wait for l3 agent becoming dead

6.Check that router_1 was rescheduled

7.Repeat last 3 steps for all l3 agents except for one

8.Ban the remaining l3 agent

9.Wait for l3 agent becoming dead if agent_number is not 0

10.Clear the first/last banned l3 agent

11.Wait for l3 agent becoming active

12.Boot server_3 in network_1

13.Associate floating ip for server_3

14.Ping server_1 and server_3 from each other with both ips

15.Ping server_2 and server_3 from each other with floating ip

182 Chapter 6. Deep to structure

Page 187: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

16.Check that ping from server_1 to 8.8.8.8 is successful

17.Check that ping from server_3 to 8.8.8.8 is successful

Teardown:

1.Delete servers

2.Delete networks, subnets, routers

3.Delete floating IPs

4.Delete security group

5.Delete cirros image

6.Delete flavor

stepler.neutron.tests.test_l3_agent.test_ban_l3_agent_many_times(cirros_image,flavor, secu-rity_group,float-ing_ip, neu-tron_2_servers_diff_nets_with_floating,server_steps,os_faults_steps,agent_steps)

Scenario: Ban l3-agent many times.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router_1

5.Create server_1

6.Create network_2 with subnet_2

7.Create server_2 on another compute and connect it to network_2

8.Assign floating ips to servers

Steps:

1.Ping server_1 and server_2 from each other with floatings ip

2.Ban all l3 agents except for one

3.Ban active l3 agent

4.Wait for l3 agent becoming dead

5.Clear l3 agent from the previous step

6.Wait for l3 agent becoming active

7.Repeat last 4 steps 40 times

8.Boot server_3 in network_1

9.Associate floating ip for server_3

10.Ping server_1 and server_3 from each other with both ips

6.9. Neutron 183

Page 188: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

11.Ping server_2 and server_3 from each other with floating ip

12.Check that ping from server_1 to 8.8.8.8 is successful

13.Check that ping from server_3 to 8.8.8.8 is successful

Teardown:

1.Delete servers

2.Delete networks, subnets, routers

3.Delete floating IPs

4.Delete security group

5.Delete cirros image

6.Delete flavor

stepler.neutron.tests.test_l3_agent.test_ban_some_l3_agents(cirros_image, flavor,security_group, neu-tron_2_servers_diff_nets_with_floating,floating_ip,server_steps,os_faults_steps,agent_steps,ban_count)

Scenario: Ban l3-agent and check that ping is available.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router1

5.Create server_1

6.Create network_2 with subnet_2

7.Create server_2 on another compute and connect it to network_2

8.Assign floating ips to servers

Steps:

1.Ping server_1 and server_2 from each other with floatings ip

2.Get node with l3 agent for router_1

3.Ban l3 agent for the node with pcs

4.Wait for l3 agent becoming dead

5.Check that router_1 was rescheduled

6.Repeat last 4 steps if ban_count is 2

7.Boot server_3 in network_1

8.Associate floating ip for server_3

9.Ping server_1 and server_3 from each other with internal ip

10.Ping server_2 and server_1 from each other with floating ip

184 Chapter 6. Deep to structure

Page 189: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

11.Ping server_2 and server_3 from each other with floating ip

Teardown:

1.Delete servers

2.Delete networks, subnets, routers

3.Delete floating IPs

4.Delete security group

5.Delete cirros image

6.Delete flavor

stepler.neutron.tests.test_l3_agent.test_check_l3_agent_after_destroy_controller(cirros_image,fla-vor,se-cu-rity_group,float-ing_ip,neu-tron_2_servers_diff_nets_with_floating,get_neutron_client,os_faults_steps,agent_steps,router_steps,server_steps,con-troller_cmd)

Scenario: Destroy controller and check L3 agent is alive.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router_1

5.Create server_1

6.Create network_2 with subnet_2

7.Create server_2 on another compute and connect it to network_2

8.Assign floating ips to servers

Steps:

1.Get primary/non-primary controller

2.Get L3 agent for primary/non-primary controller node

3.Reschedule router_1 to L3 agent on primary/non-primary controller if it is not there yet

4.Ping server_1 and server_2 from each other with floatings ip

5.Check that ping from server_1 and server_2 to 8.8.8.8 is successful

6.Destroy primary/non-primary controller

6.9. Neutron 185

Page 190: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

7.Wait for neutron availability

8.Wait for L3 agent becoming dead

9.Check that all routers rescheduled from primary/non-primary controller

10.Boot server_3 in network_1

11.Associate floating ip for server_3

12.Ping server_1 and server_3 from each other with both ips

13.Ping server_2 and server_3 from each other with floating ip

14.Check that ping from server_1 to 8.8.8.8 is successful

15.Check that ping from server_3 to 8.8.8.8 is successful

Teardown:

1.Delete servers

2.Delete networks, subnets, routers

3.Delete floating IPs

4.Delete security group

5.Delete cirros image

6.Delete flavor

stepler.neutron.tests.test_l3_agent.test_check_l3_agent_after_reset_primary_controller(cirros_image,fla-vor,se-cu-rity_group,float-ing_ip,neu-tron_2_servers_diff_nets_with_floating,get_neutron_client,os_faults_steps,agent_steps,router_steps,server_steps)

Scenario: Reset controller and check L3 agent is alive.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router_1

5.Create server_1

6.Create network_2 with subnet_2

7.Create server_2 on another compute and connect it to network_2

8.Assign floating ips to servers

186 Chapter 6. Deep to structure

Page 191: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Steps:

1.Get primary controller

2.Get L3 agent for primary controller node

3.Reschedule router_1 to L3 agent on primary controller if it is not there yet

4.Ping server_1 and server_2 from each other with floatings ip

5.Check that ping from server_1 and server_2 to 8.8.8.8 is successful

6.Reset or reboot primary controller

7.Wait for neutron availability

8.Wait for L3 agent becoming dead

9.Check that all routers rescheduled from primary controller

10.Boot server_3 in network_1

11.Associate floating ip for server_3

12.Ping server_1 and server_3 from each other with both ips

13.Ping server_2 and server_3 from each other with floating ip

14.Check that ping from server_1 to 8.8.8.8 is successful

15.Check that ping from server_3 to 8.8.8.8 is successful

Teardown:

1.Delete servers

2.Delete networks, subnets, routers

3.Delete floating IPs

4.Delete security group

5.Delete cirros image

6.Delete flavor

stepler.neutron.tests.test_l3_agent.test_kill_l3_agent_process(cirros_image,flavor, secu-rity_group,floating_ip, neu-tron_2_servers_diff_nets_with_floating,server_steps,os_faults_steps,agent_steps)

Scenario: Kill l3-agent process and check that ping is available.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router1

5.Create server_1

6.Create network_2 with subnet_2

6.9. Neutron 187

Page 192: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

7.Create server_2 on another compute and connect it to network_2

8.Assign floating ips to servers

Steps:

1.Ping server_1 and server_2 from each other with floatings ip

2.Get node with l3 agent for router_1

3.Get PID of l3 agent process

4.Send SIGKILL to the process

5.Wait for l3 agent becoming active

6.Boot server_3 in network_1

7.Associate floating ip for server_3

8.Ping server_1 and server_3 from each other with internal ip

9.Ping server_2 and server_1 from each other with floating ip

10.Ping server_2 and server_3 from each other with floating ip

Teardown:

1.Delete servers

2.Delete networks, subnets, routers

3.Delete floating IPs

4.Delete security group

5.Delete cirros image

6.Delete flavor

stepler.neutron.tests.test_l3_agent.test_l3_agent_after_drop_rabbit_port(neutron_2_servers_diff_nets_with_floating,server_steps,os_faults_steps,agent_steps)

Scenario: Drop rabbit port and check l3-agent work.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router_1

5.Create server_1

6.Create network_2 with subnet_2

7.Create server_2 on another compute and connect it to network_2

8.Assign floating ips to servers

Steps:

1.Ping server_1 and server_2 from each other with floatings ip

2.Get node with l3 agent for router_1

3.Drop rabbit’s port 5673 using iptables

188 Chapter 6. Deep to structure

Page 193: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

4.Wait for l3 agent becoming dead

5.Check that router_1 was rescheduled

6.Ping server_1 and server_2 from each other with floatings ip

7.Remove rule for dropping port using iptables

8.Wait for l3 agent becoming active

Teardown:

1.Delete servers

2.Delete networks, subnets, routers

3.Delete floating IPs

4.Delete security group

5.Delete cirros image

6.Delete flavor

Neutron DHCP agent tests

stepler.neutron.tests.test_dhcp_agent.test_ban_all_dhcp_agents_restart_first(network,float-ing_ip,server,server_steps,os_faults_steps,agent_steps,net-work_steps)

Scenario: Ban all DHCP agents and restart the first banned.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and router

5.Create floating ip

6.Create server

Steps:

1.Assign floating ip to server

2.Check DHCP with cirros-dhcpc command on server with sudo

3.Get free DHCP agents

4.Get nodes with free DHCP agents

5.Ban all free DHCP agents for nodes with pcs

6.Kill all dnsmasq processes for nodes

7.Wait for DHCP agents becoming dead

6.9. Neutron 189

Page 194: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

8.Get 2 nodes with DHCP agents for network

9.Ban 2 DHCP agents for nodes with pcs

10.Kill all dnsmasq processes for nodes

11.Wait for DHCP agents becoming dead

12.Get node for the first banned dhcp-agent

13.Clear the first banned dhcp-agent

14.Check that cleared dhcp-agent is active

15.Check that all dhcp-agents except for the first banned don’t in dhcp-agents list for network

16.Check that network is on the dhcp-agent which has been cleared

17.Check that all networks except for external are on the cleared dhcp-agent

18.Check DHCP with cirros-dhcpc command on server with sudo

Teardown:

1.Delete server

2.Delete floating ip

3.Delete network, subnet, router

4.Delete security group

5.Delete flavor

6.Delete cirros image

stepler.neutron.tests.test_dhcp_agent.test_ban_all_dhcp_agents_restart_one(network,float-ing_ip,server,server_steps,os_faults_steps,agent_steps,net-work_steps)

Scenario: Ban all DHCP agents and restart the last banned.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and router

5.Create floating ip

6.Create server

Steps:

1.Assign floating ip to server

2.Check DHCP with cirros-dhcpc command on server with sudo

3.Get all existing DHCP agents

190 Chapter 6. Deep to structure

Page 195: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

4.Get 2 nodes with DHCP agents for network

5.Ban 2 DHCP agents for nodes with pcs

6.Wait for DHCP agents becoming dead

7.Check that banned dhcp-agents don’t in dhcp-agents list for network

8.Get new node with DHCP agent for network

9.Ban DHCP agent for node with pcs

10.Wait for DHCP agent becoming dead

11.Check that banned dhcp-agent is dead

12.Repeat last 4 steps for all active DHCP agents

13.Clear the last banned dhcp-agent

14.Check that cleared dhcp-agent is active

15.Check that network is on the dhcp-agent which has been cleared

16.Check DHCP with cirros-dhcpc command on server with sudo

17.Check that all networks except for external are on the cleared dhcp-agent

Teardown:

1.Delete server

2.Delete floating ip

3.Delete network, subnet, router

4.Delete security group

5.Delete flavor

6.Delete cirros image

stepler.neutron.tests.test_dhcp_agent.test_ban_dhcp_agent_many_times(network,float-ing_ip,server,server_steps,os_faults_steps,agent_steps)

Scenario: Ban dhcp-agent many times.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and router

5.Create floating ip

6.Create server

Steps:

1.Assign floating ip to server

2.Check DHCP with cirros-dhcpc command on server with sudo

6.9. Neutron 191

Page 196: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

3.Get nodes with DHCP agents not hosting network

4.Ban all DHCP agents not hosting network

5.Wait for banned DHCP agents becoming dead

6.Get node with DHCP agent for network

7.Ban DHCP agent for network with pcs

8.Clear DHCP agent for network with pcs

9.Repeat last 2 steps 40 times

10.Check that neutron agent from the previous step is alive

11.Check that network is on 2 health DHCP-agents

12.Check DHCP with cirros-dhcpc command on server with sudo

Teardown:

1.Delete server

2.Delete floating ip

3.Delete network, subnet, router

4.Delete security group

5.Delete flavor

6.Delete cirros image

stepler.neutron.tests.test_dhcp_agent.test_ban_some_dhcp_agents(network, float-ing_ip, server,server_steps,os_faults_steps,agent_steps,ban_count)

Scenario: Ban dhcp-agent and check cirros-dhcpc command on server.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and router

5.Create floating ip

6.Create server

Steps:

1.Assign floating ip to server

2.Check DHCP with cirros-dhcpc command on server with sudo

3.Get node with DHCP agent for network

4.Ban DHCP agent for the node with pcs

5.Wait for DHCP agent becoming dead

6.Check that killed dhcp-agent does not in dhcp-agents list for network

192 Chapter 6. Deep to structure

Page 197: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

7.Repeat last 4 steps if ban_count is 2

8.Check that this network is on another health dhcp-agent

9.Check DHCP with cirros-dhcpc command on server with sudo

Teardown:

1.Delete server

2.Delete floating ip

3.Delete network, subnet, router

4.Delete security group

5.Delete flavor

6.Delete cirros image

stepler.neutron.tests.test_dhcp_agent.test_ban_two_dhcp_and_two_l3_agents(router,cre-ate_max_networks_with_instances,agent_steps,os_faults_steps)

Scenario: Ban two DHCP and L3 agents and check logs.

Note: This test verifies bug #1493754 and #1651442

Setup:

1.Increase neutron quotas

2.Create cirros image

3.Create flavor

4.Create security group

Steps:

1.Get all controllers

2.Get the last line number for neutron server log for all controllers

3.Create max possible count of networks, connect all networks to router with external network

4.Create and delete server for each network

5.Get nodes with DHCP agents for network

6.Ban DHCP agents for nodes with pcs

7.Wait for DHCP agents becoming dead

8.Check that banned dhcp-agents don’t in dhcp-agents list for network

9.Get node with l3 agent for router

10.Ban l3 agent for the node with pcs

11.Wait for l3 agent becoming dead

12.Repeat last 3 steps once

13.Check that router rescheduled from l3 agents

14.Check there are no new ERROR logs in neutron-server log files

Teardown:

6.9. Neutron 193

Page 198: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Delete all created networks, subnets and router

2.Delete security group

3.Delete flavor

4.Delete cirros image

stepler.neutron.tests.test_dhcp_agent.test_change_default_dhcp_agents_count_for_net(network,server,float-ing_ip,server_steps,os_faults_steps,agent_steps,agents_count_for_net)

Scenario: Change default DHCP agents count for network.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and router

5.Create floating ip

6.Create server

Steps:

1.Assign floating ip to server

2.Check DHCP with cirros-dhcpc command on server with sudo

3.Check that agents count is the same as expected

4.Get all DHCP agents count

5.Get node with DHCP agent for network

6.Ban DHCP agent for node with pcs

7.Wait for DHCP agent becoming dead

8.Check that banned dhcp-agent doesn’t in dhcp-agents list for network

9.Check that agents count equals to the value from config or to free agents count

10.Repeat last 5 steps for all active DHCP agents except for one

11.Get node with DHCP agent for network

12.Ban DHCP agent for node with pcs

13.Wait for DHCP agent becoming dead

14.Clear the last banned dhcp-agent

15.Check that cleared dhcp-agent is active

16.Check that network is on the one dhcp-agent which has been cleared

17.Check DHCP with cirros-dhcpc command on server with sudo

Teardown:

194 Chapter 6. Deep to structure

Page 199: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Delete server

2.Delete floating ip

3.Delete network, subnet, router

4.Delete security group

5.Delete flavor

6.Delete cirros image

stepler.neutron.tests.test_dhcp_agent.test_check_dhcp_agents_for_net_after_restart(router,cre-ate_max_networks_with_instances,agent_steps,os_faults_steps)

Scenario: Check dhcp-agents assinged to network after restart.

Note: This test verifies bug #1506198

Setup:

1.Increase neutron quotas

2.Create cirros image

3.Create flavor

4.Create security group

Steps:

1.Create max possible count of networks, connect all networks to router with external network

2.Create and delete server for each network

3.Check DHCP agents count for the first network

4.Get all nodes with DHCP agents

5.Disable all DHCP agents

6.Wait for DHCP agents becoming dead

7.Enable all DHCP agents

8.Wait for DHCP agents becoming alive

9.Check that DHCP agents count for the first network is the same as before restart

Teardown:

1.Delete all created networks, subnets and router

2.Delete security group

3.Delete flavor

4.Delete cirros image

stepler.neutron.tests.test_dhcp_agent.test_check_nets_count_for_agents_nearly_equals(router,cre-ate_max_networks_with_instances,net-work_steps,agent_steps)

Scenario: Check that nets count for DHCP agents nearly equals.

6.9. Neutron 195

Page 200: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Setup:

1.Increase neutron quotas

2.Create cirros image

3.Create flavor

4.Create security group

Steps:

1.Create max possible count of networks, connect all networks to router with external network

2.Create and delete server for each network

3.Check that quantity of nets on DHCP agents is nearly the same

Teardown:

1.Delete all created networks, subnets and router

2.Delete security group

3.Delete flavor

4.Delete cirros image

stepler.neutron.tests.test_dhcp_agent.test_check_port_binding_after_node_restart(router,cre-ate_max_networks_with_instances,get_neutron_client,port_steps,agent_steps,os_faults_steps)

Scenario: Check port binding after node restart.

Note: This test verifies bug #1501070

Setup:

1.Increase neutron quotas

2.Create cirros image

3.Create flavor

4.Create security group

Steps:

1.Create max possible count of networks, connect all networks to router with external network

2.Create and delete server for each network

3.Check ports on the first network

4.Check host binding for all ports

5.Get DHCP agent for the first network

6.Get node with DHCP agent for network

7.Destroy node with DHCP agent

8.Wait for neutron availability

9.Wait for DHCP agent becoming dead

10.Start node with DHCP agent

196 Chapter 6. Deep to structure

Page 201: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

11.Wait for DHCP agent becoming alive

12.Check ports on network

13.Check that ports ids are the same as before destroying node

14.Check that network rescheduled from one DHCP agent to another and only one host bindingchanged after restart.

Teardown:

1.Delete all created networks, subnets and router

2.Delete security group

3.Delete flavor

4.Delete cirros image

stepler.neutron.tests.test_dhcp_agent.test_check_tap_interfaces_for_net_after_restart(router,cre-ate_max_networks_with_instances,port_steps,agent_steps,os_faults_steps)

Scenario: Check all taps ids are unique after DHCP agents restart.

Note: This test verifies bug #1499914

Setup:

1.Increase neutron quotas

2.Create cirros image

3.Create flavor

4.Create security group

Steps:

1.Create max possible count of networks, connect all networks to router with external network

2.Create and delete server for each network

3.Get all DHCP ports

4.Get all nodes with DHCP agents

5.Disable all DHCP agents

6.Wait for DHCP agents becoming dead

7.Make all DHCP ports ‘reserved_dhcp_port’

8.Enable all DHCP agents

9.Wait for DHCP agents becoming alive

10.Check all taps ids are unique for all networks on all controllers

Teardown:

1.Delete all created networks, subnets and router

2.Delete security group

3.Delete flavor

4.Delete cirros image

6.9. Neutron 197

Page 202: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.neutron.tests.test_dhcp_agent.test_destroy_controller_check_dhcp(network,server,float-ing_ip,get_network_steps,server_steps,os_faults_steps,agent_steps,con-troller_cmd)

Scenario: Destroy controller and check DHCP.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and router

5.Create floating ip

6.Create server

Steps:

1.Assign floating ip to server

2.Get primary/non-primary controller

3.Get DHCP agent for primary/non-primary controller node

4.Reschedule network to DHCP agent on primary/non-primary controller if it is not there yet

5.Check DHCP with cirros-dhcpc command on server with sudo

6.Destroy primary/non-primary controller

7.Wait for neutron availability

8.Wait for primary/non-primary controller’s DHCP agent becoming dead

9.Check that dhcp-agent does not in dhcp-agents list for network

10.Check that network is on 2 healthy agents

11.Check that all networks rescheduled from primary/non-primary controller

12.Check DHCP with cirros-dhcpc command on server with sudo

Teardown:

1.Delete server

2.Delete floating ip

3.Delete network, subnet, router

4.Delete security group

5.Delete flavor

6.Delete cirros image

198 Chapter 6. Deep to structure

Page 203: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.neutron.tests.test_dhcp_agent.test_dhcp_agent_after_drop_rabbit_port(network,float-ing_ip,server,server_steps,os_faults_steps,agent_steps)

Scenario: Drop rabbit port and check dhcp-agent work.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and router

5.Create floating ip

6.Create server

Steps:

1.Assign floating ip to server

2.Check DHCP with cirros-dhcpc command on server with sudo

3.Get node with DHCP agent for network

4.Drop rabbit’s port 5673 using iptables for node from the previous step

5.Wait for DHCP agent becoming dead

6.Check that dhcp-agent does not in dhcp-agents list for network

7.Check that network is on 2 health DHCP-agents

8.Check DHCP with cirros-dhcpc command on server with sudo

9.Remove rule for dropping port using iptables

10.Check that all neutron agents are alive

Teardown:

1.Delete server

2.Delete floating ip

3.Delete network, subnet, router

4.Delete security group

5.Delete flavor

6.Delete cirros image

stepler.neutron.tests.test_dhcp_agent.test_dhcp_alive_after_primary_controller_reset(network,server,float-ing_ip,get_network_steps,server_steps,os_faults_steps,agent_steps)

6.9. Neutron 199

Page 204: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Scenario: Reset primary controller and check DHCP is alive.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and router

5.Create floating ip

6.Create server

Steps:

1.Assign floating ip to server

2.Get primary controller

3.Get DHCP agent for primary controller node

4.Reschedule network to DHCP agent on primary controller if it is not there yet

5.Check DHCP with cirros-dhcpc command on server with sudo

6.Reset primary controller

7.Wait for neutron availability

8.Wait for primary controller’s DHCP agent becoming dead

9.Check that dhcp-agent does not in dhcp-agents list for network

10.Check that all networks rescheduled from primary controller

11.Check DHCP with cirros-dhcpc command on server with sudo

Teardown:

1.Delete server

2.Delete floating ip

3.Delete network, subnet, router

4.Delete security group

5.Delete flavor

6.Delete cirros image

stepler.neutron.tests.test_dhcp_agent.test_kill_check_dhcp_agents(network,floating_ip,server,server_steps,os_faults_steps,agent_steps)

Scenario: Kill process and check dhcp-agents.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

200 Chapter 6. Deep to structure

Page 205: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

4.Create network with subnet and router

5.Create floating ip

6.Create server

Steps:

1.Assign floating ip to server

2.Check DHCP on cirros-dhcpc command on server with sudo

3.Get node with DHCP agent for network

4.Kill dhcp-agent process

5.Wait and check that dhcp agent has status active

6.Check that network is on the health dhcp-agents

7.Check DHCP on cirros-dhcpc command on server with sudo

Teardown:

1.Delete server

2.Delete floating ip

3.Delete network, subnet, router

4.Delete security group

5.Delete flavor

6.Delete cirros image

stepler.neutron.tests.test_dhcp_agent.test_manually_rescheduling_dhcp_agent(network,float-ing_ip,server,server_steps,port_steps,agent_steps)

Scenario: Manually reschedule dhcp-agent.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and router

5.Create floating ip

6.Create server

Steps:

1.Assign floating ip to server

2.Check DHCP on cirros-dhcpc command on server with sudo

3.Get node with DHCP agent for network

4.Check ports on net

5.Reschedule network from DHCP agent

6.9. Neutron 201

Page 206: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

6.Check that the network is moved from this dhcp-agent

7.Set network to another dhcp-agent

8.Check that the network moved to this dhcp-agent

9.Check that ports haven’t been changed

Teardown:

1.Delete server

2.Delete floating ip

3.Delete network, subnet, router

4.Delete security group

5.Delete flavor

6.Delete cirros image

Neutron OVS restart tests

stepler.neutron.tests.test_ovs_restart.test_no_connectivity_with_different_routers_during_restart(neutron_2_servers_different_networks,float-ing_ip,server_steps,os_faults_steps,agent_steps)

Scenario: Check connectivity between networks on different routers.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router_1

5.Create network_2 with subnet_2 and router_2

6.Create server_1

7.Create server_2 on another compute and connect it to network_2

8.Create floating ip

Steps:

1.Attach floating IP to server_1

2.Check that there is no ping between server_1 and server_2

3.Restart ovs-agents

4.Check that there is no ping between server_1 and server_2 during restart

Teardown:

1.Delete servers

2.Delete networks, subnets, routers

3.Delete floating IP

202 Chapter 6. Deep to structure

Page 207: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

4.Delete security group

5.Delete cirros image

6.Delete flavor

stepler.neutron.tests.test_ovs_restart.test_port_tags_immutable_after_restart(os_faults_steps)Check that ports tags are the same after ovs-agents restart.

Steps:

1.Collect ovs-vsctl tags before restart

2.Restart ovs-agents

3.Collect ovs-vsctl tags after restart

4.Check that values of the tag parameter for every port remain the same

stepler.neutron.tests.test_ovs_restart.test_restart_adds_new_flows(server,os_faults_steps,agent_steps)

Scenario: Check that new flows are added after OVS-agents restart.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and router

5.Create server

Steps:

1.Get list of flows for br_int on server’s compute

2.Check that all cookies for flows is same

3.Restart ovs-agents

4.Get list of flows for br_int on server’s compute

5.Check that all cookies are changed

Teardown:

1.Delete servers

2.Delete network, subnet, router

3.Delete floating IP

4.Delete security group

5.Delete cirros image

6.Delete flavor

stepler.neutron.tests.test_ovs_restart.test_restart_many_times(neutron_2_servers_different_networks,floating_ip,server_steps,os_faults_steps,agent_steps)

Scenario: Restart OVS-agents many times.

6.9. Neutron 203

Page 208: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router

5.Create server_1

6.Create floating ip

7.Create network_2 with subnet_2

8.Add network_2 interface to router

9.Create server_2 on another compute and connect it to network_2

Steps:

1.Attach floating IP to server_1

2.Start ping from server_1 to server_2

3.Restart ovs-agents

4.Check that ping loss is not more than 2

5.Repeat last 3 steps 40 times

Teardown:

1.Delete servers

2.Delete networks, subnets, router

3.Delete floating IP

4.Delete security group

5.Delete cirros image

6.Delete flavor

stepler.neutron.tests.test_ovs_restart.test_restart_servers_on_single_compute(neutron_2_servers_same_network,float-ing_ip,server_steps,os_faults_steps,agent_steps)

Scenario: Check connectivity for same host servers and one network.

This test checks connectivity for instances scheduled on a single compute in a single private network duringOVS-agents restating.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and router

5.Create server_1

6.Create floating ip

204 Chapter 6. Deep to structure

Page 209: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

7.Create server_2 on same compute as server_1 and connect it to network

Steps:

1.Attach floating IP to server_1

2.Start arping from server_1 to server_2

3.Restart ovs-agents

4.Check that ping loss is not more than 50

Teardown:

1.Delete servers

2.Delete network, subnet, router

3.Delete floating IP

4.Delete security group

5.Delete cirros image

6.Delete flavor

stepler.neutron.tests.test_ovs_restart.test_restart_with_broadcast_traffic(neutron_2_servers_same_network,float-ing_ip,server_steps,os_faults_steps,agent_steps)

Scenario: Restart OVS-agents with broadcast traffic on background.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and router

5.Create server_1

6.Create floating ip

7.Create server_2 on another compute and connect it to network

Steps:

1.Attach floating IP to server_1

2.Start arping from server_1 to server_2

3.Restart ovs-agents

4.Check that ping loss is not more than 50

Teardown:

1.Delete servers

2.Delete network, subnet, router

3.Delete floating IP

4.Delete security group

6.9. Neutron 205

Page 210: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

5.Delete cirros image

6.Delete flavor

stepler.neutron.tests.test_ovs_restart.test_restart_with_iperf_traffic(neutron_2_servers_iperf_different_networks,float-ing_ip,server_steps,os_faults_steps,agent_steps)

Scenario: Restart OVS-agents with broadcast traffic on background.

Setup:

1.Create ubuntu image

2.Create flavor

3.Create security group

4.Create network with subnet and router

5.Create network_2 with subnet_2

6.Create server_1

7.Create server_2 on another compute and connect it to network

8.Create floating ip

Steps:

1.Attach floating IP to server_1

2.Start iperf traffic from server_1 to server_2, wait it done

3.Check that iperf loss is close to 0

4.Start iperf traffic from server_1 to server_2

5.Restart ovs-agents

6.Check that iperf loss is not more than 10%

Teardown:

1.Delete servers

2.Delete network, subnet, router

3.Delete floating IP

4.Delete security group

5.Delete ubuntu image

6.Delete flavor

stepler.neutron.tests.test_ovs_restart.test_restart_with_pcs_ban_clear(neutron_2_servers_different_networks,float-ing_ip,server_steps,os_faults_steps)

Scenario: Restart OVS-agents with pcs ban/clear on controllers.

Setup:

1.Create cirros image

206 Chapter 6. Deep to structure

Page 211: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router

5.Create server_1

6.Create floating ip

7.Create network_2 with subnet_2

8.Add network_2 interface to router

9.Create server_2 on another compute and connect it to network_2

Steps:

1.Attach floating IP to server_1

2.Check ping from server_1 to server_2

3.Restart ovs-agents with pcs ban/clear on controllers

4.Check ping from server_1 to server_2

Teardown:

1.Delete servers

2.Delete networks, subnets, router

3.Delete floating IP

4.Delete security group

5.Delete cirros image

6.Delete flavor

stepler.neutron.tests.test_ovs_restart.test_restart_with_pcs_disable_enable(neutron_2_servers_different_networks,float-ing_ip,server_steps,os_faults_steps)

Scenario: Restart OVS-agents with pcs disable/enable on controllers.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router

5.Create server_1

6.Create floating ip

7.Create network_2 with subnet_2

8.Add network_2 interface to router

9.Create server_2 on another compute and connect it to network_2

Steps:

1.Attach floating IP to server_1

6.9. Neutron 207

Page 212: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Check ping from server_1 to server_2

3.Restart ovs-agents with pcs enable/disable on controllers

4.Check ping from server_1 to server_2

Teardown:

1.Delete servers

2.Delete networks, subnets, router

3.Delete floating IP

4.Delete security group

5.Delete cirros image

6.Delete flavor

Neutron DVR tests

stepler.neutron.tests.test_dvr.test_add_router_interface_with_port_id(create_router,port,router_steps,os_faults_steps)

Scenario: Add router interface with port_id parameter.

This test checks that there are no error messages in logs when adding router interface with port_id parameter.

Setup:

1.Create network with subnet

2.Create port

Steps:

1.Get current sizes of neutron log files on controllers

2.Create router of distributed type

3.Add port interface to router

4.Wait for 30 seconds

5.Check that message ‘Could not retrieve gateway port for subnet’ did not appear in log files

Teardown:

1.Delete port interface

2.Delete port

3.Delete router

4.Delete subnet and network

208 Chapter 6. Deep to structure

Page 213: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.neutron.tests.test_dvr.test_associate_floating_ip_after_restart_l3_on_compute(cirros_image,fla-vor,se-cu-rity_group,net_subnet_router,server,float-ing_ip,cre-ate_floating_ip,os_faults_steps,server_steps)

Scenario: Check floating ip association after restart l3 agent.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and DVR

5.Add network interface to router

6.Create server

Steps:

1.Assign floating ip to server

2.Check that ping from server to 8.8.8.8 is successful

3.Restart L3 service on compute with server

4.Boot server_2 on the compute where the l3-agent has been restarted

5.Assign floating ip to server_2

6.Check pings between server and server_2 via floating ip

Teardown:

1.Delete servers

2.Delete cirros image

3.Delete security group

4.Delete flavor

5.Delete router

6.Delete subnet

7.Delete network

6.9. Neutron 209

Page 214: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.neutron.tests.test_dvr.test_check_ban_l3_agent_on_node_with_snat(net_subnet_router,server,get_ssh_proxy_cmd,agent_steps,os_faults_steps,server_steps,ban_count)

Scenario: Check North-South after ban L3 agent on node with SNAT.

This test checks North-South connectivity without floating after ban L3 agent on node with SNAT.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and DVR

5.Add network interface to router

6.Create server

Steps:

1.Check that ping from server to 8.8.8.8 is successful

2.Find node with SNAT for router and ban L3 agent on it

3.Wait for another L3 agent becomes ACTIVE

4.Repeat last 2 steps ban_count times

5.Check that ping from server to 8.8.8.8 is successful

Teardown:

1.Delete server

2.Delete cirros image

3.Delete security group

4.Delete flavor

5.Delete router

6.Delete subnet

7.Delete network

stepler.neutron.tests.test_dvr.test_check_ban_l3_agents_and_clear_one(net_subnet_router,server,get_ssh_proxy_cmd,agent_steps,os_faults_steps,server_steps,agent_number)

Scenario: Check North-South after ban L3 agent on node with SNAT.

This test checks North-South connectivity without floating after ban all L3 agents on nodes with SNATand clear the first/last one.

Setup:

210 Chapter 6. Deep to structure

Page 215: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and DVR

5.Add network interface to router

6.Create server

Steps:

1.Check that ping from server to 8.8.8.8 is successful

2.Find node with snat for router and ban L3 agent on it

3.Wait for another L3 agent becomes ACTIVE

4.Repeat last 2 steps while no L3 agents will be ACTIVE

5.Clear the first/last banned L3 agent

6.Wait for L3 agent becomes ACTIVE

7.Check that ping from server to 8.8.8.8 is successful

Teardown:

1.Delete server

2.Delete cirros image

3.Delete security group

4.Delete flavor

5.Delete router

6.Delete subnet

7.Delete network

stepler.neutron.tests.test_dvr.test_check_connectivity_to_north_south_routing(server,float-ing_ip,server_steps)

Scenario: Check connectivity to North-South-Routing.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and DVR

5.Add network interface to router

6.Create server

Steps:

1.Assign floating ip to server

2.Check that ping from server to 8.8.8.8 is successful

Teardown:

6.9. Neutron 211

Page 216: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Delete server

2.Delete cirros image

3.Delete security group

4.Delete flavor

5.Delete router

6.Delete subnet

7.Delete network

stepler.neutron.tests.test_dvr.test_check_east_west_connectivity_between_instances(neutron_2_servers_different_networks,float-ing_ip,server_steps)

Scenario: Check east-west connectivity between instances.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and DVR

5.Create server_1

6.Create network_2 with subnet_2

7.Add network_2 interface to router

8.Create server_2 and connect it to network_2

Steps:

1.Assign floating ip to server_1

2.Check that ping from server_1 to server_2 is successful

Teardown:

1.Delete servers

2.Delete cirros image

3.Delete security group

4.Delete flavor

5.Delete router

6.Delete subnets

7.Delete networks

stepler.neutron.tests.test_dvr.test_check_router_namespace_on_compute_node(net_subnet_router,server,os_faults_steps,server_steps)

Scenario: Check router namespace with server and without it.

This test check router namespace on compute node with server and after server deletion.

Setup:

212 Chapter 6. Deep to structure

Page 217: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and DVR

5.Add network interface to router

6.Create server

Steps:

1.Check that router namespace is on compute node where server is hosted

2.Delete server

3.Check that router namespace is deleted

Teardown:

1.Delete server (if it was not removed)

2.Delete cirros image

3.Delete security group

4.Delete flavor

5.Delete router

6.Delete subnet

7.Delete network

stepler.neutron.tests.test_dvr.test_check_router_update_notification_for_l3_agents(cirros_image,fla-vor,se-cu-rity_group,net_subnet_router,float-ing_ip,server_steps,host_steps,os_faults_steps)

Scenario: Check router update notifications for L3 agent.

This test checks that router update notification appear in log of L3 agent after server creation and assign-ing/deleting floating ip but only in log on compute node where server is hosted.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and DVR

5.Add network interface to router

Steps:

1.Get current sizes of log files of L3 agent on all computes

6.9. Neutron 213

Page 218: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Create server

3.Assign floating ip to server

4.Delete floating ip from server

5.Check that 3 notifications have appeared in log of L3 agent on compute with server

6.Check that no notifications have appeared in log of L3 agent on other computes

Teardown:

1.Delete server

2.Delete cirros image

3.Delete security group

4.Delete flavor

5.Delete router

6.Delete subnet

7.Delete network

stepler.neutron.tests.test_dvr.test_connectivity_after_ban_l3_agent_many_times(net_subnet_router,server,get_ssh_proxy_cmd,agent_steps,os_faults_steps,server_steps)

Scenario: Check North-South after ban/clear L3 agent on controller.

This test checks North-South connectivity without floating IP after ban and clear L3 agent on controllerwith SNAT many times.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and centralized router.

5.Add network interface to router

6.Create server

Steps:

1.Check that ping from server to 8.8.8.8 is successful

2.Find node with SNAT for router

3.Ban all L3 agents on other controller

4.Ban and clear L3 agent on controller with snat 40 times

5.Wait for L3 agent becomes ACTIVE

6.Check that ping from server to 8.8.8.8 is successful

Teardown:

1.Delete server

2.Delete cirros image

214 Chapter 6. Deep to structure

Page 219: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

3.Delete security group

4.Delete flavor

5.Delete router

6.Delete subnet

7.Delete network

stepler.neutron.tests.test_dvr.test_east_west_connectivity_after_ban_clear_l3_on_compute(neutron_2_servers_different_networks,get_ssh_proxy_cmd,os_faults_steps,server_steps)

Scenario: Check east-west connectivity after ban/clear l3 agent.

This test checks east-west connectivity between instances on different computes after ban and clear l3agent on one of them.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and DVR

5.Create server_1

6.Create network_2 with subnet_2

7.Add network_2 interface to router

8.Create server_2 and connect it to network_2

Steps:

1.Terminate l3-service on the compute with server_1

2.Start l3-service on the compute with server_1

3.Check that ping from server_1 to server_2 by internal ip is successful

Teardown:

1.Delete servers

2.Delete cirros image

3.Delete security group

4.Delete flavor

5.Delete router

6.Delete subnets

7.Delete networks

stepler.neutron.tests.test_dvr.test_east_west_connectivity_after_destroy_controller(neutron_2_servers_different_networks,get_ssh_proxy_cmd,os_faults_steps,server_steps)

Scenario: Check east-west connectivity after destroy controller.

This test checks east-west connectivity between instances on different hosts after destroy of controller.

6.9. Neutron 215

Page 220: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and DVR

5.Create server_1

6.Create network_2 with subnet_2

7.Add network_2 interface to router

8.Create server_2 and connect it to network_2

Steps:

1.Check that ping from server_1 to server_2 by internal ip is successful

2.Destroy any controller

3.Check that ping from server_2 to server_1 by internal ip is successful

Teardown:

1.Delete servers

2.Delete cirros image

3.Delete security group

4.Delete flavor

5.Delete router

6.Delete subnets

7.Delete networks

stepler.neutron.tests.test_dvr.test_east_west_connectivity_after_reset_computes(neutron_2_servers_different_networks,get_ssh_proxy_cmd,os_faults_steps,server_steps)

Scenario: Check east-west connectivity after reset computes.

This test checks east-west connectivity between instances on different hosts after reset of computes.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and DVR

5.Create server_1

6.Create network_2 with subnet_2

7.Add network_2 interface to router

8.Create server_2 and connect it to network_2

Steps:

1.Check that ping from server_1 to server_2 by internal ip is successful

216 Chapter 6. Deep to structure

Page 221: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Destroy computes where servers are hosted

3.Start computes where servers are hosted

4.Check that ping from server_2 to server_1 by internal ip is successful

Teardown:

1.Delete servers

2.Delete cirros image

3.Delete security group

4.Delete flavor

5.Delete router

6.Delete subnets

7.Delete networks

stepler.neutron.tests.test_dvr.test_instance_connectivity_after_l3_agent_restart(cirros_image,fla-vor,se-cu-rity_group,pub-lic_network,cre-ate_network,cre-ate_subnet,cre-ate_router,cre-ate_floating_ip,router_steps,server_steps,hy-per-vi-sor_steps,host_steps,os_faults_steps,agent_steps)

Scenario: Check instances connectivity after restarting l3 agent.

Setup:

1.Increase neutron quotas

2.Create cirros image

3.Create security group

Steps:

1.Create 10 networks, subnets and routers

2.Create 10 servers on one compute

3.For each server, create floating ip and attach it to server

6.9. Neutron 217

Page 222: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

4.Check that ping from one server to 8.8.8.8 is successful

5.Restart L3 agent on compute 60 times

6.Check that ping from all servers to 8.8.8.8 are successful

Teardown:

1.Delete servers

2.Delete floating IPs

3.Delete networks, subnets, routers

4.Delete security group

5.Delete cirros image

6.Restore original neutron quotas

stepler.neutron.tests.test_dvr.test_north_south_connectivity_after_ban_clear_l3_on_compute(server,float-ing_ip,os_faults_steps,server_steps)

Scenario: Check North-South connectivity after ban/clear l3 agent.

This test checks connectivity to North-South-Routing after ban and clear L3 agent on compute.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and DVR

5.Add network interface to router

6.Create server

Steps:

1.Assign floating ip to server

2.Check that ping from server to 8.8.8.8 is successful

3.Terminate L3 service on compute with server

4.Start L3 service on compute with server

5.Check that ping from server to 8.8.8.8 is successful

Teardown:

1.Delete server

2.Delete cirros image

3.Delete security group

4.Delete flavor

5.Delete router

6.Delete subnet

7.Delete network

218 Chapter 6. Deep to structure

Page 223: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.neutron.tests.test_dvr.test_north_south_connectivity_after_primary_controller_reset(net_subnet_router,server,get_ssh_proxy_cmd,agent_steps,os_faults_steps,server_steps)

Scenario: Check North-South after reset primary controller.

This test checks connectivity to North-South-Routing without floating after reset of primary controller withSNAT.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and DVR

5.Add network interface to router

6.Create server

Steps:

1.Check that ping from server to 8.8.8.8 is successful

2.Find controller with SNAT for router

3.Reschedule router if controller with SNAT is not primary controller

4.Reset primary controller

5.Wait for another L3 agent becomes ACTIVE

6.Check that ping from server to 8.8.8.8 is successful

Teardown:

1.Delete server

2.Delete cirros image

3.Delete security group

4.Delete flavor

5.Delete router

6.Delete subnet

7.Delete network

stepler.neutron.tests.test_dvr.test_north_south_connectivity_after_reset_compute(server,float-ing_ip,os_faults_steps,server_steps)

Scenario: Check North-South connectivity after reset compute.

This test checks connectivity to North-South-Routing reset of compute where vm hosted.

Setup:

1.Create cirros image

6.9. Neutron 219

Page 224: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Create flavor

3.Create security group

4.Create network with subnet and DVR

5.Add network interface to router

6.Create server

Steps:

1.Assign floating ip to server

2.Check that ping from server to 8.8.8.8 is successful

3.Destroy compute with server

4.Start compute with server

5.Check that ping from server to 8.8.8.8 is successful

Teardown:

1.Delete server

2.Delete cirros image

3.Delete security group

4.Delete flavor

5.Delete router

6.Delete subnet

7.Delete network

stepler.neutron.tests.test_dvr.test_north_south_connectivity_without_floating(server,get_ssh_proxy_cmd,server_steps)

Scenario: Check connectivity to North-South-Routing.

This test checks connectivity to North-South-Routing in case of centralized of distributed router withoutfloating ip assigning.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and DVR

5.Add network interface to router

6.Create server

Steps:

1.Check that ping from server to 8.8.8.8 is successful

Teardown:

1.Delete server

2.Delete cirros image

3.Delete security group

220 Chapter 6. Deep to structure

Page 225: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

4.Delete flavor

5.Delete router

6.Delete subnet

7.Delete network

stepler.neutron.tests.test_dvr.test_north_south_floating_ip_shut_down_br_ex_on_controllers(server,float-ing_ip,os_faults_steps,server_steps)

Scenario: Check North-South connectivity after shut-downing br-ex.

This test checks North-South connectivity with floating IP after shut-downing br-ex on all controllers.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and DVR

5.Add network interface to router

6.Create server

Steps:

1.Assign floating ip to server

2.Check that ping from server to 8.8.8.8 is successful

3.Shut down br-ex on all controllers

4.Connect to server using floating IP and check that ping from server to 8.8.8.8 is successful

Teardown:

1.Delete server

2.Delete cirros image

3.Delete security group

4.Delete flavor

5.Delete router

6.Delete subnet

7.Delete network

stepler.neutron.tests.test_dvr.test_reschedule_router_from_snat_controller(net_subnet_router,server,float-ing_ip,agent_steps,os_faults_steps,server_steps)

Scenario: Check manually reschedule router from SNAT controller.

Setup:

6.9. Neutron 221

Page 226: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and DVR

5.Add network interface to router

6.Create server

Steps:

1.Assign floating ip to server

2.Find controller with SNAT for router

3.Reschedule router to another controller

4.Wait for another L3 agent becomes ACTIVE

5.Check that ping from server to 8.8.8.8 is successful

Teardown:

1.Delete server

2.Delete cirros image

3.Delete security group

4.Delete flavor

5.Delete router

6.Delete subnet

7.Delete network

stepler.neutron.tests.test_dvr.test_shutdown_controller_with_snat(net_subnet_router,server,floating_ip,agent_steps,os_faults_steps,server_steps)

Scenario: Check reschedule router after shutdown controller.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and DVR

5.Add network interface to router

6.Create server

Steps:

1.Assign floating ip to server

2.Find controller with SNAT for router

3.Destroy controller

222 Chapter 6. Deep to structure

Page 227: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

4.Wait for SNAT reschedule to another controller

5.Wait for L3 agent becomes ACTIVE

6.Check that ping from server to 8.8.8.8 is successful

Teardown:

1.Delete server

2.Delete cirros image

3.Delete security group

4.Delete flavor

5.Delete router

6.Delete subnet

7.Delete network

stepler.neutron.tests.test_dvr.test_update_router_from_centralized_to_distributed(net_subnet_router,server,float-ing_ip,os_faults_steps,router_steps,server_steps)

Scenario: Check update router type from centralized to distributed.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and centralized router.

5.Add network interface to router

6.Create server

Steps:

1.Assign floating ip to server

2.Try to update router type to distributed while router is in active state and check that BadRequestwith correct exception message occurs

3.Set admin state for router to down

4.Update router type to distributed

5.Set admin state for router to up

6.Check that namespace for router appeared on compute with server

7.Check that ping from server to 8.8.8.8 is successful

Teardown:

1.Delete server

2.Delete cirros image

3.Delete security group

6.9. Neutron 223

Page 228: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

4.Delete flavor

5.Delete router

6.Delete subnet

7.Delete network

stepler.neutron.tests.test_dvr.test_update_router_from_distributed_to_centralized(router,router_steps)

Scenario: Check update router type from distributed to centralized.

This test checks that it’s not possible to update distributed router to centralized.

Setup:

1.Create distributed router

Steps:

1.Try to update router type to centralized and check that BadRequest with correct exception messageoccurs

Teardown:

1.Delete router

Neutron SIGHUP tests

stepler.neutron.tests.test_sighup.test_restart_agent_controller_with_sighup(agent_steps,os_faults_steps,agent_name)

Scenario: Restart neutron agent with kill SIGHUP command.

Steps:

1.Find a controller or gtw node with running neutron agent

2.Get PID of agent process

3.Send SIGHUP to process and wait for 10 seconds

4.Check state of agent

5.Check that pid is not changed

6.Check that no new ERROR and TRACE messages appear in log

7.Check that only one SIGHUP message appear in log

stepler.neutron.tests.test_sighup.test_restart_l3_agent_compute_with_sighup(agent_steps,os_faults_steps)

Scenario: Restart l3 agent with SIGHUP on compute.

Steps:

1.Find a compute with running l3 agent

2.Get PID of l3 agent process

3.Send SIGHUP to process and wait for 10 seconds

4.Check state of agent

5.Check that pid is not changed

6.Check that no new ERROR and TRACE messages appear in log

224 Chapter 6. Deep to structure

Page 229: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

7.Check that only one SIGHUP message appear in log

stepler.neutron.tests.test_sighup.test_restart_metadata_agent_compute_with_sighup(agent_steps,os_faults_steps,is_parent)

Scenario: Restart metadata agent (parent or child) with SIGHUP.

Steps:

1.Find a compute with running metadata agent

2.Get PID of metadata agent process (parent or child)

3.Send SIGHUP to process and wait for 10 seconds

4.Check state of agent

5.Check that pid is not changed

6.Check that no new ERROR and TRACE messages appear in log

7.Check that only one SIGHUP message appear in log

stepler.neutron.tests.test_sighup.test_restart_metadata_agent_controller_with_sighup(agent_steps,os_faults_steps,is_parent)

Scenario: Restart metadata agent (parent or child) with SIGHUP.

Steps:

1.Find a controller or gtw node with running metadata agent

2.Get PID of metadata agent process (parent or child)

3.Send SIGHUP to process and wait for 10 seconds

4.Check state of agent

5.Check that pid is not changed

6.Check that no new ERROR and TRACE messages appear in log

7.Check that only one SIGHUP message appear in log

stepler.neutron.tests.test_sighup.test_restart_neutron_server_with_sighup(os_faults_steps,is_parent)

Scenario: Restart neutron server (parent or child) with SIGHUP.

Steps:

1.Find a controller with running metadata agent

2.Get PID of neutron server process (parent or child)

3.Send SIGHUP to process and wait for 10 seconds

4.Check state of agent

5.Check that pid is not changed

6.Check that no new ERROR and TRACE messages appear in log

7.Check that only one SIGHUP message appear in log

6.9. Neutron 225

Page 230: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Neutron L2 population tests

stepler.neutron.tests.test_l2pop.test_broadcast_traffic_for_single_network(cirros_image,fla-vor,neu-tron_2_servers_diff_nets_with_floating,server_steps,port_steps,os_faults_steps)

Scenario: Check broadcast traffic for single network.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router

5.Create network_2 with subnet_2

6.Create server_1

7.Create server_3 on another compute and connect it to network_2

8.Create and attach floating IP for each server

Steps:

1.Create server_2 on same compute as server_3 and connect it to network_1

2.Start arping from server_1 to server_2

3.Start tcpdump on compute with server_2 with server_2 port tap device

4.Stop tcpdump

5.Check that there are some ARP packets from server_1 on pcap file

6.Start tcpdump on compute with server_2 with server_3 port tap device

7.Stop tcpdump

8.Check that there are no ARP packets from server_1 on pcap file

Teardown:

1.Delete servers

2.Delete floating IPs

3.Delete networks, subnets, router

4.Delete security group

5.Delete flavor

6.Delete cirros image

226 Chapter 6. Deep to structure

Page 231: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.neutron.tests.test_l2pop.test_tunnels_establishing(cirros_image, fla-vor, network,server, server_steps,agent_steps, hy-pervisor_steps,os_faults_steps)

Scenario: Check tunnels establishing between nodes.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and router

5.Create server_1

Steps:

1.Check that compute_1 has tunnels to controllers

2.Check that compute_1 has no tunnels to other computes

3.Check that other computes have no tunnels to compute_1

4.Boot server on compute_2

5.Check that compute_2 has tunnels to controllers and compute_1

6.Check that compute_1 has tunnel to compute_2

7.Check that other computes have no tunnels to compute_1, compute_2 and controllers

8.Boot server on compute_3

9.Check that compute_3 has tunnels to controllers, compute_1 and compute_2

10.Check that compute_1 has tunnel to compute_3

11.Check that compute_2 has tunnel to compute_3

Teardown:

1.Delete servers

2.Delete network, subnet, router

3.Delete security group

4.Delete flavor

5.Delete cirros image

6.9. Neutron 227

Page 232: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Neutron L3 HA tests

stepler.neutron.tests.test_l3_ha.test_ban_l3_agent_for_many_routers(neutron_2_servers_diff_nets_with_floating,pub-lic_network,cre-ate_network,cre-ate_subnet,cre-ate_router,router_steps,server_steps,agent_steps,os_faults_steps)

Scenario: Ban l3-agent for many routers.

Setup:

1.Increase neutron quotas

2.Create cirros image

3.Create flavor

4.Create security group

5.Create network_1 with subnet_1 and router_1

6.Create network_2 with subnet_2

7.Create server_1

8.Create server_2 on another compute and connect it to network_2

9.Create and attach floating IP for each server

Steps:

1.Create 20 networks, subnets, routers

2.Get L3 agent with ACTIVE ha_state for router_1

3.Start ping between servers with floating IP

4.Ban ACTIVE L3 agent

5.Wait for another L3 agent becomes ACTIVE

6.Check that ping loss is not more than 10 packets

Teardown:

1.Delete servers

2.Delete floating IPs

3.Delete networks, subnets, router

4.Delete security group

5.Delete flavor

6.Delete cirros image

7.Restore original neutron quotas

228 Chapter 6. Deep to structure

Page 233: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.neutron.tests.test_l3_ha.test_ban_l3_agent_with_active_ha_state_for_router(neutron_2_servers_different_networks,cre-ate_floating_ip,server_steps,agent_steps,os_faults_steps,ban_count)

Scenario: Ban l3-agent with ACTIVE ha_state for router.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router_1

5.Create network_2 with subnet_2 and router_2

6.Create server_1

7.Create server_2 on another compute and connect it to network_2

Steps:

1.Create and attach floating IP for each server

2.Get L3 agent with ACTIVE ha_state for router_1

3.Start ping between servers with floating IP

4.Ban ACTIVE L3 agent

5.Wait for another L3 agent becomes ACTIVE

6.Repeat last 2 steps ban_count times

7.Check that ping loss is not more than 10 * ban_count packets

Teardown:

1.Delete servers

2.Delete networks, subnets, router

3.Delete floating IPs

4.Delete security group

5.Delete cirros image

6.Delete flavor

stepler.neutron.tests.test_l3_ha.test_ban_l3_agent_with_ping_public_ip(router,server,float-ing_ip,server_steps,agent_steps,os_faults_steps)

Scenario: Ban l3-agent with ACTIVE ha_state for router during ping.

Setup:

1.Create cirros image

6.9. Neutron 229

Page 234: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Create flavor

3.Create security group

4.Create network with subnet and router

5.Create server

6.Create floating ip

Steps:

1.Attach floating IP to server

2.Get L3 agent with ACTIVE ha_state for router

3.Start ping from server to public ip

4.Ban ACTIVE L3 agent

5.Wait for another L3 agent becomes ACTIVE

6.Check that ping loss is not more than 40 packets

Teardown:

1.Delete server

2.Delete network, subnet, router

3.Delete floating IP

4.Delete security group

5.Delete cirros image

6.Delete flavor

stepler.neutron.tests.test_l3_ha.test_delete_ns_for_router_on_node_with_active_ha_state(router,server,float-ing_ip,server_steps,agent_steps,os_faults_steps)

Scenario: Delete namespace for router on node with ACTIVE ha_state.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and router

5.Create server

6.Create floating ip

Steps:

1.Attach floating IP to server

2.Get L3 agent with ACTIVE ha_state for router

3.Start ping from server to public ip

4.Delete router namespace on node with active L3 agent

230 Chapter 6. Deep to structure

Page 235: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

5.Check that ping loss is not more than 40 packets

Teardown:

1.Delete server

2.Delete network, subnet, router

3.Delete floating IP

4.Delete security group

5.Delete cirros image

6.Delete flavor

stepler.neutron.tests.test_l3_ha.test_destroy_non_primary_controller(neutron_2_servers_different_networks,cre-ate_floating_ip,resched-ule_router_active_l3_agent,server_steps,agent_steps,os_faults_steps)

Scenario: Destroy non primary controller.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router_1

5.Create network_2 with subnet_2 and router_2

6.Create server_1

7.Create server_2 on another compute and connect it to network_2

Steps:

1.Create and attach floating IP for each server

2.Get L3 agent with ACTIVE ha_state for router_1

3.Get primary controller

4.Reschedule router’s active L3 agent to non primary controller

5.Start ping between servers with floating IP

6.Destroy node with L3 agent for router_1 with ACTIVE ha_state

7.Check that ping loss is not more than 40 packets

Teardown:

1.Delete servers

2.Delete networks, subnets, router

3.Delete floating IPs

4.Delete security group

5.Delete cirros image

6.9. Neutron 231

Page 236: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

6.Delete flavor

stepler.neutron.tests.test_l3_ha.test_destroy_primary_controller(neutron_2_servers_different_networks,cre-ate_floating_ip,resched-ule_router_active_l3_agent,server_steps,agent_steps,os_faults_steps)

Scenario: Destroy primary controller.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router_1

5.Create network_2 with subnet_2 and router_2

6.Create server_1

7.Create server_2 on another compute and connect it to network_2

Steps:

1.Create and attach floating IP for each server

2.Get L3 agent with ACTIVE ha_state for router_1

3.Get primary controller

4.Reschedule router’s active L3 agent to primary controller

5.Start ping between servers with floating IP

6.Destroy primary controller

7.Check that ping loss is not more than 40 packets

Teardown:

1.Delete servers

2.Delete networks, subnets, router

3.Delete floating IPs

4.Delete security group

5.Delete cirros image

6.Delete flavor

stepler.neutron.tests.test_l3_ha.test_disable_all_l3_agents_and_enable_them(neutron_2_servers_diff_nets_with_floating,server_steps,agent_steps,os_faults_steps)

Scenario: Disable all l3 agents and enable them.

Setup:

1.Create cirros image

232 Chapter 6. Deep to structure

Page 237: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router_1

5.Create network_2 with subnet_2 and router_2

6.Create server_1

7.Create server_2 on another compute and connect it to network_2

8.Create and attach floating IP for each server

Steps:

1.Start ping between servers with floating IP

2.Ban all L3 agents

3.Wait for all L3 agents to be died

4.Clear all L3 agents

5.Wait for all L3 agents to be alive

6.Check that ping loss is not more than 100 packets

Teardown:

1.Delete servers

2.Delete floating IPs

3.Delete networks, subnets, router

4.Delete security group

5.Delete flavor

6.Delete cirros image

stepler.neutron.tests.test_l3_ha.test_move_router_ha_interface_to_down_state(router,server,float-ing_ip,server_steps,port_steps,agent_steps,os_faults_steps)

Scenario: Move router HA interface to down state.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and router

5.Create server

6.Create floating ip

Steps:

1.Attach floating IP to server

6.9. Neutron 233

Page 238: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Get L3 agent with ACTIVE ha_state for router

3.Start ping server’s floating ip

4.Move router HA interface to down state

5.Wait for another L3 agent becomes ACTIVE

6.Check that ping loss is not more than 10 packets

Teardown:

1.Delete server

2.Delete network, subnet, router

3.Delete floating IP

4.Delete security group

5.Delete flavor

6.Delete cirros image

stepler.neutron.tests.test_l3_ha.test_ping_routing_during_l3_agent_ban(router,server,float-ing_ip,server_steps,port_steps,agent_steps,os_faults_steps)

Scenario: Check ping from server with tcpdump during banning agent.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network with subnet and router

5.Create server

6.Create floating ip

Steps:

1.Attach floating IP to server

2.Get L3 agent with ACTIVE ha_state for router

3.Start tcpdump on each controller

4.Start ping to server’s floating ip

5.Ban ACTIVE L3 agent

6.Wait for another L3 agent to become ACTIVE

7.Check that icmp traffic disappeared on old active l3 agent host and appeared on new active l3 agenthost

Teardown:

1.Delete server

234 Chapter 6. Deep to structure

Page 239: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Delete network, subnet, router

3.Delete floating IP

4.Delete security group

5.Delete flavor

6.Delete cirros image

stepler.neutron.tests.test_l3_ha.test_reset_primary_controller(neutron_2_servers_different_networks,cre-ate_floating_ip,resched-ule_router_active_l3_agent,server_steps,agent_steps,os_faults_steps)

Scenario: Reset primary controller.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router_1

5.Create network_2 with subnet_2 and router_2

6.Create server_1

7.Create server_2 on another compute and connect it to network_2

Steps:

1.Create and attach floating IP for each server

2.Get L3 agent with ACTIVE ha_state for router_1

3.Get primary controller

4.Reschedule router’s active L3 agent to primary controller

5.Start ping between servers with floating IP

6.Reset primary controller

7.Check that ping loss is not more than 40 packets

Teardown:

1.Delete servers

2.Delete networks, subnets, router

3.Delete floating IPs

4.Delete security group

5.Delete cirros image

6.Delete flavor

6.9. Neutron 235

Page 240: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Neutron VxLAN tests

stepler.neutron.tests.test_vxlan.test_broadcast_traffic_propagation_with_l2pop(neutron_2_servers_diff_nets_with_floating,server_steps,os_faults_steps)

Scenario: Check broadcast traffic propagation with l2pop driver.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router

5.Create network_2 with subnet_2

6.Create server_1

7.Create server_2 on another compute and connect it to network_2

8.Create and attach floating IP for each server

Steps:

1.Start tcpdump on compute with server_2

2.Run arping from server_1 to server_2

3.Run ping from server_1 to server_2

4.Stop tcpdump

5.Check that there are no ARP packets from server_1 on pcap file

6.Check that VXLAN packets with ICMP from server_1 are on pcap file

Teardown:

1.Delete servers

2.Delete floating IPs

3.Delete networks, subnets, router

4.Delete security group

5.Delete flavor

6.Delete cirros image

stepler.neutron.tests.test_vxlan.test_vni_matching_network_segmentation_id(network,router,server,server_steps,port_steps,agent_steps,os_faults_steps)

Scenario: Check that VNI matching the segmentation_id of a network.

Setup:

1.Create cirros image

2.Create flavor

236 Chapter 6. Deep to structure

Page 241: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

3.Create security group

4.Create network with subnet and router

5.Create server

Steps:

1.Get L3 agent with ACTIVE ha_state for router

2.Check that vxlan is enabled on node with L3 agent

3.Check that vxlan is enabled on server’s compute

4.Start tcpdump on compute

5.Ping server’s fixed ip from L3 agent node with qrouter namespace

6.Stop tcpdump

7.Check that VXLAN packets has same VNI that network segmentation_id

Teardown:

1.Delete server

2.Delete network, subnet, router

3.Delete security group

4.Delete flavor

5.Delete cirros image

stepler.neutron.tests.test_vxlan.test_vni_matching_network_segmentation_id_for_different_computes(neutron_2_servers_diff_nets_with_floating,server_steps,port_steps,agent_steps,os_faults_steps)

Scenario: Check that VNI matching the segmentation_id of a networks.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router_1

5.Create network_2 with subnet_2 and router_2

6.Create server_1

7.Create server_2 on another compute and connect it to network_2

8.Create and attach floating IP for each server

Steps:

1.Start tcpdump on computes

2.Ping each server’s fixed ip from other servers

3.Stop tcpdump

4.Check that VXLAN packets has same VNI value that corresponding server network’s segmenta-tion_id

6.9. Neutron 237

Page 242: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Teardown:

1.Delete servers

2.Delete floating IPs

3.Delete networks, subnets, router

4.Delete security group

5.Delete flavor

6.Delete cirros image

Neutron basic verification tests

stepler.neutron.tests.test_basic_verification.test_agents_list(agent_steps)Scenario: Request list of neutron agents.

Steps:

1.Get list of neutron agents

2.Check that all agents are up and running

stepler.neutron.tests.test_basic_verification.test_networks_list(network_steps,network)

Scenario: Request list of networks.

Steps:

1.Get list of networks

stepler.neutron.tests.test_basic_verification.test_neutron_floating_ips_quota(public_network,cre-ate_floating_ip,float-ing_ip_steps,change_neutron_quota)

Scenario: Negative create of floating ips more than quota allows.

Setup:

1.Increase neutron quota for floating ips

Steps:

1.Create max possible count of floating ips

2.Check that unable to create extra floating ip

Teardown:

1.Delete floating ips

2.Restore original quota

stepler.neutron.tests.test_basic_verification.test_neutron_networks_quota(create_network,net-work_steps,change_neutron_quota)

Scenario: Negative create of networks more than quota allows.

Setup:

1.Increase neutron quota for networks

238 Chapter 6. Deep to structure

Page 243: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Steps:

1.Create max possible count of networks

2.Check that unable to create extra network

Teardown:

1.Delete networks

2.Restore original quota

stepler.neutron.tests.test_basic_verification.test_neutron_ports_quota(network,port_steps,cre-ate_port,change_neutron_quota)

Scenario: Negative create of ports more than quota allows.

Setup:

1.Increase neutron quota for ports

2.Create network

Steps:

1.Create max possible count of ports for network

2.Check that unable to create extra ports

Teardown:

1.Delete ports

2.Delete network

3.Restore original quota

stepler.neutron.tests.test_basic_verification.test_neutron_routers_quota(create_router,router_steps,change_neutron_quota)

Scenario: Negative create of routers more than quota allows.

Setup:

1.Increase neutron quota for routers

Steps:

1.Create max possible count of routers

2.Check that unable to create extra router

Teardown:

1.Delete routers

2.Restore original quota

6.9. Neutron 239

Page 244: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.neutron.tests.test_basic_verification.test_neutron_sec_group_rules_quota(current_project,neu-tron_security_group_steps,neu-tron_security_group_rule_steps,neu-tron_create_security_group,change_neutron_quota)

Scenario: Negative create of security group rules more than quota.

Setup:

1.Increase neutron quota for security group rules

Steps:

1.Create security group to add rules

2.Get count of security group rules for project to calculate

3.Create security group rules in order to have max possible count

4.Check that unable to create extra security group rule

Teardown:

1.Delete security group with rules

2.Restore original quota

stepler.neutron.tests.test_basic_verification.test_neutron_security_groups_quota(current_project,neu-tron_security_group_steps,change_neutron_quota)

Scenario: Negative create of security groups more than quota allows.

Setup:

1.Increase neutron quota for security groups

Steps:

1.Create max possible count of security groups

2.Check that unable to create extra security group

Teardown:

1.Delete security groups

2.Restore original quota

stepler.neutron.tests.test_basic_verification.test_neutron_subnets_quota(network,cre-ate_subnet,sub-net_steps,change_neutron_quota)

Scenario: Negative create of subnets more than quota allows.

Setup:

1.Increase neutron quota for subnets

2.Create network

240 Chapter 6. Deep to structure

Page 245: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Steps:

1.Create max possible count of subnets for network

2.Check that unable to create extra subnet

Teardown:

1.Delete subnets

2.Delete network

3.Restore original quota

Nova

Nova conftest

stepler.nova.conftest.aggregate_steps(nova_client)Callable function fixture to get nova aggregate steps.

Parameters nova_client (function) – function to get nova client

Returns function to instantiated aggregate steps

Return type function

stepler.nova.conftest.attach_volume_to_server(nova_volume_steps, volume_steps)Callable function fixture to attach volume to server.

Can be called several times during test.

Parameters

• nova_volume_steps (NovaVolumeSteps) – instance of nova volume steps

• volume_steps (VolumeSteps) – instance of volume steps

Returns function to attach volume to server

Return type function

stepler.nova.conftest.availability_zone_steps(get_availability_zone_steps)Fixture to get availability zone steps.

Parameters get_availability_zone_steps (function) – function to get availabilityzone steps.

Returns instantiated zone steps.

Return type ZoneSteps

stepler.nova.conftest.available_flavors_for_hypervisors(flavor_steps, hypervi-sor_steps)

Function fixture to get available flavors for hypervisors.

Parameters

• flavor_steps (object) – instantiated flavor steps

• hypervisor_steps (object) – instantiated hypervisor steps

Returns list of available flavors

Return type list

6.10. Nova 241

Page 246: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.nova.conftest.baremetal_flavor(flavor_steps)Function fixture to create baremetal flavor before test.

Args: flavor_steps (object): instantiated flavor steps

Returns baremetal flavor

Return type object

stepler.nova.conftest.cirros_server_to_rebuild(request, keypair, flavor, security_group,cirros_image, net_subnet_router, vol-ume_steps, server_steps)

Fixture to create server for nova rebuild tests.

This fixture creates a server which can be booted from cirros image or cirros-based volume with parametrization.Default is boot from image.

Example

@pytest.mark.parametrized('cirros_server_to_rebuild', [{'boot_from_volume': True},{'boot_from_volume': False}

], indirect=True)def test_foo(cirros_server_to_rebuild):

pass

Parameters

• request (obj) – pytest SubRequest instance

• keypair (obj) – keypair

• flavor (obj) – flavor

• security_group (obj) – security group

• cirros_image (obj) – cirros image

• net_subnet_router (tuple) – neutron network, subnet and router

• volume_steps (obj) – instantiated volume steps

• server_steps (obj) – instantiated server steps

Returns nova server

Return type object

stepler.nova.conftest.create_aggregate(aggregate_steps)Callable function fixture to create nova aggregate with options.

Can be called several times during a test. After the test it destroys all created nodes.

Parameters flavor_steps (object) – instantiated flavor steps

Returns function to create flavors as batch with options

Return type function

242 Chapter 6. Deep to structure

Page 247: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.nova.conftest.create_flavor(flavor_steps)Callable function fixture to create nova flavor with options.

Can be called several times during a test. After the test it destroys all created nodes.

Parameters flavor_steps (object) – instantiated flavor steps

Returns function to create flavors as batch with options

Return type function

stepler.nova.conftest.create_server_context(create_servers_context)Function fixture to create server inside context.

It guarantees server deletion after context exit. It should be used when server must be deleted inside a test,and its deletion can’t be delegated to fixture finalization. Can be called several times during a test.

Example

def test_something(create_server_context):for i in sequence: # sequence can't be calculated outside test

with create_server_context(*args, **kwgs) as server:server.do_something()

Parameters create_servers_context (function) – context manager to create servers

Returns function to use as context manager to create server

Return type function

stepler.nova.conftest.create_servers_context(server_steps)Function fixture to create servers inside context.

It guarantees servers deletion after context exit. It should be used when servers must be deleted inside a test,and their deletion can’t be delegated to fixture finalization. Can be called several times during a test.

Example

def test_something(create_servers_context):for i in sequence: # sequence can't be calculated outside test

with create_servers_context(*args, **kwgs) as servers:[server.do_something() for server in servers]

Parameters server_steps (stepler.nova.steps.ServerSteps) – instantiated stepsobject to manipulate with server resource.

Returns function to use as context manager to create servers

Return type function

stepler.nova.conftest.detach_volume_from_server(nova_volume_steps, volume_steps)Callable function fixture to detach volume to server.

Can be called several times during test.

Parameters

• nova_volume_steps (NovaVolumeSteps) – instance of nova volume steps

6.10. Nova 243

Page 248: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• volume_steps (VolumeSteps) – instance of volume steps

Returns function to detach volume to server

Return type function

stepler.nova.conftest.flavor(request, flavor_steps)Function fixture to create single nova flavor with options.

Can be called several times during a test. After the test it destroys all created nodes.

Can be parametrized with dict of create_flavor arguments.

Example

@pytest.mark.parametrize('flavor', [dict(ram=2048, vcpus=2),dict(ram=512, disk=1, metadata={'hw:mem_page_size':

'large m1.tiny'}),], indirect=['flavor'])def test_foo(instance):

# Instance will created with different flavors

Parameters

• request (object) – py.test SubRequest

• flavor_steps (object) – instantiated flavor steps

Returns function to create single flavor with options

Return type function

stepler.nova.conftest.flavor_steps(nova_client)Function fixture to get nova flavor steps.

Parameters nova_client (function) – function to get nova client

Yields stepler.nova.steps.FlavorSteps – instantiated flavor steps

stepler.nova.conftest.flavors(request, flavor_steps)Function fixture to create flavor with default options before test.

Parameters

• request (object) – py.test’s SubRequest instance

• create_flavor (function) – function to create flavor with options

Returns nova flavors

Return type list

stepler.nova.conftest.generate_os_workload(cirros_image)Fixture to generate openstack workload.

This fixture launches a script which generates Openstack workload, ex: creates and deletes networks, subnetsand servers cyclically. Finally, the signal is sent to the script, and it provides correct deletion of objects createdbefore. For correct execution of generation scripts, it’s supposed that at least one image exists.

Returns function to generate openstack workload

Return type function

244 Chapter 6. Deep to structure

Page 249: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.nova.conftest.generate_traffic()Fixture to generate traffic to server.

Can be called several time during test. Simplest listener can be started with nc -k -l <port>.

stepler.nova.conftest.get_availability_zone_steps(get_nova_client)Callable session fixture to get availability zone steps.

Parameters get_nova_client (function) – function to get nova client.

Returns function to get availability zone steps.

Return type function

stepler.nova.conftest.get_keypair_steps(get_nova_client)Callable session fixture to get nova keypair steps.

Parameters get_nova_client (function) – function to get instantiated nova client

Returns function to get instantiated nova keypair steps

Return type function

stepler.nova.conftest.get_nova_client(get_session)Callable session fixture to get nova client.

Parameters get_session (keystoneauth1.session.Session) – authenticated key-stone session

Returns function to get nova client

Return type function

stepler.nova.conftest.get_nova_floating_ip_steps(get_nova_client)Callable session fixture to get nova floating ip steps.

Parameters get_nova_client (function) – function to get instantiated nova client

Returns function to get instantiated nova floating_ip steps

Return type function

stepler.nova.conftest.get_rabbitmq_cluster_data(os_faults_steps)Callable fixture to get RabbitMQ cluster config data and its status.

Parameters os_faults_steps – instantiated os_faults steps.

Returns: function: function to get cluster data.

stepler.nova.conftest.get_security_group_steps(get_nova_client)Callable session fixture to get security groups steps.

Parameters get_nova_client (function) – function to get nova client.

Returns function to get security groups steps.

Return type function

stepler.nova.conftest.get_server_steps(get_nova_client)Callable session fixture to get server steps.

Parameters get_nova_client (function) – function to get nova client

Returns function to get server steps

Return type function

6.10. Nova 245

Page 250: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.nova.conftest.get_ssh_proxy_cmd(network_steps, agent_steps, os_faults_steps,server_steps)

Callable function fixture to get ssh proxy data of server.

Parameters

• network_steps (NetworkSteps) – instantiated network steps

• agent_steps (AgentSteps) – instantiated agent steps

• os_faults_steps (OsFaultsSteps) – initialized os-faults steps

• server_steps (ServerSteps) – instantiated server steps

Returns function to get ssh proxy command

Return type function

stepler.nova.conftest.host_steps(nova_client)Function fixture to get host steps.

Parameters nova_client (object) – instantiated nova client

Returns instantiated host steps

Return type stepler.nova.steps.HostSteps

stepler.nova.conftest.hypervisor_steps(nova_client)Fixture to get hypervisor steps.

Parameters nova_client (object) – instantiated nova client

Returns instantiated hypervisor steps

Return type stepler.nova.steps.HypervisorSteps

stepler.nova.conftest.keypair(keypair_steps)Function fixture to create keypair with default options.

Parameters keypair_steps (object) – instantiated keypair steps

Returns keypair

Return type object

stepler.nova.conftest.keypair_steps(get_keypair_steps, keypairs_cleanup)Function fixture to get keypair steps.

Can be called several times during test. After the test it destroys all created security groups

Parameters

• get_keypair_steps (function) – function to get instantiated nova client

• keypairs_cleanup (function) – function to cleanup keypairs

Yields KeypairSteps – instantiated keypair steps

stepler.nova.conftest.keypairs_cleanup(uncleanable)Callable function fixture to cleanup keypairs after test.

Parameters uncleanable (AttrDict) – data structure with skipped resources

Returns function to cleanup keypairs

Return type function

246 Chapter 6. Deep to structure

Page 251: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.nova.conftest.live_migration_server(request, keypair, flavor, secu-rity_group, floating_ip, ubuntu_image,net_subnet_router, volume_steps,server_steps)

Fixture to create server for live migration tests.

This fixture create server and add floating ip to it. It can boot server from ubuntu image or volume withparametrization. Default is boot from image.

Example

@pytest.mark.parametrized('live_migration_server', [{'boot_from_volume': True},{'boot_from_volume': False}

], indirect=True)def test_foo(live_migration_server):

pass

Parameters

• request (obj) – pytest SubRequest instance

• keypair (obj) – keypair

• flavor (obj) – flavor

• security_group (obj) – security group

• floating_ip (obj) – floating ip

• ubuntu_image (obj) – ubuntu image

• net_subnet_router (tuple) – neutron network, subnet and router

• volume_steps (obj) – instantiated volume steps

• server_steps (obj) – instance of ServerSteps

Returns nova server instance

Return type object

stepler.nova.conftest.live_migration_servers(request, keypair, flavor, security_group,ubuntu_image, net_subnet_router,sorted_hypervisors, current_project, cre-ate_floating_ip, cinder_quota_steps, hyper-visor_steps, volume_steps, server_steps)

Fixture to create servers for live migration tests.

This fixture creates max allowed count of servers and adds floating ip to each. It can boot servers from ubuntuimage or volume with parametrization. Default is boot from image.

All created resources will be deleted after test.

Example

6.10. Nova 247

Page 252: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

@pytest.mark.parametrized('live_migration_servers', [{'boot_from_volume': True},{'boot_from_volume': False}

], indirect=True)def test_foo(live_migration_servers):

pass

Parameters

• request (obj) – pytest SubRequest instance

• keypair (obj) – keypair

• flavor (obj) – flavor

• security_group (obj) – security group

• ubuntu_image (obj) – ubuntu image

• net_subnet_router (tuple) – neutron network, subnet and router

• sorted_hypervisors (list) – nova hypervisors list

• current_project (obj) – current project

• create_floating_ip (function) – function to create floating IP

• cinder_quota_steps (obj) – instantiated cinder quota steps

• hypervisor_steps (obj) – instantiated hypervisor steps

• volume_steps (obj) – instantiated volume steps

• server_steps (obj) – instantiated server steps

Returns nova servers

Return type list

stepler.nova.conftest.live_migration_servers_with_volumes(live_migration_servers,at-tach_volume_to_server,de-tach_volume_from_server,volume_steps)

Function fixture to create servers with volumes for LM tests.

Parameters

• live_migration_servers (ilst) – list of nova servers

• attach_volume_to_server (function) – function to attach volume to server

• detach_volume_from_server (function) – function to detach volume fromserver

• volume_steps (obj) – instantiated volume steps

Yields list – nova servers

stepler.nova.conftest.nova_absolute_limits(nova_limit_steps)Function fixture to get absolute limits.

Parameters nova_limit_steps (NovaLimitSteps) – instantiated limit steps

248 Chapter 6. Deep to structure

Page 253: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Returns list of AbsoluteLimit objects

Return type list

stepler.nova.conftest.nova_availability_zone(availability_zone_steps)Fixture to get one available nova zone object.

Parameters availability_zone_steps (function) – zone steps

Returns nova zone object.

Return type object

stepler.nova.conftest.nova_availability_zone_hosts(nova_availability_zone)Fixture to get all hosts from nova availability zone.

This fixture gets all hosts from nova availability zone except for ironic nodes.

Parameters nova_availability_zone (object) – nova zone object.

Returns str FQDN values

Return type list

stepler.nova.conftest.nova_ceph_enabled(os_faults_steps)Function fixture to retrieve is Ceph is used by Nova.

Parameters os_faults_steps (obj) – instantiated os-faults steps

Returns is Ceph used by Nova or not

Return type bool

stepler.nova.conftest.nova_client(get_nova_client)Function fixture to get nova client.

Parameters get_nova_client (function) – function to get nova client

Returns authenticated nova client

Return type novaclient.client.Client

stepler.nova.conftest.nova_floating_ip(floating_ip)Fixture to create floating_ip with default options before test.

stepler.nova.conftest.nova_floating_ip_steps(get_nova_floating_ip_steps)Fixture to get floating_ip steps.

stepler.nova.conftest.nova_limit_steps(nova_client)Function fixture to get nova limit steps.

Parameters nova_client (function) – function to get nova client

Returns function to instantiated limit steps

Return type function

stepler.nova.conftest.nova_service_steps(nova_client)Function fixture to get nova service steps.

Parameters nova_client (object) – instantiated nova client

Returns instantiated service steps

Return type stepler.nova.steps.NovaServiceSteps

stepler.nova.conftest.nova_volume_steps(nova_client)Function fixture to get server volumes steps.

6.10. Nova 249

Page 254: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters nova_client (stepler.nova) – instantiated nova object.

Returns instantiated steps objects for server volumes

Return type object

stepler.nova.conftest.pinned_aggregate(create_aggregate, aggregate_steps, host_steps,os_faults_steps)

Function fixture to create an aggregate with pinned=True and hosts

Parameters

• create_aggregate (function) – function to create nova aggregate

• aggregate_steps (object) – instantiated aggregate steps

• host_steps (object) – instantiated host steps

• os_faults_steps (object) – instantiated os_faults steps

Returns nova aggregate

Return type object

stepler.nova.conftest.public_flavor(request, flavor_steps)Function fixture to create single nova flavor with options.

Can be called several times during a test. After the test it destroys all created nodes.

Can be parametrized with dict of create_flavor arguments.

Example

@pytest.mark.parametrize('flavor', [dict(ram=2048, vcpus=2),dict(ram=512, disk=1, metadata={'hw:mem_page_size':

'large m1.tiny'}),], indirect=['flavor'])def test_foo(instance):

# Instance will created with different flavors

Parameters

• request (object) – py.test SubRequest

• flavor_steps (object) – instantiated flavor steps

Returns function to create single flavor with options

Return type function

stepler.nova.conftest.rabbitmq_steps()Function fixture to get RabbitMQ steps.

Returns instantiated RabbitMQ steps

Return type stepler.nova.steps.RabbitMQSteps

stepler.nova.conftest.security_group(neutron_security_group)Fixture to create security group before test.

This fixture designed for backward compatibility.

Parameters neutron_security_group (dict) – created security group

250 Chapter 6. Deep to structure

Page 255: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Returns security group

Return type attrdict.AttrDict

stepler.nova.conftest.security_group_steps(get_security_group_steps)Fixture to get security group steps.

Parameters get_security_group_steps (function) – function to get security groupssteps

stepler.nova.conftest.server(cirros_image, flavor, security_group, net_subnet_router,server_steps)

Function fixture to create server with default options before test.

Parameters

• cirros_image (object) – cirros image from glance

• flavor (object) – nova flavor

• security_group (obj) – nova security group

• net_subnet_router (tuple) – neutron network, subnet, router

• server_steps (ServerSteps) – instantiated server steps

Returns nova server

Return type object

stepler.nova.conftest.server_steps(get_server_steps, servers_cleanup)Function fixture to get server steps.

Parameters

• get_server_steps (function) – function to get server steps

• servers_cleanup (function) – function to cleanup servers after test

Returns instantiated server steps

Return type ServerSteps

stepler.nova.conftest.servers_cleanup(uncleanable, get_server_steps)Function fixture to cleanup servers after test.

Parameters uncleanable (AttrDict) – data structure with skipped resources

stepler.nova.conftest.servers_to_evacuate(request, cirros_image, security_group, flavor,net_subnet_router, keypair, create_floating_ip,hypervisor_steps, volume_steps, server_steps)

Fixture to create servers for nova evacuate tests.

This fixture creates amount of servers defined in config file, schedules them against dedicated compute node andattaches floating IP to every created server. It can boot servers from cirros image or cirros-based volume withparametrization. Default is boot from image. All created resources will be deleted after test.

Example

@pytest.mark.parametrize('servers_to_evacuate', [{'boot_from_volume': True},{'boot_from_volume': False}

], indirect=True)

6.10. Nova 251

Page 256: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

def test_foo(servers_to_evacuate):pass

Parameters

• request (obj) – pytest SubRequest instance

• cirros_image (obj) – cirros image

• security_group (obj) – security group

• flavor (obj) – flavor

• net_subnet_router (tuple) – neutron network, subnet and router

• keypair (obj) – keypair

• create_floating_ip (function) – function to create floating IP

• hypervisor_steps (obj) – instantiated hypervisor steps

• volume_steps (obj) – instantiated volume steps

• server_steps (obj) – instantiated server steps

Returns nova servers

Return type list

stepler.nova.conftest.servers_with_volumes_to_evacuate(servers_to_evacuate, at-tach_volume_to_server,volume_steps)

Fixture to create servers with volumes for nova evacuate tests.

Parameters

• servers_to_evacuate (list) – list of nova servers

• attach_volume_to_server (function) – function to attach volume to server

• volume_steps (obj) – instantiated volume steps

Returns nova servers with volumes attached

Return type list

stepler.nova.conftest.skip_live_migration_tests(request, nova_ceph_enabled)Skip tests with wrong block_migration parameter.

Block migration requires Nova Ceph RBD to be disabled. This fixture skips parametrized with block_migrationtests with wrong block_migration value (not suitable for current cloud).

Parameters

• request (obj) – py.test SubRequest instance

• nova_ceph_enabled (bool) – is Ceph used by Nova or not

stepler.nova.conftest.small_flavor(flavor_steps)Function fixture to find or create small flavor before test.

Parameters flavor_steps (object) – instantiated flavor steps

Returns small flavor

Return type object

252 Chapter 6. Deep to structure

Page 257: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.nova.conftest.sorted_hypervisors(hypervisor_steps, flavor)Function fixture to get hypervisors sorted by their capacity.

Parameters

• hypervisor_steps (obj) – instantiated hypervisor steps

• flavor (obj) – nova flavor

Returns sorted hypervisors (from biggest to smallest)

Return type list

stepler.nova.conftest.tiny_flavor(flavor_steps)Function fixture to find or create tiny flavor before test.

Parameters flavor_steps (object) – instantiated flavor steps

Returns tiny flavor

Return type object

stepler.nova.conftest.ubuntu_server(ubuntu_image, flavor, keypair, security_group,net_subnet_router, server_steps)

Function fixture to create ubuntu server with default options.

Parameters

• ubuntu_image (object) – glance ubuntu image

• flavor (object) – nova flavor

• keypair (object) – nova keypair

• security_group (obj) – nova security group

• net_subnet_router (tuple) – neutron network, subnet, router

• server_steps (ServerSteps) – instantiated server steps

Returns nova server

Return type object

stepler.nova.conftest.ubuntu_server_to_rebuild(request, keypair, flavor, security_group,ubuntu_image, net_subnet_router, vol-ume_steps, server_steps)

Fixture to create Ubuntu server for nova rebuild tests.

In some test cases for ‘nova rebuild’ actions we need a proper cloud-init behavior (e.g. file injection operation),which cannot be guaranteed by cirros-based images and servers booted from them. This fixture creates a serverwhich can be booted from ubuntu image or ubuntu-based volume with parametrization. Default is boot fromimage.

Example

@pytest.mark.parametrized('ubuntu_server_to_rebuild', [{'boot_from_volume': True},{'boot_from_volume': False}

], indirect=True)def test_foo(ubuntu_server_to_rebuild):

pass

6.10. Nova 253

Page 258: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• request (obj) – pytest SubRequest instance

• keypair (obj) – keypair

• flavor (obj) – flavor

• security_group (obj) – security group

• ubuntu_image (obj) – ubuntu image

• net_subnet_router (tuple) – neutron network, subnet and router

• volume_steps (obj) – instantiated volume steps

• server_steps (obj) – instantiated server steps

Returns nova server

Return type object

stepler.nova.conftest.unexpected_servers_cleanup()Callable function fixture to clear unexpected servers.

It provides cleanup before and after test. Cleanup before test is callable with injecton of server steps. Should becalled before returning of instantiated server steps.

Nova steps

class stepler.nova.steps.AggregateSteps(client)Aggregate steps.

add_host(aggregate, host_name, check=True)Step to add host to an aggregate.

Parameters

• aggregate (object) – nova aggregate

• host_name (str) – host name

• check (bool) – flag whether to check step or not

Raises AssertionError – if check failed

check_aggregate_presence(aggregate, must_present=True, timeout=0)Verify step to check aggregate is present or not.

Parameters

• aggregate (object) – nova aggregate to check presence status

• must_present (bool) – flag whether aggregate should present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check was triggered to False after timeout

create_aggregate(aggregate_name=None, availability_zone=’nova’, check=True)Step to create nova aggregate.

Parameters

• aggregate_name (str) – name of nova aggregate

• availability_zone (str) – availability zone

254 Chapter 6. Deep to structure

Page 259: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• check (bool) – flag whether to check step or not

Retuns: object: nova aggregate

Raises TimeoutExpired – if aggregate is not created

delete_aggregate(aggregate, check=True)Step to delete aggregate.

Parameters

• aggregate (object) – nova aggregate

• check (bool) – flag whether to check step or not

remove_host(aggregate, host_name, check=True)Step to remove host from an aggregate.

Parameters

• aggregate (object) – nova aggregate

• host_name (dict) – key/value pairs to be set

• check (bool) – flag whether to check step or not

Raises AssertionError – if check failed

set_metadata(aggregate, metadata, check=True)Step to set metadata on an aggregate.

Parameters

• aggregate (object) – nova aggregate

• metadata (dict) – key/value pairs to be set

• check (bool) – flag whether to check step or not

Raises AssertionError – if check failed

class stepler.nova.steps.AvailabilityZoneSteps(client)Availability zone steps.

check_all_active_hosts_available(zone_name=’nova’)Checks that all active nova hosts for zone are available.

Nova checks hosts status with some interval. To prevent checking on outdated hosts data this method waitfor updated_at host’s attribute to be changed.

Parameters zone_name (str) – zone name

Raises

• AssertionError – if not all hosts are active

• TimeoutExpired – if there is no updates for hosts

get_zone(check=True, **kwargs)Step to find one zone matching **kwargs.

Parameters

• check (bool) – flag whether to check step or not

• **kwargs – like: {‘zoneName’: ‘nova’}, {‘zoneState’: {u’available’: True}}

6.10. Nova 255

Page 260: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Returns nova zone

Return type object

get_zones(check=True, **kwargs)Step to find all zones matching **kwargs.

Parameters

• check (bool) – flag whether to check step or not

• **kwargs – like: {‘zoneName’: ‘nova’}, {‘zoneState’: {u’available’: True}}

Returns nova zones

Return type list

class stepler.nova.steps.FlavorSteps(client)Flavor steps.

check_flavor_presence(flavor, must_present=True, timeout=0)Verify step to check flavor is present.

Parameters

• flavor (object) – nova flavor to check presence status

• must_present (bool) – flag whether flavor should present or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check was triggered to False after timeout

create_flavor(flavor_name=None, ram=1024, vcpus=1, disk=5, flavorid=’auto’, ephemeral=0,swap=0, rxtx_factor=1.0, is_public=True, check=True)

Step to create flavor.

Parameters

• flavor_name (str) – Descriptive name of the flavor

• ram (int) – Memory in MB for the flavor

• vcpus (int) – Number of VCPUs for the flavor

• disk (int) – Size of local disk in GB

• flavorid (str) – ID for the flavor (optional). You can use the reserved value"auto" to have Nova generate a UUID for the flavor in cases where you cannotsimply pass None.

• ephemeral (int) – Ephemeral space in MB

• swap (int) – Swap space in MB

• rxtx_factor (float) – RX/TX factor

• is_public (bool) – flag whether flavor should be public or not

• check (bool) – flag whether to check step or not

Retuns: object: flavor object

delete_flavor(flavor, check=True)Step to delete flavor.

Parameters

256 Chapter 6. Deep to structure

Page 261: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• flavor (object) – nova flavor

• check (bool) – flag whether to check step or not

get_flavor(check=True, **kwgs)Step to find a single item with attributes matching **kwgs.

Parameters

• check (bool) – flag whether to check step or not

• **kwgs (dict, optional) – could be:

– name (str): Descriptive name of the flavor

– ram (int): Memory in MB for the flavor

– vcpus (int): Number of VCPUs for the flavor

– disk (int): Size of local disk in GB

– id (str): ID for the flavor (optional). You can use the reserved value "auto" tohave Nova generate a UUID for the flavor in cases where you cannot simply passNone.

– OS-FLV-EXT-DATA (int): Ephemeral space in MB

– swap (int): Swap space in MB

– rxtx_factor (float): RX/TX factor

– os-flavor-access (bool): flag whether flavor should be public or not

– check (bool): flag whether to check step or not

Returns nova flavor

Return type object

get_flavors(check=True, **kwgs)Step to find all items with attributes matching **kwgs.

Parameters

• check (bool) – flag whether to check step or not

• **kwgs (dict, optional) – could be:

– name (str): Descriptive name of the flavor

– ram (int): Memory in MB for the flavor

– vcpus (int): Number of VCPUs for the flavor

– disk (int): Size of local disk in GB

– id (str): ID for the flavor (optional). You can use the reserved value "auto" tohave Nova generate a UUID for the flavor in cases where you cannot simply passNone.

– OS-FLV-EXT-DATA (int): Ephemeral space in MB

– swap (int): Swap space in MB

– rxtx_factor (float): RX/TX factor

– os-flavor-access (bool): flag whether flavor should be public or not

– check (bool): flag whether to check step or not

6.10. Nova 257

Page 262: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Returns nova flavor object(s)

Return type list

get_metadata(flavor, check=True)Step to get metadata on a flavor.

Parameters

• flavor (object) – nova flavor

• check (bool) – flag whether to check step or not

Raises AssertionError – if check failed

Returns key/value pairs

Return type dict

set_metadata(flavor, metadata, check=True)Step to set metadata on a flavor.

Parameters

• flavor (object) – nova flavor

• metadata (dict) – key/value pairs to be set

• check (bool) – flag whether to check step or not

Raises AssertionError – if check failed

class stepler.nova.steps.FloatingIpSteps(client)Floating IP steps.

check_floating_ip_presence(floating_ip, present=True, timeout=0)Verify step to check floating IP is present.

create_floating_ip(check=True)Step to create floating IP.

delete_floating_ip(floating_ip, check=True)Step to delete floating IP.

class stepler.nova.steps.HostSteps(client)Host steps.

check_host_usage_changing(host, usage_data_old, changed=True, project_id=None)Step to check changes in host usages (cpu/memory/hdd)

This step gets current usage data and compares them with old data. There are two modes of checks:changes are expected or not. Depending on it, values must be different or equal. Also, this step can checkproject ID in host usage.

The following data are checked: - cp, memory_mb, disk_gb (for ‘used now’ and ‘used max’) - project ID(optional)

Parameters

• host (object) – host

• usage_data_old (object) – usage data got before

• changed (bool|True) – indicator that some VMs are added/deleted

• project_id (str|None) – project id of VMs created before (optional)

Raises AssertionError

258 Chapter 6. Deep to structure

Page 263: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

get_host(name=None, fqdn=None, check=True)Step to get host by name of FQDN.

Host object consists of ‘host_name’, ‘service’ and ‘zone’. If there are several hosts with the samehost_name, then any host with proper name is returned. If not arguments are specified that means anyhost is suitable.

Parameters

• name (str) – host name

• fqdn (str) – FQDN of host

• check (bool, optional) – flag whether to check step or not

Returns host object

Return type object

Raises AssertionError – if host is not found

get_hosts(check=True)Step to get hosts.

Parameters check (bool, optional) – flag whether to check step or not

Returns list of hosts objects

Return type list

Raises AssertionError – if hosts list is empty

get_usage_data(host, check=True)Step to get cpu/memory/hdd data for host.

# usage_data is the list of the following elements: # elem 0 - ‘total’ data, 1 - ‘used now’ data, 2 - ‘usedmax’ data # next elements - for VMs (one element per project) # Every element consists of project, cpu,memory_mb, disk_gb etc.

Parameters

• host (object) – host

• check (bool, optional) – flag whether to check step or not

Raises AssertionError – if usage data has less than 3 elements

class stepler.nova.steps.HypervisorSteps(client)Hypervisor steps.

get_another_hypervisor(servers, check=True)Step to get any hypervisor except occupied by servers.

Parameters

• servers (list) – nova servers list

• check (bool, optional) – flag whether to check step or not

Returns nova hypervisor

Return type obj

Raises ValueError – if there is no one hypervisor except occupied by servers

get_hypervisor_capacity(hypervisor, flavor, check=True)Step to get hypervisor capacity.

6.10. Nova 259

Page 264: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

This method calculates max available count of instances, which can be booted on hypervisor with choosenflavor.

Parameters

• hypervisor (obj) – nova hypervisor

• flavor (obj) – nova flavor

• check (bool) – flag whether to check step or not

Returns possible instances count

Return type int

Raises AssertionError – if capacity equal or less zero.

get_hypervisors(check=True)Step to get hypervisors.

Parameters check (bool) – flag whether to check step or not

Returns list of hyervisors objects

Return type list

Raises AssertionError – if hypervisors list are empty

class stepler.nova.steps.KeypairSteps(client)Keypair steps.

check_keypairs_presence(keypairs, must_present=True, keypair_timeout=0)Step to check keypairs presence status.

Parameters

• keypairs (list) – Keypairs to check.

• must_present (bool, optional) – Flag whether keypairs must present ornot.

• timeout (int, optional) – Seconds to wait check result.

Raises TimeoutExpired – If check failed after timeout.

create_keypairs(names=None, count=1, public_key=None, check=True)Step to create keypairs.

Parameters

• names (list, optional) – Names of creating keypairs.

• count (int, optional) – Count of creating keypairs, omitted if names is spec-ified.

• public_key (str, optional) – Existing public key to import.

• check (bool, optional) – Flag whether to check step or not.

Returns Keypairs collection.

Return type list

Raises TimeoutExpired | AssertionError – If check failed.

delete_keypairs(keypairs, check=True)Step to delete keypairs.

Parameters

260 Chapter 6. Deep to structure

Page 265: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• keypairs (list) – Keypairs to delete.

• check (bool, optional) – Flag whether to check step or not.

Raises TimeoutExpired – If check failed.

get_keypairs(name_prefix=None, check=True)Step to get keypairs.

Parameters

• name_prefix (str, optional) – Name prefix to filter keypairs.

• check (bool, optional) – Flag whether to check step or not.

Returns Keypairs collection.

Return type list

Raises AssertionError – If check failed.

class stepler.nova.steps.SecurityGroupSteps(client)Security group steps.

add_group_rules(group, rules, check=True)Step to add rules to security group.

check_group_presence(group, present=True, timeout=0)Verify step to check security group is present.

check_rule_presence(group, rule, present=True, timeout=0)Verify step to check security group rule is present.

create_group(group_name, description=’description’, check=True)Step to create security group.

Parameters

• group_name (str) – security group name

• description (str, optional) – security group description

• check (bool, optional) – flag whether to check this step or not

Returns security group

Return type obj

Raises AssertionError – if check failed

delete_group(group, check=True)Step to delete security group.

remove_group_rules(group, rules, check=True)Step to remove rule from security group.

class stepler.nova.steps.NovaVolumeSteps(client)Server volumes steps.

attach_volume_to_server(server, volume, device=’/dev/vdb’, check=True)Step to attach volume to server

Parameters

• server (object) – nova server

• volume (object) – cinder volume

6.10. Nova 261

Page 266: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• device (str) – device name

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

check_volume_to_server_attachment_status(server, volume, is_attached=True, time-out=0)

Verify step to check status of server volume.

Parameters

• server (object) – nova server

• volume (object) – cinder volume

• is_attached – expected state - True (present) or False (missing)

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

detach_volume_from_server(server, volume, check=True)Step to detach volume from server

Parameters

• server (object) – nova server

• volume (object) – cinder volume

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

class stepler.nova.steps.ServerSteps(client)Nova server steps.

attach_fixed_ip(server, network_id, check=True)Step to attach fixed IP from provided network to provided server.

Parameters

• server (object) – nova server to attach fixed ip

• network_id (str) – the ID of the network the IP should be on

• check (bool) – flag whether to check step or not

Returns IF check=True, returns new fixed IP address None: IF check=False

Return type str

Raises TimeoutExpired – if check failed after timeout

attach_floating_ip(server, floating_ip, check=True)Step to attach floating IP to server.

Parameters

• server (object) – nova server

• floating_ip (object|dict) – floating IP

• check (bool, optional) – flag whether to check step or not

Raises AssertionError – if floating IP is not attached to a server

check_active_ssh_connection(server_ssh, must_operable=True, timeout=0)Step to check active ssh connection.

262 Chapter 6. Deep to structure

Page 267: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• server_ssh (ssh.SshClient) – ssh connection

• must_operable (bool, optional) – flag whether server_ssh should be oper-able or not

• timeout (int) – seconds to wait a result of check

Raises

• RuntimeError – if server_ssh is closed

• TimeoutExpired – if check failed after timeout

check_arping_loss_context(server_ssh, ip, iface=’eth0’, max_loss=0)Step to check that arping losses inside CM is less than max_loss.

Parameters

• server_ssh (SshClient) – instance of ssh client

• ip (str) – ip address to ping

• iface (str, optional) – name of interface to arping

• max_loss (int) – maximum allowed pings loss

Raises AssertionError – if ping loss is greater than max_loss

check_create_server_negative(image, flavor, networks=(), keypair=None, se-curity_groups=None, availability_zone=’nova’,exp_exception=None, exp_error_message=None)

Step to check server creation with wrong conditions.

This step checks that some error occurs during server creation: exception or server status = ERROR.

Parameters

• image (object) – image

• flavor (object) – flavor

• networks (list) – networks objects

• keypair (object) – keypair

• security_groups (list|tuple) – security groups

• availability_zone (str) – name of availability zone

• exp_exception (Exception, optional) – expected exception

• exp_error_message (str, optional) – expected message (status=ERROR)

check_dhcp_on_cirros_server(cirros_server)Step to check DHCP on cirros server.

Parameters cirros_server (object) – nova server

Raises TimeoutExpired – if check failed after ssh timeout

check_files_presence_for_path(server_ssh, fs_path, must_present=True)Verify step to check that fs doesn’t contain any files.

Parameters

• server_ssh (ssh.SshClient) – ssh connection to nova server

• fs_path (str) – directory path to check files within or file path to check presence

6.10. Nova 263

Page 268: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• must_present (bool) – flag whether fs should have any files or not

Raises AssertionError – if check failed

check_fixed_id_ping_loss_context(ip_to_ping, icmp_id, server, max_loss=0)Step to check that ping losses inside CM is less than max_loss.

Note: This method required ping binary which supports icmp_id parameter.

Parameters

• ip_to_ping (str) – ip address to ping

• icmp_id (int) – desired id of icmp packets

• server (obj) – nova server

• max_loss (int) – maximum allowed pings loss

Raises AssertionError – if ping loss is greater than max_loss

check_iperf_loss_context(server_ssh, ip, port, time=60, max_loss=0)Step to check that iperf loss inside CM is less than max_loss.

Note: This step requires to iperf server will be launched with listening for UDP protocol.

Parameters

• server_ssh (obj) – instance of stepler.third_party.ssh.SshClient

• ip (str) – iperf server ip address

• port (int) – iperf server port

• time (int, optional) – time to generate traffic

• max_loss (float) – maximum allowed datagramm loss in percents

Raises AssertionError – if iperf loss is greater than max_loss

check_metadata_presence(server, custom_meta, present=True, timeout=0)Step to check if server’s metadata contains OR NOT contains provided values.

Parameters

• server (object) – nova server

• custom_meta (dict) – data, which presence should be checked in server’s meta-data. Like: {‘key’: ‘stepler_test’}

• present (bool) – flag to check if provided data should OR should NOT present inserver’s metadata.

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_no_arping_for_ip(server_ssh, ip, iface=’eth0’, count=1)Verify step to check arping for ip.

Parameters

264 Chapter 6. Deep to structure

Page 269: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• server_ssh (SshClient) – instance of ssh client

• ip (str) – ip address to ping

• iface (str, optional) – name of interface to arping

• count (int, optional) – count of packets to send

Raises AssertionError – if some of packets are unperlied

check_no_fixed_id_ping_context(ip_to_ping, icmp_id, server)Step to check that ping is not success inside CM.

Note: This method required ping binary which supports icmp_id parameter.

Parameters

• ip_to_ping (str) – ip address to ping

• icmp_id (int) – desired id of icmp packets

• server (obj) – nova server

Raises AssertionError – if ping received is not equal to 0

check_no_ping_context(ip_to_ping, server_ssh=None)Step to check that ping is not success inside CM.

Parameters

• ip_to_ping (str) – ip address to ping

• server_ssh (obj, optional) – instance of stepler.third_party.ssh.SshClient.If None - ping will be run from local machine

Raises AssertionError – if ping received is not equal to 0

check_ping_between_servers_via_floating(servers, ip_types=(‘floating’, ‘fixed’), time-out=0)

Step to check ping from each server to all other servers.

This function uses floating ips of servers to connect to them and then send pings to other servers accordingto ‘ip_types’ parameter.

Parameters

• servers (list) – nova servers to check ping between them

• ip_types (tuple) – types of ip addresses which should be pinged

• timeout (int) – seconds to wait for result of check

Raises TimeoutExpired – if check failed after timeout

check_ping_by_plan(ping_plan, timeout=0)Step to check ping using ping plan dict.

Parameters

• ping_plan (dict) – servers and lists of ips/tuples(server, ip_type)/servers to ping

• timeout (int) – seconds to wait for result of check

Raises TimeoutExpired – if check failed after timeout

6.10. Nova 265

Page 270: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

check_ping_for_ip(ip_to_ping, remote_from=None, ping_count=3, must_be_success=True, time-out=0)

Verify step to check ping for ip from remote or local host.

Parameters

• ip_to_ping (str) – nova server to ping its floating ip

• remote_from (object|None) – instance of stepler.third_party.ssh.SshClient. IfNone - ping executing from local host.

• ping_count (int) – count of attempts to ping

• must_be_success (bool) – should ping loss be 0 (if must_be_success isTrue) or ping received should be 0 (otherwise)

• timeout (int) – seconds to wait for success ping

Raises TimeoutExpired – if check failed after timeout

check_ping_loss_context(ip_to_ping, max_loss=0, server_ssh=None, con-nect_restore_timeout=None)

Step to check that ping losses inside CM is less than max_loss.

Parameters

• ip_to_ping (str) – ip address to ping

• max_loss (int) – maximum allowed pings loss

• server_ssh (obj, optional) – instance of stepler.third_party.ssh.SshClient.If None - ping will be run from local machine

• connect_restore_timeout (int, optional) – time in seconds to wait forconnection to be restored before CM exit

No Longer Raises: AssertionError: if ping loss is greater than max_loss

check_ping_to_server_floating(server, timeout=0)Verify step to check ping to server floating ip address.

Each instance has a private, fixed IP address and can also have a public, or floating IP address. Private IPaddresses are used for communication between instances, and public addresses are used for communica-tion with networks outside the cloud, including the Internet.

Parameters

• server (object) – nova server to ping its floating ip

• timeout (int) – seconds to wait for result of check

Raises TimeoutExpired – if check failed after timeout

check_qcow_image_for_server(server_ssh, filename)Step to check that qcow image exists.

Parameters

• server_ssh (ssh.SshClient) – ssh connection to nova server

• filename (str) – name of image to check

Raises AssertionError – if check failed

check_server_attribute(server, attr, value, equal=True, timeout=0)Verify step to check that server’s attribute has an expected value.

266 Chapter 6. Deep to structure

Page 271: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• server (object) – nova server to check its attribute defined in arguments

• attr (str) – name of server’s attribute

• value (str) –

• equal (bool) – flag whether servers’s attribute should be equal to value or not

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_server_doesnot_detach_unattached_fixed_ip(server, unattached_fixed_ip)

Step to check that server will raise exception if we try to detach not attached to it fixed IP.

Parameters

• server (object) – nova server to delete fixed ip

• unattached_fixed_ip (str) – Unattached Fixed IP address

Raises AssertionError – if error didn’t raise

check_server_host_attr(server, host_name=None, host_names=None, equal=True, time-out=0)

Verify step to check server’s host attribute value.

There are several modes of check: - host name must be equal to a value - host name must be not equal toa value - host name must be equal to a value from list - host name must be not equal to values of list

Parameters

• server (object) – nova server

• host_name (str, optional) – host name to compare with server’s host

• host_names (list, optional) – host names to compare with server’s host.It’s ignored if host_name is set.

• equal (bool) – flag whether servers’s host should be equal to host_name or not

• timeout (int) – seconds to wait result of check

Raises TimeoutExpired – if check failed after timeout

check_server_ip(server, ip, must_present=True, timeout=0)Step to check that server has (or not) IP address.

Parameters

• server (object) – nova server

• ip (str) – ip address

• must_present (bool, optional) – flag whether server should contain ip ornot

• timeout (int, optional) – seconds to wait result of check

Raises TimeoutExpired – if check failed after timeout

check_server_log_contains_record(server, substring, timeout=0)Verify step to check server log contains substring.

Parameters

6.10. Nova 267

Page 272: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• server (object) – nova server

• substring (str) – substring to match

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_server_not_rebuilt_in_paused_state(paused_server, image)Step to check server will not be rebuilt in Paused state.

Parameters

• paused_server (obj) – server to be set to Paused state

• image (object) – image used for instance rebuild

Raises AssertionError – if check failed

check_server_not_rebuilt_in_rescue_state(rescue_server, image)Step to check server will not be rebuilt in Rescue state.

Parameters

• rescue_server (obj) – server to be set to Rescue state

• image (object) – image used for instance rebuild

Raises AssertionError – if check failed

check_server_presence(server, present=True, timeout=0)Check-step to check server presence.

Parameters

• server (object) – nova server

• present (bool) – flag to check is server present or absent

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_server_status(server, expected_statuses, transit_statuses=(), timeout=0)Verify step to check server status.

Parameters

• server (object) – nova server to check its status

• expected_statuses (list) – expected server statuses

• transit_statuses (iterable) – allowed transit statuses

• timeout (int) – seconds to wait a result of check

Raises TimeoutExpired – if check failed after timeout

check_servers_actions_not_available(timeout=0)Step to check that servers actions are not available.

This step checks that some exception occurs when getting server list during some time period.

Parameters timeout (int) – seconds to wait exception

Raises TimeoutExpired – if no exception occurs during timeout

check_servers_not_evacuated_in_paused_state(paused_servers)Step to check servers will not be evacuated in Paused state.

268 Chapter 6. Deep to structure

Page 273: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters paused_servers (list) – servers to be set to Paused state

Raises AssertionError – if check failed

check_servers_not_evacuated_in_rescue_state(rescue_servers)Step to check servers will not be evacuated in Rescue state.

Parameters rescue_servers (list) – servers to be set to Rescue state

Raises AssertionError – if check failed

check_servers_not_evacuated_in_resized_state(resized_servers)Step to check servers will not be evacuated in Resized state.

Parameters resized_servers (list) – servers to be set to Resized state

Raises AssertionError – if check failed

check_servers_not_evacuated_in_shelved_state(shelved_servers)Step to check servers will not be evacuated in Shelved state.

Parameters shelved_servers (list) – servers to be set to Shelved state

Raises AssertionError – if check failed

check_servers_not_evacuated_to_initial_compute(servers_to_evacuate, host)Step to check servers will not be evacuated to initial compute.

Parameters

• servers_to_evacuate (list) – servers to be evacuated

• host (str) – target host, must be equal to failed compute’s hostname

Raises AssertionError – if check failed

check_timestamps_on_root_and_ephemeral_disks(server_ssh, timestamp)Verify step to check timestamp on root and ephemeral disks

Parameters

• server_ssh (ssh.SshClient) – ssh connection to nova server

• timestamp (str) – timestamp to check

Raises AssertionError – if timestamp on root and ephemeral are not equal

confirm_resize_servers(servers, check=True)Step to confirm resize for servers

Parameters

• servers (list) – nova servers to confirm resize

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

create_empty_file_on_server(server_ssh, file_dir, check=True)Step to create empty file on the server.

Parameters

• server_ssh (ssh.SshClient) – ssh connection to nova server

• file_dir (str) – directory to create file

• check (bool) – flag whether to check step or not

6.10. Nova 269

Page 274: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Raises AssertionError – if check failed

create_qcow_image_for_server(server_ssh, eph_dev, root_dev, image_size, check=True)Step to create qcow image for server.

Parameters

• server_ssh (ssh.SshClient) – ssh connection to nova server

• eph_dev (str) – ephemeral device

• root_dev (str) – root device

• image_size (str) – image size

• check (bool) – flag whether to check step or not

Raises AssertionError – if check failed

create_servers(image, flavor, server_names=None, count=1, networks=(), ports=(),keypair=None, security_groups=None, availability_zone=’nova’,block_device_mapping=None, username=None, password=None, user-data=None, nics=None, check=True)

Step to create servers.

Parameters

• image (object|None) – image or None (to use volume)

• flavor (object) – flavor

• server_names (list) – names of created servers

• count (int) – count of created servers, it’s ignored if server_names is specified;one server is created if both args are missing

• networks (list) – networks objects

• ports (list) – ports objects

• keypair (object) – keypair

• security_groups (list|tuple) – security groups

• availability_zone (str) – name of availability zone

• block_device_mapping (dict|None) – block device mapping for servers

• username (str) – username to store with server metadata

• password (str) – password to store with server metadata

• userdata (str) – userdata (script) to execute on instance after boot

• nics (list, optional) – An ordered list of nics (dicts) to be added to thisservers, with information about connected networks, fixed IPs, port etc.

• check (bool) – flag whether to check step or not

Returns nova servers

Return type list

create_timestamps_on_root_and_ephemeral_disks(server_ssh, timestamp,check=True)

Step to create timestamp on root and ephemeral disks

Parameters

270 Chapter 6. Deep to structure

Page 275: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• server_ssh (ssh.SshClient) – ssh connection to nova server

• timestamp (str) – timestamp to store on files

• check (bool) – flag whether to check step or not

Raises AssertionError – if timestamp on root and ephemeral are not equal

delete_servers(servers, force=False, check=True)Step to delete servers.

Parameters

• servers (obj) – nova servers’ list

• force (bool, optional) – flag whetever to run force or soft deleting

• check (bool, optional) – flag whether to check step or not

detach_fixed_ip(server, fixed_ip=None, check=True)Step to detach provided fixed IP from provided server.

Parameters

• server (object) – nova server to delete fixed ip

• fixed_ip (str) – Fixed IP address

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

detach_floating_ip(server, floating_ip, check=True)Step to detach floating IP from server.

Parameters

• server (object) – nova server

• floating_ip (object|dict) – floating IP

• check (bool, optional) – flag whether to check step or not

Raises AssertionError – if floating IP is still attached to a server

evacuate_servers(servers, host=None, check=True)Step to evacuate servers from failed host

Parameters

• servers (obj) – servers to evacuate

• host (str) – target host

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

execute_commands(server, commands, with_sudo=False, command_timeout=30, check=True)Step to execute commands on server via SSH.

Parameters

• server (object) – nova server

• commands (list) – sequence of commands to execute on server

• with_sudo (bool, optional) – flag whether to execute commands with sudoor not

6.10. Nova 271

Page 276: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• command_timeout (int) – seconds to wait executing command will be finished

• check (bool, optional) – flag whether to check step or not

Raises RuntimeError – if check failed

Returns stdout of last command from sequence

Return type str

generate_server_cpu_workload(remote, check=True)Step to start server CPU workload.

Parameters

• remote (object) – instance of stepler.third_party.ssh.SshClient

• check (bool) – flag whether to check step or not

Raises Exception – if command exit code is not 0

generate_server_disk_workload(remote, check=True)Step to start server disk workload.

This step makes about 95% load on disk.

Parameters

• remote (object) – instance of stepler.third_party.ssh.SshClient

• check (bool) – flag whether to check step or not

Raises Exception – if command exit code is not 0

generate_server_memory_workload(remote, vm_bytes=‘5M’, check=True)Step to start server memory workload.

Parameters

• remote (object) – instance of stepler.third_party.ssh.SshClient

• vm_bytes (str) – malloc vm_bytes bytes per vm worker

• check (bool) – flag whether to check step or not

get_block_device_by_mount(server_ssh, fs_path, check=True)Step to retrieve block device which is mounted to the path.

Parameters

• server_ssh (ssh.SshClient) – ssh connection to nova server

• fs_path (str) – fs path to find block device

• check (bool) – flag whether to check step or not

Returns device for fs_path

Return type str

Raises AssertionError – if check failed

get_fixed_ip(server, check=True)Step to get one server fixed IP for the server.

Parameters

• server (object) – nova server

• check (bool, optional) – flag whether to check step or not

272 Chapter 6. Deep to structure

Page 277: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Returns retrieved fixed IP

Return type str

Raises AssertionError – if no retrieved IPs

get_floating_ip(server, check=True)Step to get one server floating IP for the server.

Parameters

• server (object) – nova server

• check (bool, optional) – flag whether to check step or not

Returns retrieved floating IP

Return type str

Raises AssertionError – if no retrieved IPs

get_ips(server, ip_type=None, check=True)Step to get server IPs.

Parameters

• server (object) – nova server

• ip_type (str, optional) – type of IP to filter IPs

• check (bool, optional) – flag whether to check step or not

Returns Retrieved IPs.

Return type dict

Raises AssertionError – If no retrieved IPs.

get_server_credentials(server)Step to retrieve server credentials.

Parameters server (object) – nova server object

Returns dict with username, password and (optionally) private_key

Return type dict

get_server_ssh(server, ip=None, proxy_cmd=None, credentials=None, ssh_timeout=60,check=True)

Step to get SSH connect to server.

Parameters

• server (object) – nova server

• ip (str) – ip of server

• proxy_cmd (str) – ssh client proxy command

• credentials (dict) – dict with username, password and private_key

• ssh_timeout (int) – timeout to establish ssh connection

• check (bool) – flag whether to check step or not

Returns instantiated ssh client to server ip

Return type ssh.SshClient

Raises TimeoutExpired – if check failed after timeout

6.10. Nova 273

Page 278: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

get_servers(name_prefix=None, check=True)Step to retrieve servers from nova.

Parameters

• name_prefix (str) – prefix of server names to get

• check (bool) – flag whether to check step or not

Returns server list

Return type list

live_migrate(servers, host=None, block_migration=True, check=True)Step to live migrate nova servers.

Parameters

• servers (list) – nova servers to migrate

• host (str) – hypervisor’s hostname to migrate to

• block_migration (bool) – should nova use block or true live migration

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

lock_server(server, check=True)Step to lock server.

Parameters

• server (obj) – nova server to lock

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

migrate_servers(servers, check=True)Step to migrate servers

Parameters

• servers (list) – nova servers to migrate

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

pause_server(server, check=True)Step to pause nova server.

Parameters

• server (object) – nova server to pause

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

reboot_server(server, reboot_type=’SOFT’, check=True)Step to reboot nova server.

Parameters

• server (obj) – nova server

274 Chapter 6. Deep to structure

Page 279: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• reboot_type (str) – REBOOT_SOFT for a software-level reboot, or RE-BOOT_HARD for a virtual power cycle hard reboot

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

rebuild_server(server, image, check=True, **kwargs)Step to rebuild nova server.

Parameters

• server (object) – nova server to rebuild

• image (object) – image used for server rebuild

• check (bool) – flag whether to check step or not

• kwargs – Additional filters to pass

Raises TimeoutExpired – if check failed after timeout

rescue_server(server, check=True)Step to rescue nova server.

Parameters

• server (object) – nova server to rescue

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

resize(server, flavor, check=True)Step to resize server.

Parameters

• server (object) – nova server

• flavor (object) – flavor object

• check (bool) – flag whether check step or not

restore_server(server, check=True)Step to restore soft-deleted server.

Parameters

• server (object) – nova server

• check (bool) – flag whether to check step or not

server_network_listen(remote, port=5010, check=True)Step to start server TCP connection listening.

Parameters

• remote (object) – instance of stepler.third_party.ssh.SshClient

• port (int) – port to send traffic

• check (bool) – flag whether to check step or not

shelve_server(server, check=True)Step to shelve server.

Parameters

6.10. Nova 275

Page 280: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• server (obj) – nova server to shelve

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

start_server(server, check=True)Step to start server.

Parameters

• server (obj) – nova server

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

stop_server(server, check=True)Step to stop server.

Parameters

• server (obj) – nova server

• check (bool) – flag whether to check step or not

Raises TimeoutExpired – if check failed after timeout

unmount_fs_for_server(server_ssh, fs_path, check=True)Step to unmount fs for server.

Parameters

• server_ssh (ssh.SshClient) – ssh connection to nova server

• fs_path (str) – fs path to unmount

• check (bool) – flag whether to check step or not

Raises AssertionError – if check failed

class stepler.nova.steps.NovaServiceSteps(client)Nova service steps.

check_service_states(services, timeout=0)Step to check states of nova services.

This step checks that the current states of nova services are equal to expected ones.

Parameters

• services (list) – list of nova services

• timeout (int) – seconds to wait result of check

Raises TimeoutExpired – if check failed after timeout

check_services_up(host_names=None, timeout=0)Step to check that nova services are up.

If host_names is specified service states atr checked only on these hosts.

Parameters

• host_names (list, optional) – list of host names

• timeout (int, optional) – seconds to wait result of check

Raises TimeoutExpired – if check failed after timeout

276 Chapter 6. Deep to structure

Page 281: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

get_services(check=True)Step to get nova services.

Parameters check (bool, optional) – flag whether check step or not

Returns list of nova services

Return type list

Raises AssertionError – if service list is empty

class stepler.nova.steps.NovaLimitSteps(client)Limits steps.

get_absolute_limits(check=True, **kwgs)Step to get absolute limits.

Parameters

• check (bool) – flag whether to check step or not

• **kwgs (dict, optional) – additional arguments to pass to API

Returns AbsoluteLimit objects

Return type list

Raises AssertionError – if limits list is empty

Nova tests

Nova basic verification tests

stepler.nova.tests.test_basic_verification.test_absolute_limits_list(nova_limit_steps)Scenario: Request list of absolute limits.

Steps:

1.Get list of absolute limits

stepler.nova.tests.test_basic_verification.test_attach_detach_fixed_ip_to_server(flavor,se-cu-rity_group,key-pair,cir-ros_image,net_subnet_router,cre-ate_floating_ip,server_steps)

Scenario: Check server connectivity after attach/detach fixed IP.

Setup:

1.Create flavor

2.Create security_group

3.Create keypair

4.Upload cirros image

6.10. Nova 277

Page 282: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

5.Create network with subnet and router

Steps:

1.Boot two servers from cirros image

2.Create two nova floating ips

3.Attach floating IP to each server

4.Check that each server’s IP address can be pinged from other server

5.Attach new fixed IP to 1’st server

6.Detach old fixed IP from 1’st server

7.Check that new 1’st server’s fixed IP can be pinged from 2’nd server.

Teardown:

1.Delete servers

2.Delete flavor

3.Delete security_group

4.Delete keypair

5.Delete cirros image

6.Delete floating IPs

7.Delete network, subnet, router

stepler.nova.tests.test_basic_verification.test_boot_instance_from_volume_bigger_than_flavor(flavor,se-cu-rity_group,float-ing_ip,cir-ros_image,net_subnet_router,vol-ume_steps,server_steps)

Scenario: Boot instance from volume bigger than flavor size.

This test verifies bug #1517671

Setup:

1.Upload cirros image

2.Create network

3.Create subnet

4.Create router

5.Create security group with allow ping rule

6.Create flavor

Steps:

1.Set router default gateway to public network

278 Chapter 6. Deep to structure

Page 283: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Add router interface to created network

3.Create volume from cirros image with disk size bigger than flavor

4.Boot server from volume

5.Assign floating ip to server

6.Check that ping to server’s floating ip is successful

Teardown:

1.Delete server

2.Delete flavor

3.Delete security group

4.Delete router

5.Delete subnet

6.Delete network

7.Delete cirros image

stepler.nova.tests.test_basic_verification.test_create_delete_flavor(flavor_steps)Scenario: Check flavor can be created and deleted.

Steps:

1.Create flavor

2.Delete flavor

stepler.nova.tests.test_basic_verification.test_create_delete_keypair(keypair)Scenario: Check that keypair can be created and deleted.

Steps:

1.Create keypair

2.Delete keypair

stepler.nova.tests.test_basic_verification.test_create_many_servers_boot_from_cinder(cirros_image,fla-vor,net-work,sub-net,se-cu-rity_group,vol-ume_steps,server_steps,vol-umes_count)

Scenario: Boot many servers from volumes.

Setup:

1.Upload cirros image

2.Create flavor

6.10. Nova 279

Page 284: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

3.Create network

4.Create subnet

5.Create security group with allow ping rule

Steps:

1.Create 10 cinder volumes from cirros image

2.Boot 10 servers from volumes

Teardown:

1.Delete servers

2.Delete volumes

3.Delete security group

4.Delete subnet

5.Delete network

6.Delete flavor

7.Delete cirros image

stepler.nova.tests.test_basic_verification.test_delete_instance_during_resizing(cirros_image,net-work,sub-net,cre-ate_flavor,server_steps,os_faults_steps)

Scenario: Verify that nova can delete servers in resize state.

Note: This test verifies bug #1489775

Setup:

1.Upload cirros image

2.Create network

3.Create subnet

Steps:

1.Create 2 flavors

2.Boot server with smaller flavor

3.Resize server to bigger flavor

4.Delete server immediately after its state will be ‘RESIZE’

5.Check that server’s compute doesn’t contains deleted server artifacts

6.Repeat last 3 steps some times

Teardown:

1.Delete server

2.Delete flavors

280 Chapter 6. Deep to structure

Page 285: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

3.Delete subnet

4.Delete network

5.Delete cirros image

stepler.nova.tests.test_basic_verification.test_delete_server_with_precreated_port(flavor,net-work,port,cir-ros_image,cre-ate_port,port_steps,server_steps)

Scenario: Delete instance with pre-created port.

This test verifies bug #1486727

Setup:

1.Create flavor

2.Create network

3.Create subnet

4.Upload cirros image

5.Create port

Steps:

1.Boot server with created port

2.Delete server

3.Check that port is still present

Teardown:

1.Delete port

2.Delete cirros image

3.Delete network

4.Delete subnet

5.Delete flavor

6.10. Nova 281

Page 286: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.nova.tests.test_basic_verification.test_disk_io_qos_settings_for_rbd_backend(cirros_image,fla-vor,net-work,sub-net,se-cu-rity_group,server_steps,fla-vor_steps,os_faults_steps)

Scenario: Check disk I/O QOS settings for RBD backend.

This test verifies bug #1507504

Setup:

1.Upload cirros image

2.Create flavor

3.Create network

4.Create subnet

5.Create security group with allow ping rule

Steps:

1.Set I/O limits to flavor (disk_read_bytes_sec=10240000 and disk_write_bytes_sec=10240000)

2.Create server

3.Execute ‘virsh dumpxml <inst_name>’ on node where instance is hosted

4.Check that its output contains read_bytes_sec and write_bytes_sec with expected values 10240000

5.Execute ‘ps axu | grep qemu | grep ‘drive file=rbd’ on node

6.Check that its output contains ‘bps_rd=10240000’ and ‘bps_wr=10240000’

Teardown:

1.Delete server

2.Delete security group

3.Delete subnet

4.Delete network

5.Delete flavor

6.Delete cirros image

stepler.nova.tests.test_basic_verification.test_flavors_list(flavor_steps)Scenario: Request list of flavors.

Steps:

1.Get list of flavors

282 Chapter 6. Deep to structure

Page 287: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.nova.tests.test_basic_verification.test_image_access_host_device_when_resizing(ubuntu_image,net_subnet_router,se-cu-rity_group,key-pair,float-ing_ip,cre-ate_flavor,server_steps)

Scenario: Resize server after unmounting fs.

Test on host data leak during resize/migrate for raw-backed instances bug validation. This test verifies bugs#1552683 and #1548450 (CVE-2016-2140).

Setup:

1.Upload cirros image

2.Create network with subnet and router

3.Set router default gateway to public network

4.Create security_group

5.Create keypair

6.Create nova floating ip

Steps:

1.Set use_cow_images=0 value in nova config on all computes

2.Create 2 flavors with ephemeral disk

3.Boot instance with the first flavor

4.Create empty file in /mnt directory

5.Unmount /mnt fs on the instance

6.Create qcow2 image with backing_file linked to target host device in ephemeral block de-vice on instance using the following command: qemu-img create -f qcow2 -obacking_file=/dev/sda3,backing_fmt=raw /dev/vdb 20G

7.Resize flavor for the server

8.Check that /mnt fs doesn’t have files

Teardown:

1.Set use_cow_images param to its initial value on all computes

2.Delete server

3.Delete flavors

4.Delete nova floating ip

5.Delete keypair

6.Delete security group

7.Delete network

6.10. Nova 283

Page 288: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

8.Delete cirros image

stepler.nova.tests.test_basic_verification.test_instances_list(server_steps)Scenario: Request list of instances.

Steps:

1.Get list of instances

stepler.nova.tests.test_basic_verification.test_nova_services(os_faults_steps)Scenario: Check that nova services are alive.

Steps:

1.Get list of nova services

2.Check all services are running

stepler.nova.tests.test_basic_verification.test_remove_incorrect_fixed_ip_from_server(server,float-ing_ip,server_steps)

Scenario: [negative] Remove incorrect fixed IP from an instance.

This test verifies bug #1534186 https://bugs.launchpad.net/nova/+bug/1534186

Setup:

1.Create flavor

2.Create security_group

3.Create keypair

4.Upload cirros image

5.Create nova floating ip

6.Boot server from cirros image

Steps:

1.Attach floating IP to server

2.Generate fake IP

3.Try to detach non-present fixed IP from server

4.Check that error has been raised

5.Detach present fixed IP from server

6.Check that it will be detached with no error

7.Check that server is accessible

Teardown:

1.Delete server

2.Delete flavor

3.Delete security group

4.Delete keypair

5.Delete cirros image

6.Delete nova floating ip

284 Chapter 6. Deep to structure

Page 289: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.nova.tests.test_basic_verification.test_server_basic(flavor, secu-rity_group, key-pair, cirros_image,net_subnet_router,server_steps)

Scenario: Basic test to boot Nova instance.

Setup:

1.Create flavor

2.Create security_group

3.Create keypair

4.Upload cirros image

5.Create network with subnet and router

Steps:

1.Boot one server from cirros image

Teardown:

1.Delete server

2.Delete flavor

3.Delete security_group

4.Delete keypair

5.Delete cirros image

6.Delete network, subnet, router

Nova deferred delete tests

stepler.nova.tests.test_deferred_delete.test_force_delete_server_before_deferred_cleanup(cirros_image,fla-vor,net_subnet_router,key-pair,se-cu-rity_group,vol-ume,cre-ate_server_context,at-tach_volume_to_server,de-tach_volume_from_server,server_steps,vol-ume_steps)

Scenario: Force delete of instance before deferred cleanup

Setup:

6.10. Nova 285

Page 290: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Update /etc/nova/nova.conf with ‘reclaim_instance_interval=86400’ and restart nova-api and nova-compute on all nodes

2.Create cirros image

3.Create flavor

4.Create net, subnet and router

5.Create keypair

6.Create security group

Steps:

1.Create and run two instances (vm1, vm2) inside same net

2.Create a volume and attach it to an instance vm1

3.Delete instance vm1 and check that it’s in ‘SOFT_DELETE’ state

4.Delete instance vm1 with ‘force’ option and check that it’s not present.

5.Check that volume is released now and has an Available state;

6.Attach the volume to vm2 and check that it has ‘in-use’ state.

7.Detach the volume

Teardown:

1.Delete volume

2.Delete vms

3.Delete security group

4.Delete keypair

5.Delete net, subnet and router

6.Delete flavor

7.Delete cirros image

8.Restore original config files and restart nova-api and nova-compute on all nodes

stepler.nova.tests.test_deferred_delete.test_restore_soft_deleted_server(cirros_image,fla-vor,net_subnet_router,key-pair,se-cu-rity_group,vol-ume,cre-ate_floating_ip,at-tach_volume_to_server,vol-ume_steps,server_steps)

Scenario: Restore previously deleted instance

286 Chapter 6. Deep to structure

Page 291: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Setup:

1.Update /etc/nova/nova.conf with ‘reclaim_instance_interval=86400’ and restart nova-api and nova-compute on all nodes

2.Create cirros image

3.Create flavor

4.Create net and subnet and router

5.Create keypair

6.Create security group

Steps:

1.Create and run two instances (vm1, vm2) inside same net

2.Create and attach floating IPs to instances

3.Check that ping are successful between vms

4.Create a volume and attach it to an instance vm1

5.Delete instance vm1 and check that it’s in ‘SOFT_DELETE’ state

6.Restore vm1 instance and check that it’s in ‘ACTIVE’ state

7.Check that ping are successful between vms

Teardown:

1.Delete volume

2.Delete vms

3.Delete net, subnet, router

4.Delete security group

5.Delete keypair

6.Delete flavor

7.Delete cirros image

8.Restore original config files and restart nova-api and nova-compute on all nodes

6.10. Nova 287

Page 292: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.nova.tests.test_deferred_delete.test_server_deleted_after_reclaim_timeout(cirros_image,fla-vor,net_subnet_router,key-pair,se-cu-rity_group,vol-ume,at-tach_volume_to_server,de-tach_volume_from_server,server_steps,vol-ume_steps)

Scenario: Check that softly-deleted instance is totally deleted after reclaim interval timeout.

Setup:

1.Update ‘/etc/nova/nova.conf’ with ‘reclaim_instance_interval=30’ and restart nova-api and nova-computeon all nodes

2.Create cirros image

3.Create flavor

4.Create net and subnet and router

5.Create keypair

6.Create security group

Steps:

1.Create and run two instances (vm1, vm2) inside same net

2.Create and attach floating IPs to instances

3.Check that ping are successful between vms

4.Create a volume and attach it to an instance vm1

5.Delete instance vm1 and check that it’s in ‘SOFT_DELETE’ state

6.Wait for the reclaim instance interval to expire and make sure that vm1 is deleted

7.Check that volume is released now and has an Available state

8.Attach the volume to vm2 and check that it has ‘in-use’ state.

9.Detach the volume

Teardown:

1.Delete volume

2.Delete vms

3.Delete security group

4.Delete keypair

5.Delete net, subnet and router

288 Chapter 6. Deep to structure

Page 293: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

6.Delete flavor

7.Delete cirros image

8.Restore original config files and restart nova-api and nova-compute on all nodes

~! BUG !~ https://bugs.launchpad.net/cinder/+bug/1463856 Cinder volume isn’t available after instance soft-deleted timer expired while volume is still attached.

Nova host actions tests

stepler.nova.tests.test_host_actions.test_host_resources_info(cirros_image, fla-vor, network, sub-net, server_steps,host_steps)

Scenario: Get info about resources’ usage on nodes.

Setup:

1.Create cirros image

2.Create flavor

3.Create net and subnet

Steps:

1.Get resource info for node-1 and node-2

2.Create two servers on node-1

3.Get resource info for node-1 and check that resource usage is changed and project_id is present in results

4.Get resource info for node-2 and check that resource usage is not changed

5.Create two servers on node-2

6.Get resource info for node-1 and check that resource usage is not changed

7.Get resource info for node-2 and check that resource usage is changed and project_id is present in results

Teardown:

1.Delete servers

2.Delete net and subnet

3.Delete flavor

4.Delete cirros image

stepler.nova.tests.test_host_actions.test_migrate_servers(cirros_image,net_subnet_router,security_group,flavor, keypair,nova_availability_zone_hosts,server_steps, cre-ate_floating_ip)

Scenario: Migrate servers from the specified host to other hosts.

Setup:

1.Upload cirros image

2.Create network, subnet, router

6.10. Nova 289

Page 294: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

3.Create security group with allowed ping and ssh rules

4.Create flavor

Steps:

1.Boot 3 servers on the same hypervisor

2.Start migration for all servers

3.Check that every server is rescheduled to other hypervisor

4.Confirm resize for every server

5.Check that every migrated server has an ACTIVE status

6.Assign floating ip for all servers

7.Send pings between all servers to check network connectivity

Teardown:

1.Delete servers

2.Delete flavor

3.Delete security group

4.Delete network, subnet, router

5.Delete cirros image

Nova live migration tests

stepler.nova.tests.test_live_migration.test_migration_with_ephemeral_disk(keypair,se-cu-rity_group,float-ing_ip,cir-ros_image,net_subnet_router,cre-ate_flavor,server_steps,block_migration)

Scenario: LM of VM with data on root and ephemeral disk.

Setup:

1.Upload cirros image

2.Create network

3.Create subnet

4.Create router

5.Set router default gateway to public network

6.Create security group with allow ping rule

Steps:

290 Chapter 6. Deep to structure

Page 295: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Add router interface to created network

2.Create flavor with ephemeral disk

3.Boot server from cirros image with created flavor

4.Assign floating ip to server

5.Create timestamp on on root and ephemeral disks

6.Migrate server to another hypervisor

7.Start ping instance

8.Check that pings reach the server succesfully

9.Verify timestamp on root and ephemeral disks

Teardown:

1.Delete server

2.Delete flavor

3.Delete volume

4.Delete security group

5.Delete router

6.Delete subnet

7.Delete network

8.Delete cirros image

stepler.nova.tests.test_live_migration.test_network_connectivity_to_vm_after_live_migration(floating_ip,server,server_steps,block_migration)

Scenario: Verify connectivity to the VM after live migration.

Setup:

1.Upload cirros image

2.Create network

3.Create subnet

4.Create router

5.Set router default gateway to public network

6.Create security group with allow ping rule

7.Create flavor

8.Add router interface to created network

9.Boot server from cirros image

10.Assign floating ip to server

Steps:

1.Migrate server to another hypervisor

2.Start ping

3.Check that pings reach the server succesfully

6.10. Nova 291

Page 296: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Teardown:

1.Delete server

2.Delete flavor

3.Delete security group

4.Delete router

5.Delete subnet

6.Delete network

7.Delete cirros image

stepler.nova.tests.test_live_migration.test_server_migration_with_cpu_workload(live_migration_server,float-ing_ip,server_steps,block_migration)

Scenario: LM of instance under CPU workload.

Setup:

1.Upload ubuntu image

2.Create network

3.Create subnet

4.Create router

5.Set router default gateway to public network

6.Create security group with allow ping rule

7.Create flavor

8.Add router interface to created network

9.Boot server from image or volume

10.Assign floating ip to server

Steps:

1.Start CPU workload on server

2.Migrate server to another hypervisor

3.Check that ping to server’s floating ip is successful

4.Delete server

Teardown:

1.Delete flavor

2.Delete security group

3.Delete router

4.Delete subnet

5.Delete network

6.Delete ubuntu image

292 Chapter 6. Deep to structure

Page 297: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.nova.tests.test_live_migration.test_server_migration_with_disk_workload(live_migration_server,float-ing_ip,server_steps,block_migration)

Scenario: LM of instance under disk workload.

Setup:

1.Upload ubuntu image

2.Create network

3.Create subnet

4.Create router

5.Set router default gateway to public network

6.Create security group with allow ping rule

7.Create flavor

8.Add router interface to created network

9.Boot server from image or volume

10.Assign floating ip to server

Steps:

1.Start disk workload on server

2.Migrate server to another hypervisor

3.Check that ping to server’s floating ip is successful

4.Delete server

Teardown:

1.Delete flavor

2.Delete security group

3.Delete router

4.Delete subnet

5.Delete network

6.Delete ubuntu image

stepler.nova.tests.test_live_migration.test_server_migration_with_memory_workload(live_migration_server,float-ing_ip,server_steps,block_migration)

Scenario: LM of instance under memory workload.

Setup:

1.Upload ubuntu image

2.Create network

3.Create subnet

4.Create router

6.10. Nova 293

Page 298: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

5.Set router default gateway to public network

6.Create security group with allow ping rule

7.Create flavor

8.Add router interface to created network

9.Boot server from image or volume

10.Assign floating ip to server

Steps:

1.Start memory workload on server

2.Migrate server to another hypervisor

3.Check that ping to server’s floating ip is successful

4.Delete server

Teardown:

1.Delete flavor

2.Delete security group

3.Delete router

4.Delete subnet

5.Delete network

6.Delete ubuntu image

stepler.nova.tests.test_live_migration.test_server_migration_with_network_workload(live_migration_server,se-cu-rity_group,float-ing_ip,neu-tron_security_group_rule_steps,server_steps,gen-er-ate_traffic,block_migration)

Scenario: LM of instance under network workload.

Setup:

1.Upload ubuntu image

2.Create network

3.Create subnet

4.Create router

5.Set router default gateway to public network

6.Create security group with allow ping rule

7.Create flavor

8.Add router interface to created network

294 Chapter 6. Deep to structure

Page 299: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

9.Boot server from image or volume

10.Assign floating ip to server

Steps:

1.Start network workload on server

2.Migrate server to another hypervisor

3.Check that ping to server’s floating ip is successful

4.Delete server

Teardown:

1.Delete flavor

2.Delete security group

3.Delete router

4.Delete subnet

5.Delete network

6.Delete ubuntu image

Nova live migration of multiple servers tests

stepler.nova.tests.test_live_migration_multi_servers.test_migration_with_attached_volume(live_migration_servers_with_volumes,server_steps,block_migration)

Scenario: LM of servers with attached volumes.

Setup:

1.Upload ubuntu image

2.Create network with subnet and router

3.Create security group with allow ping rule

4.Create flavor

5.Boot maximum allowed number of servers from image or volume

6.Attach volume to each server

7.Assign floating ips to servers

Steps:

1.Initiate LM of servers to another compute node

2.Check that ping to servers’ floating ips is successful

Teardown:

1.Delete servers

2.Delete volumes

3.Delete flavor

4.Delete security group

5.Delete network, subnet, router

6.10. Nova 295

Page 300: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

6.Delete ubuntu image

stepler.nova.tests.test_live_migration_multi_servers.test_migration_with_cpu_workload(live_migration_servers,server_steps,block_migration)

Scenario: LM of servers under CPU workload.

Setup:

1.Upload ubuntu image

2.Create network with subnet and router

3.Create security group with allow ping rule

4.Create flavor

5.Boot maximum allowed number of servers from image or volume

6.Assign floating ips to servers

Steps:

1.Start CPU workload on servers

2.Initiate LM of servers to another compute node

3.Check that ping to servers’ floating ips is successful

4.Delete servers

Teardown:

1.Delete flavor

2.Delete security group

3.Delete network, subnet, router

4.Delete ubuntu image

stepler.nova.tests.test_live_migration_multi_servers.test_migration_with_disk_workload(live_migration_servers,server_steps,block_migration)

Scenario: Block LM of servers under disk workload.

Setup:

1.Upload ubuntu image

2.Create network with subnet and router

3.Create security group with allow ping rule

4.Create flavor

5.Boot maximum allowed number of servers from image

6.Assign floating ips to servers

Steps:

1.Start disk workload on servers

2.Initiate LM of servers to another compute node

3.Check that ping to servers’ floating ips is successful

4.Delete servers

296 Chapter 6. Deep to structure

Page 301: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Teardown:

1.Delete flavor

2.Delete security group

3.Delete network, subnet, router

4.Delete ubuntu image

stepler.nova.tests.test_live_migration_multi_servers.test_migration_with_large_flavors(live_migration_servers,server_steps,block_migration)

Scenario: LM of servers with attached volumes.

Setup:

1.Upload ubuntu image

2.Create network with subnet and router

3.Create security group with allow ping rule

4.Create flavor

5.Boot maximum allowed number of servers from image or volume

6.Attach volume to each server

7.Assign floating ips to servers

Steps:

1.Initiate LM of servers to another compute node

2.Check that ping to servers’ floating ips is successful

Teardown:

1.Delete servers

2.Delete volumes

3.Delete flavor

4.Delete security group

5.Delete network, subnet, router

6.Delete ubuntu image

stepler.nova.tests.test_live_migration_multi_servers.test_migration_with_memory_workload(live_migration_servers,server_steps,block_migration)

Scenario: LM of servers under memory workload.

Setup:

1.Upload ubuntu image

2.Create network with subnet and router

3.Create security group with allow ping rule

4.Create flavor

5.Boot maximum allowed number of servers from image or volume

6.Assign floating ips to servers

6.10. Nova 297

Page 302: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Steps:

1.Start memory workload on servers

2.Initiate LM of servers to another compute node

3.Check that ping to servers’ floating ips is successful

4.Delete servers

Teardown:

1.Delete flavor

2.Delete security group

3.Delete network, subnet, router

4.Delete ubuntu image

stepler.nova.tests.test_live_migration_multi_servers.test_migration_with_network_workload(live_migration_servers,se-cu-rity_group,neu-tron_security_group_rule_steps,server_steps,gen-er-ate_traffic,block_migration)

Scenario: LM of servers under network workload.

Setup:

1.Upload ubuntu image

2.Create network with subnet and router

3.Create security group with allow ping rule

4.Create flavor

5.Boot maximum allowed number of servers from image or volume

6.Assign floating ips to servers

Steps:

1.Allow servers to listen TCP port

2.Start network workload on servers

3.Initiate LM of servers to another compute node

4.Check that ping to servers’ floating ips is successful

5.Delete servers

Teardown:

1.Delete flavor

2.Delete security group

3.Delete network, subnet, router

4.Delete ubuntu image

298 Chapter 6. Deep to structure

Page 303: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Server metadata tests

stepler.nova.tests.test_metadata.test_metadata_reach_all_booted_vm(security_group,float-ing_ip,ubuntu_image,keypair,flavor,net_subnet_router,cre-ate_server_context,server_steps)

Scenario: Verify that image can be connected with SSH.

Setup:

1.Create security group

2.Create floating IP

3.Get Glance ubuntu image OR download and create it if ubuntu image is not present.

4.Create keypair

5.Create flavor

Steps:

1.Get flavor m1.small

2.Get admin internal network

3.Create nova server

4.Attach floating IP to nova server

5.Check that server is available via SSH

6.Detach floating IP

7.Delete nova server

Teardown:

1.Delete flavor

2.Delete keypair

3.Release floating IP

4.Delete security group

6.10. Nova 299

Page 304: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.nova.tests.test_metadata.test_put_metadata_on_instances_on_single_compute(security_group,fla-vor,cir-ros_image,net-work,sub-net,nova_availability_zone_hosts,fla-vor_steps,server_steps,os_faults_steps,ex-e-cute_command_with_rollback)

Scenario: Put metadata on all instances scheduled on a single compute node.

Setup:

1.Create security group

2.Create flavor

3.Upload cirros image

4.Create network and subnetwork

Steps:

1.Get FQDNs of nova hosts

2.Create 2 nova servers on host 1

3.Create 2 nova servers on host 2

4.From controller node add new ‘key=value’ to metadata of servers, located on host 1.

5.Check that servers from host 1 have ‘key=value’ in their metadata

6.Check that servers from host 2 do NOT have ‘key=value’ in their metadata

7.From controller node delete ‘key=value’ from metadata of servers, located on host 1.

8.Check that servers from host 1 and host 2 do NOT have ‘key=value’ in their metadata

Teardown:

1.Delete servers

2.Delete security group

3.Delete network and subnetwork

Nova Rebuild tests

stepler.nova.tests.test_rebuild.test_rebuild_in_paused_state(cirros_image,server,server_steps)

Scenario: Try to rebuild an instance in Paused state.

Setup:

300 Chapter 6. Deep to structure

Page 305: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Create server

Steps:

1.Pause server

2.Try to rebuild server

3.Check that rebuild fails and exception is called

Teardown:

1.Delete server

stepler.nova.tests.test_rebuild.test_rebuild_in_rescue_state(cirros_image,server,server_steps)

Scenario: Try to rebuild an instance in Rescued state.

Setup:

1.Create server

Steps:

1.Rescue server

2.Try to rebuild server

3.Check that rebuild fails and exception is called

Teardown:

1.Delete server

stepler.nova.tests.test_rebuild.test_rebuild_locked_server(cirros_server_to_rebuild,cirros_image, float-ing_ip, server_steps)

Scenario: Rebuild locked server.

Setup:

1.Upload cirros image

2.Create network with subnet and router

3.Create security group with allowed ping and ssh rules

4.Create flavor

5.Boot a server from image or volume

Steps:

1.Create a floating IP and attach it to previously created server

2.Lock the server and check its status

3.Rebuild previously locked server

4.Check that rebuilt server has an ACTIVE status and locked=True

5.Send pings to server’s floating IP to check network connectivity

Teardown:

1.Delete a server

2.Delete flavor

6.10. Nova 301

Page 306: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

3.Delete security group

4.Delete network, subnet, router

5.Delete floating IP

6.Delete cirros image

stepler.nova.tests.test_rebuild.test_rebuild_server_with_description(cirros_server_to_rebuild,cir-ros_image,float-ing_ip,server_steps)

Scenario: Rebuild server with description.

Setup:

1.Upload cirros image

2.Create network with subnet and router

3.Create security group with allowed ping and ssh rules

4.Create flavor

5.Boot a server from image or volume

Steps:

1.Create a floating IP and attach it to previously created server

2.Rebuild the server with –description parameter

3.Check that rebuilt server has an ACTIVE status

4.Check that the description was added

5.Send pings to server’s floating IP to check network connectivity

Teardown:

1.Delete a server

2.Delete flavor

3.Delete security group

4.Delete network, subnet, router

5.Delete floating IP

6.Delete cirros image

stepler.nova.tests.test_rebuild.test_rebuild_with_user_files(ubuntu_server_to_rebuild,ubuntu_image,floating_ip,server_steps)

Scenario: Rebuild server with user files.

Setup:

1.Upload ubuntu image

2.Create network with subnet and router

3.Create security group with allowed ping and ssh rules

4.Create flavor

302 Chapter 6. Deep to structure

Page 307: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

5.Boot a server from image or volume

Steps:

1.Create a floating IP and attach it to previously created server

2.Rebuild the server with –files parameter

3.Check that rebuilt server has an ACTIVE status

4.Check that ubuntu booted successfully on a rebuilt server

5.Check that all files added during server’s rebuild are present in target directory of this server

Teardown:

1.Delete a server

2.Delete flavor

3.Delete security group

4.Delete network, subnet, router

5.Delete floating IP

6.Delete ubuntu image

Restart all nova services

stepler.nova.tests.test_restart_all_services.test_restart_all_nova_services(cirros_image,fla-vor,se-cu-rity_group,net_subnet_router,cre-ate_floating_ip,os_faults_steps,server_steps)

Scenario: Restart all Nova services.

Setup:

1.Create cirros image

2.Create flavor

3.Create security group

4.Create network_1 with subnet_1 and router_1

Steps:

1.Boot server_1 and associate floating IP

2.Check that ping from server_1 to 8.8.8.8 is successful

3.Restart all running nova services on controllers

4.Boot server_2 and associate floating IP

5.Check ping between server_1 and server_2 and ping to 8.8.8.8

6.Restart all running nova services on computes

6.10. Nova 303

Page 308: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

7.Boot server_3 and associate floating IP

8.Check ping between server_1, server_2, server_3 and ping to 8.8.8.8

9.Restart all running nova services

10.Check ping between server_1, server_2, server_3 and ping to 8.8.8.8

11.Delete all servers

Teardown:

1.Delete network, subnet, router

2.Delete floating IPs

3.Delete security group

4.Delete flavor

5.Delete cirros image

Nova evacuate tests

stepler.nova.tests.test_evacuate.test_evacuate_locked_servers(servers_to_evacuate,nova_api_node,server_steps,os_faults_steps)

Scenario: Evacuate locked servers from the “failed” host to other hosts.

Setup:

1.Upload cirros image

2.Create network with subnet and router

3.Create security group with allowed ping and ssh rules

4.Create flavor

5.Boot two servers from image or volume on the same hypervisor

6.Create two floating IPs and attach them to servers

Steps:

1.Lock previously created servers

2.Set the hypervisor where servers are scheduled to “failed” state

3.Start evacuation for all servers

4.Check that every server is rescheduled to other hypervisor

5.Check that every evacuated server has an ACTIVE status and locked=True

6.Send pings between all servers to check network connectivity

Teardown:

1.Delete all servers

2.Delete flavor

3.Delete security group

4.Delete network, subnet, router

304 Chapter 6. Deep to structure

Page 309: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

5.Delete floating IPs

6.Delete cirros image

stepler.nova.tests.test_evacuate.test_evacuate_paused_servers(servers_to_evacuate,nova_api_node,server_steps,os_faults_steps)

Scenario: Try to evacuate servers in Paused state.

Setup:

1.Upload cirros image

2.Create network with subnet and router

3.Create security group with allowed ping and ssh rules

4.Create flavor

5.Boot two servers from image or volume on the same hypervisor

6.Create two floating IPs and attach them to servers

Steps:

1.Pause previously created servers

2.Set the hypervisor where servers are scheduled to “failed” state

3.Start evacuation for all servers

4.Check that evacuation fails and exception is called

Teardown:

1.Delete all servers

2.Delete flavor

3.Delete security group

4.Delete network, subnet, router

5.Delete floating IPs

6.Delete cirros image

stepler.nova.tests.test_evacuate.test_evacuate_rescue_servers(servers_to_evacuate,nova_api_node,server_steps,os_faults_steps)

Scenario: Try to evacuate servers in Rescue state.

Setup:

1.Upload cirros image

2.Create network with subnet and router

3.Create security group with allowed ping and ssh rules

4.Create flavor

5.Boot two servers from image or volume on the same hypervisor

6.Create two floating IPs and attach them to servers

Steps:

6.10. Nova 305

Page 310: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Rescue previously created servers

2.Set the hypervisor where servers are scheduled to “failed” state

3.Start evacuation for all servers

4.Check that evacuation fails and exception is called

Teardown:

1.Delete all servers

2.Delete flavor

3.Delete security group

4.Delete network, subnet, router

5.Delete floating IPs

6.Delete cirros image

stepler.nova.tests.test_evacuate.test_evacuate_resized_servers(servers_to_evacuate,small_flavor,nova_api_node,server_steps,os_faults_steps)

Scenario: Try to evacuate servers in Resized state.

Setup:

1.Upload cirros image

2.Create network with subnet and router

3.Create security group with allowed ping and ssh rules

4.Create flavor

5.Boot two servers from image or volume on the same hypervisor

6.Create two floating IPs and attach them to servers

Steps:

1.Resize previously created servers with m1.small flavor

2.Set the hypervisor where servers are scheduled to “failed” state

3.Start evacuation for all servers

4.Check that evacuation fails and exception is called

Teardown:

1.Delete all servers

2.Delete flavors

3.Delete security group

4.Delete network, subnet, router

5.Delete floating IPs

6.Delete cirros image

306 Chapter 6. Deep to structure

Page 311: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.nova.tests.test_evacuate.test_evacuate_servers(servers_to_evacuate,nova_api_node,server_steps,os_faults_steps)

Scenario: Evacuate servers from the “failed” host to other hosts.

Setup:

1.Upload cirros image

2.Create network with subnet and router

3.Create security group with allowed ping and ssh rules

4.Create flavor

5.Boot two servers from image or volume on the same hypervisor

6.Create two floating IPs and attach them to servers

Steps:

1.Set the hypervisor where servers are scheduled to “failed” state

2.Start evacuation for all servers

3.Check that every server is rescheduled to other hypervisor

4.Check that every evacuated server has an ACTIVE status

5.Send pings between all servers to check network connectivity

Teardown:

1.Delete all servers

2.Delete flavor

3.Delete security group

4.Delete network, subnet, router

5.Delete floating IPs

6.Delete cirros image

stepler.nova.tests.test_evacuate.test_evacuate_servers_to_initial_compute(servers_to_evacuate,nova_api_node,server_steps,os_faults_steps)

Scenario: Try to evacuate servers to initial “failed” compute node.

Setup:

1.Upload cirros image

2.Create network with subnet and router

3.Create security group with allowed ping and ssh rules

4.Create flavor

5.Boot two servers from image or volume on the same hypervisor

6.Create two floating IPs and attach them to servers

Steps:

1.Set the hypervisor where servers are scheduled to “failed” state

6.10. Nova 307

Page 312: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Start evacuation for all servers to their “native” compute node

3.Check that evacuation fails and exception is called

Teardown:

1.Delete all servers

2.Delete flavor

3.Delete security group

4.Delete network, subnet, router

5.Delete floating IPs

6.Delete cirros image

stepler.nova.tests.test_evacuate.test_evacuate_servers_with_volumes(servers_with_volumes_to_evacuate,nova_api_node,server_steps,os_faults_steps,vol-ume_steps)

Scenario: Evacuate servers with volumes attached from the “failed” host to other hosts.

Setup:

1.Upload cirros image

2.Create network with subnet and router

3.Create security group with allowed ping and ssh rules

4.Create flavor

5.Boot two servers from image or volume on the same hypervisor

6.Create two floating IPs and attach them to servers

7.Create two volumes and attach them to servers

Steps:

1.Set the hypervisor where servers are scheduled to “failed” state

2.Start evacuation for all servers

3.Check that every server is rescheduled to other hypervisor

4.Check that every evacuated server has an ACTIVE status

5.Check that all volumes are in ‘in-use’ state

6.Send pings between all servers to check network connectivity

Teardown:

1.Delete all servers

2.Delete flavor

3.Delete security group

4.Delete network, subnet, router

5.Delete floating IPs

6.Delete volumes

308 Chapter 6. Deep to structure

Page 313: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

7.Delete cirros image

stepler.nova.tests.test_evacuate.test_evacuate_shelved_servers(servers_to_evacuate,nova_api_node,server_steps,os_faults_steps)

Scenario: Try to evacuate servers in Shelved state.

Setup:

1.Upload cirros image

2.Create network with subnet and router

3.Create security group with allowed ping and ssh rules

4.Create flavor

5.Boot two servers from image or volume on the same hypervisor

6.Create two floating IPs and attach them to servers

Steps:

1.Shelve previously created servers

2.Set the hypervisor where servers are scheduled to “failed” state

3.Start evacuation for all servers

4.Check that evacuation fails and exception is called

Teardown:

1.Delete all servers

2.Delete flavor

3.Delete security group

4.Delete network, subnet, router

5.Delete floating IPs

6.Delete cirros image

Object Storage

Swift conftest

stepler.object_storage.conftest.container(container_steps)Fixture to create container.

Parameters container_steps (obj) – instantiated container steps

Yields attrdict.AttrDict – created container name and info

stepler.object_storage.conftest.container_steps(swift_client, os_faults_steps,s3_client)

Fixture to get swift container steps.

Parameters

• swift_client (obj) – instantiated swift client

6.11. Object Storage 309

Page 314: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• os_faults_steps (obj) – instantiated os_faults steps

• s3_client (obj) – s3 client

Returns instantiated swift or rbd container steps

Return type object

stepler.object_storage.conftest.s3_client(current_user, ec2_credentials)Fixture to get s3 client.

Parameters

• current_user (obj) – current user

• ec2_credentials (obj) – EC2 credentials for current user

Returns s3 client

Return type obj

stepler.object_storage.conftest.swift_client(session)Function fixture to get swift client.

Returns instantiated swift client

Return type object

Object Storage steps

class stepler.object_storage.steps.ContainerSwiftSteps(client)Swift container steps.

check_object_content(container_name, object_name, expected_content)Step to check object content.

Parameters

• container_name (str) – container name

• object_name (str) – object name

• expected_content (str) – expected content

Raises AssertionError – if object content is not equal to expected content

check_object_presence(container_name, object_name, must_present=True)Step to check object presence.

Parameters

• container_name (str) – container name

• object_name (str) – object name

• must_present (bool, optional) – flag whether object should exist or not

Raises AssertionError – if check failed

check_presence(name, must_present=True)Step to check container presence.

Parameters

• name (str) – container name

• must_present (bool, optional) – flag whether container should exist or not

310 Chapter 6. Deep to structure

Page 315: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Raises AssertionError – if check failed

create(name, check=True)Step to create container and check it exists in containers list.

Parameters

• name (str) – container name

• check (bool, optional) – flag whether to check this step or not

Returns created container

Return type dict

Raises AssertionError – if check failed

delete(name, check=True)Step to delete container by name.

Parameters

• name (str) – container name

• check (bool, optional) – flag whether to check this step or not

Raises AssertionError – if container is not deleted

delete_object(container_name, object_name, check=True)Step to delete object from container.

Parameters

• container_name (str) – container name

• object_name (str) – object name

• check (bool, optional) – flag whether to check this step or not

Raises AssertionError – if object is present in container after deleting

get(name, check=True)Step to get container by name.

Parameters

• name (str) – container name

• check (bool, optional) – flag whether to check this step or not

Returns container

Return type dict

Raises AssertionError – if container dict is empty

get_object(container_name, object_name, check=True)Step to get (download) object from container.

Parameters

• container_name (str) – container name

• object_name (str) – object name

• check (bool, optional) – flag whether to check this step or not

Returns object content

Return type str

6.11. Object Storage 311

Page 316: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

put_object(container_name, object_name, content, check=True)Step to put object to container.

Parameters

• container_name (str) – container name

• object_name (str) – object name

• content (str) – content to put

• check (bool, optional) – flag whether to check this step or not

Raises AssertionError – if object is not present in container

class stepler.object_storage.steps.ContainerCephSteps(client)Ceph container steps.

check_object_hash(created_key_name, downloaded_key_name)Step to check md5 checksum of two buckets.

Parameters

• created_key_name (str) – name of object which was upload to bucket

• downloaded_key_name (str) – name of object which was download

• bucket (from) –

Raises AssertionError – if check failed

check_object_presence(name, key, chunksize=None, must_present=True)Step to check object presence.

Parameters

• name (str) – bucket name

• key (str) – key of object

• chunksize (int) – chunksize of object

• must_present (bool, optional) – flag whether object should exist

• not (or) –

Raises AssertionError – if check failed

check_presence(name, must_present=True)Step to check container presents in containers list.

Parameters

• name (str) – bucket name

• must_present (bool, optional) – flag whether container should exist or not

Raises AssertionError – if check failed

create(name=None, check=True)Step to create bucket.

Parameters

• name (str|None) – bucket name

• check (bool, optional) – flag whether to check this step or not

Returns bucket – created bucket

312 Chapter 6. Deep to structure

Page 317: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Return type obj

Raises AssertionError – if check failed

delete(name, check=True)Step to delete bucket.

Parameters

• name (str) – name of bucket to delete

• check (bool, optional) – flag whether to check this step or not

Raises AssertionError – if check failed

delete_object(name, key, check=True)Step to delete object from bucket.

Parameters

• name (str) – bucket name

• key (str) – key of object

• check (bool, optional) – flag whether to check this step or not

Raises AssertionError – if check failed

get_object(name, key, check=True)Step to download object from bucket.

Parameters

• name (str) – bucket name

• key (str) – key of object

• check (bool, optional) – flag whether to check this step or not

Returns downloaded_key – path to the new object

Return type str

Raises AssertionError – if check failed

list(check=True)Step to list all buckets.

Parameters check (bool, optional) – flag whether to check this step or not

Returns buckets_name_list – list of all buckets

Return type dict

Raises AssertionError – if check failed

put_object(name, key, check=True, chunksize=None)Step to put object to bucket.

Parameters

• name (str) – bucket name

• key (str) – key of object

• chunksize (int) – chunksize of object

• check (bool, optional) – flag whether to check this step or not

Raises AssertionError – if check failed

6.11. Object Storage 313

Page 318: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Object Storage tests

OS faults

Annotation

os_faults is an external OpenStack fault-injection library. The library does destructive actions inside an OpenStackcloud. It provides an abstraction layer over different types of cloud deployments. The actions are implemented asdrivers (e.g. DevStack driver, Fuel driver, Libvirt driver, IPMI driver). See https://github.com/openstack/os-faults formore details.

Stepler provides some fixtures and steps based on os_faults functions, ex: get list of nodes, restart services etc. Thelibrary os_faults is installed during installation of Stepler.

Configuration

Before using os_faults, the cloud configuration file in JSON format must be created. This file defines cloud type, IPaddress and other data. Its example for a cloud based on Fuel is shown below.

{'cloud_management': {'driver': 'fuel','args': {

'address': '10.109.0.2','username': 'root'

}},'power_management': {'driver': 'libvirt','args': {

'connection_uri': "qemu+unix:///system"}

}}

Pathname of such configuration file must be set via the environment variable OS_FAULTS_CONFIG, ex: exportOS_FAULTS_CONFIG=”/home/smith/os_fault_config.json”

Important

For correct running of os_faults, there should be provided access via keys from host where tests are running to allnodes. It can be done using the special script. TODO: add later

Fixtures and steps

Openstack CLI

CLI conftest

Contains fixtures specific for cinder.

stepler.cli_clients.conftest.remote_executor(nova_api_node, os_faults_steps, creden-tials)

Function fixture to get remote command executor.

314 Chapter 6. Deep to structure

Page 319: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• nova_api_node (object) – controller (node with nova-api service)

• os_faults_steps (object) – instantiated os_faults steps

• credentials (object) – CredentialsManager instance

Returns function to execute command on nova_api_node

Return type callable

stepler.cli_clients.conftest.cli_cinder_steps(remote_executor)Function fixture to cinder CLI steps.

Parameters remote_executor (callable) – function to execute command on controllernodes

Returns instantiated cinder CLI steps

Return type CliCinderSteps

stepler.cli_clients.conftest.cli_glance_steps(remote_executor)Function fixture to glance CLI steps.

Parameters remote_executor (callable) – function to execute command on controllernodes

Returns instantiated glance CLI steps

Return type CliGlanceSteps

stepler.cli_clients.conftest.cli_download_image(nova_api_node, os_faults_steps,cli_glance_steps)

Callable function fixture to download image via CLI.

Parameters

• nova_api_node (obj) – controller (node with nova-api service)

• os_faults_steps (OsFaultsSteps) – instantiated os-faults steps

• cli_glance_steps (CliGlanceSteps) – instantiated glance CLI steps

Returns function to download image via CLI.

Return type function

stepler.cli_clients.conftest.cli_heat_steps(remote_executor)Function fixture to get heat CLI steps.

Parameters remote_executor (callable) – function to execute command on controllernodes

Returns initialized heat CLI steps

Return type object

stepler.cli_clients.conftest.empty_heat_template_path(nova_api_node,get_template_path,os_faults_steps)

Upload empty heat template to nova_api_node and return its path.

Delete uploaded file on teardown.

Parameters

• nova_api_node (obj) – controller (node with nova-api service)

6.13. Openstack CLI 315

Page 320: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• get_template_path (callable) – function to get local path to template

• os_faults_steps (obj) – initialized os-faults steps

Returns path to template on nova_api_node

Return type str

stepler.cli_clients.conftest.cli_ironic_steps(remote_executor)Function fixture to Ironic CLI steps.

Parameters remote_executor (callable) – function to execute command on controllernodes

Returns instantiated Ironic CLI steps

Return type CliIronicSteps

stepler.cli_clients.conftest.cli_nova_steps(remote_executor)Function fixture to nova CLI steps.

Parameters remote_executor (callable) – function to execute command on controllernodes

Returns instantiated nova CLI steps.

Return type CliNovaSteps

stepler.cli_clients.conftest.cli_openstack_steps(remote_executor)Function fixture to openstack CLI steps.

Parameters remote_executor (callable) – function to execute command on controllernodes

Returns instantiated openstack CLI steps.

Return type CliOpenstackSteps

stepler.cli_clients.conftest.cli_neutron_steps(remote_executor)Function fixture to neutron CLI steps.

Parameters remote_executor (callable) – function to execute command on controllernodes

Returns instantiated neutron CLI steps

Return type CliNeutronSteps

stepler.cli_clients.conftest.cli_swift_steps(remote_executor)Function fixture to object storage CLI steps.

Parameters remote_executor (callable) – function to execute command on controllernodes

Returns instantiated object storage CLI steps.

Return type CliSwiftSteps

CLI client steps

class stepler.cli_clients.steps.CliCinderSteps(client)CLI cinder client steps.

create_volume(size=1, name=None, description=None, image=None, check=True)Step to create volume using CLI.

316 Chapter 6. Deep to structure

Page 321: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• size (int) – size of created volume (in GB)

• name (str) – name of created volume

• description (str) – volume description

• image (str) – glance image name or ID to create volume from

• metadata (str) – volume metadata

• check (bool) – flag whether to check step or not

Returns cinder volume

Return type dict

create_volume_backup(volume, name=None, description=None, container=None, check=True)Step to create volume backup using CLI.

Parameters

• volume (object) – cinder volume

• name (str) – name of backup to create

• description (str) – description

• container (str) – name of the backup service container

• check (bool) – flag whether to check step or not

Returns cinder volume backup

Return type dict

create_volume_snapshot(volume, name=None, description=None, check=True)Step to create volume snapshot using CLI.

Parameters

• volume (object) – cinder volume

• name (str) – name of snapshot to create

• description (str) – snapshot description

• check (bool) – flag whether to check step or not

Returns cinder volume snapshot

Return type dict

create_volume_transfer(volume, name=None, check=True)Step to create volume transfer using CLI.

Parameters

• volume (object) – cinder volume

• name (str) – name of transfer to create

• check (bool) – flag whether to check step or not

Returns cinder volume transfer

Return type dict

6.13. Openstack CLI 317

Page 322: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

rename_volume(volume, name=None, description=None, check=True)Step to change volume’s name or description using CLI.

Parameters

• volume (object) – cinder volume to edit

• name (str) – new volume name

• description (str) – new volume description

• check (bool) – flag whether to check step or not

show_volume(volume, check=True)Step to show volume using CLI.

Parameters

• volume (object) – cinder volume object to show

• check (bool) – flag whether to check step or not

Raises AssertionError – if check failed

show_volume_backup(backup, check=True)Step to show volume backup using CLI.

Parameters

• backup (object) – cinder volume backup object to show

• check (bool) – flag whether to check step or not

Raises AssertionError – if check failed

show_volume_snapshot(snapshot, check=True)Step to show volume snapshot using CLI.

Parameters

• snapshot (object) – cinder volume snapshot object to show

• check (bool) – flag whether to check step or not

Raises AssertionError – if check failed

show_volume_transfer(volume_transfer, check=True)Step to show volume transfer using CLI.

Parameters

• volume_transfer (object) – cinder volume transfer object to show

• check (bool) – flag whether to check step or not

Raises AssertionError – if check failed

class stepler.cli_clients.steps.CliGlanceSteps(client)CLI glance client steps.

check_image_list_contains(images, api_version=‘2’)Step to check that image is in images list.

Parameters

• images (list) – glance images

• api_version (int) – the API version of Glance

318 Chapter 6. Deep to structure

Page 323: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Raises AssertionError – check failed if image is present in images list

check_image_list_doesnt_contain(images, api_version=‘2’)Step to check that image doesn’t exist in images list.

Parameters

• images (list) – glance images

• api_version (int) – the API version of Glance

Raises

• AssertionError – check failed if image doesn’t present in

• images list

check_image_location_isnot_removed(image)Step to check manipulating of image status via removing image location.

Parameters image (obj) – glance image

Raises AssertionError – if last image location was removed with exit code=0 and stderrnot correct

check_image_property(image, property_key, property_value, api_version=‘2’)

Step to check that output of cli command glance image-show <id> contains updated property.

Parameters

• image (obj) – glance image

• property_key (str) – name of property for check

• property_value (str) – value of property for check

• api_version (int) – glance api version (1 or 2)

Raises AssertionError – if output of cli command glance image-show <id> doesn’tcontain updated property

check_images_filtered(images, property_filter, api_version=‘2’)Step to check that images list is filtered.

Parameters

• images (list) – glance images

• property_filter (str) – image field name to filter images

• api_version (int) – glance api version (1 or 2)

check_negative_delete_non_existing_image(image, api_version=‘2’)Step to check that we cannot delete removed image.

Parameters

• image (object) – glance image

• api_version (int) – glance api version (1 or 2)

Raises AssertionError – if command exit code is 0 or stderr doesn’t contain expectedmessage

check_negative_download_zero_size_image(image, progress=False, api_version=‘2’)Step to check that zero-size image cannot be downloaded.

6.13. Openstack CLI 319

Page 324: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• image (obj) – glance image

• progress (bool) – option of download command

• api_version (int) – glance api version (1 or 2)

Raises AssertionError – if command exit code is 0 or stderr doesn’t contain expectedmessage.

check_negative_image_create_without_properties(filename, api_version=‘2’)Step to check image is not created from file without properties.

Parameters

• filename (str) – filename (doesn’t matter if it exists or not)

• api_version (int) – glance api version (1 or 2)

Raises AssertionError – if command exit code is 0 or stderr doesn’t contain expectedmessage

check_project_in_image_member_list(image, project, api_version=‘2’)Step to check image member list.

Parameters

• image (obj) – glance image

• project (obj) – keystone project

• api_version (int) – glance api version (1 or 2)

Raises

• AnsibleExecutionException – if command execution failed

• AssertionError – if project is not in image member list

create_image_member(image, project, api_version=‘2’, check=True)Step to create member for glance image.

Parameters

• image (obj) – glance image

• project (obj) – keystone project

• api_version (int) – glance api version (1 or 2)

• check (bool) – flag whether to check result or not

Raises AnsibleExecutionException – if command execution failed

delete_image(image, api_version=‘2’, check=True)Step to delete glance image.

Parameters

• image (obj) – glance image

• api_version (int) – API version of Glance

• check (bool) – flag whether to check result or not

Raises AnsibleExecutionException – if command execution failed

320 Chapter 6. Deep to structure

Page 325: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

delete_image_member(image, project, api_version=‘2’, check=True)Step to delete member from glance image.

Parameters

• image (obj) – glance image

• project (obj) – keystone project

• api_version (int) – glance api version (1 or 2)

• check (bool) – flag whether to check result or not

Raises AnsibleExecutionException – if command execution failed

download_image(image, file_option=True, timeout=60, check=True)Step to download image.

Parameters

• image (object) – glance image

• file_option (bool) – flag to choice option download to file or to usestdout redirecting in order to safe image to file

• timeout (int, optional) – seconds timeout to download glance image

• check (bool) – flag whether to check result or not

Returns file path of downloaded image at remote machine

Return type str

Raises AnsibleExecutionException – if image size is zero

image_create(image_file=None, image_name=None, disk_format=None, container_format=None,api_version=‘2’, check=True)

Step to create image.

Parameters

• image_file (str|None) – image file to be uploaded; it should be located on thesame node where CLI is running

• image_name (str|None) – name of created image

• disk_format (str|None) – disk format of image

• container_format (str|None) – container format of image

• api_version (int) – API version of Glance (1 or 2)

• check (bool) – flag whether to check result or not

Returns execution result (image dict, exit_code, stdout, stderr)

Return type tuple

Raises AnsibleExecutionException – if command execution failed

list_images(property_filter=None, api_version=‘2’, check=True)Step to get glance images list.

Parameters

• property_filter (str) – filter Glance images list

• api_version (int) – the API version of Glance

• check (bool) – flag whether to check result or not

6.13. Openstack CLI 321

Page 326: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Returns execution result: images_list

Return type list

Raises AnsibleExecutionException – if command execution failed

remove_image_location(image, url, check=True)Step to remove image location.

Parameters

• image (obj) – glance image

• url (str) – url for removing

• check (bool) – flag whether to check result or not

Returns execution result (exit_code, stdout, stderr)

Return type tuple

Raises AnsibleExecutionException – if command execution failed

show_image(image, api_version=‘2’, check=True)Step to show glance image.

Parameters

• image (obj) – glance image

• api_version (int) – the API version of Glance

• check (bool) – flag whether to check result or not

Returns execution result (image_show, exit_code, stdout, stderr)

Return type tuple

Raises AssertionError – if check failed

class stepler.cli_clients.steps.CliHeatSteps(client)Heat CLI steps.

cancel_stack_update(stack, check=True)Step to cancel stack update.

Parameters

• stack (obj) – heat stack to cancel update

• check (bool) – flag whether to check step or not

create_stack(name, template_file=None, template_url=None, parameters=None, check=True)Step to create stack.

Parameters

• name (str) – name of stack

• template_file (str, optional) – path to yaml template

• template_url (str, optional) – template url

• parameters (dict|None) – parameters for template

• check (bool) – flag whether check step or not

Returns heat stack

Return type dict

322 Chapter 6. Deep to structure

Page 327: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Raises AssertionError – if command exit_code is not 0

delete_stack(stack, check=True)Step to delete stack.

Parameters

• stack (obj) – stack to delete

• check (bool) – flag whether to check step or not

get_resource_type_template(resource_type, check=True)Step to check stack resources.

Parameters

• resource_type (obj) – heat resource type

• check (bool) – flag whether to check step or not

Returns resource template

Return type dict

get_stack_event(stack, resource, event, check=True)Step to get stack’s events list.

Parameters

• stack (obj) – heat stack

• resource (str) – name of the resource the event belongs to

• event (str) – ID of event to display details for

• check (bool) – flag whether to check step or not

Raises AssertionError – if stack event is empty

Returns stack event

Return type dict

get_stack_events_list(stack, check=True)Step to show stack’s events list.

Parameters

• stack (obj) – heat stack to show events list

• check (bool) – flag whether to check step or not

Returns list of stack events

Return type list

Raises AssertionError – if events list is empty

preview_stack(name, template_file, parameters=None, check=True)Step to preview stack.

Parameters

• name (str) – name of stack preview

• template_file (str) – path to stack template file

• parameters (dict, optional) – additional parameters to template

• check (bool) – flag whether to check step or not

6.13. Openstack CLI 323

Page 328: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Returns stack preview result

Return type dict

Raises AssertionError – if stack preview returns not ‘None’ stack’s id

resume_stack(stack, check=True)Step to resume stack.

Parameters

• stack (obj) – heat stack

• check (bool) – flag whether to check step or not

show_stack(stack, check=True)Step to show stack.

Parameters

• stack (obj) – heat stack to show

• check (bool) – flag whether to check step or not

Raises AssertionError – if output contains wrong stack’s name or id

show_stack_output(stack, output, output_result, check=True)Step to show a specific stack output.

Parameters

• stack (obj) – heat stack

• output (str) – name of output to show

• output_result (str) – expected output result

• check (bool) – flag whether to check step or not

Raises AssertionError – if output contains unexpected result

stack_resources_check(stack, check=True)Step to check stack resources.

Parameters

• stack (obj) – heat stack

• check (bool) – flag whether to check step or not

suspend_stack(stack, check=True)Step to suspend stack.

Parameters

• stack (obj) – heat stack

• check (bool) – flag whether to check step or not

update_stack(stack, template_file, parameters=None, check=True)Step to update stack.

Parameters

• stack (obj) – heat stack to update

• template_file (str) – path to stack template file

• parameters (list, optional) – additional parameters to template

324 Chapter 6. Deep to structure

Page 329: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• check (bool) – flag whether to check step or not

class stepler.cli_clients.steps.CliIronicSteps(client)CLI Ironic client steps.

ironic_chassis_list(check=True)Step to get Ironic chassis list.

Parameters check (bool, optional) – flag whether to check result or not

Returns

(exit_code, stdout, stderr) - result of command shell execution

Return type tuple

Raises TimeoutExpired|AssertionError – if check failed after timeout

ironic_driver_list(check=True)Step to get Ironic driver list.

Parameters check (bool, optional) – flag whether to check result or not

Returns

(exit_code, stdout, stderr) - result of command shell execution

Return type tuple

Raises TimeoutExpired|AssertionError – if check failed after timeout

ironic_node_list(check=True)Step to get Ironic node list.

Parameters check (bool, optional) – flag whether to check result or not

Returns

(exit_code, stdout, stderr) - result of command shell execution

Return type tuple

Raises TimeoutExpired|AssertionError – if check failed after timeout

ironic_port_list(check=True)Step to get Ironic port list.

Parameters check (bool, optional) – flag whether to check result or not

Returns

(exit_code, stdout, stderr) - result of command shell execution

Return type tuple

Raises TimeoutExpired|AssertionError – if check failed after timeout

class stepler.cli_clients.steps.CliNovaSteps(client)CLI nova client steps.

live_evacuate(source_host, target_host, servers, check=True)Step to execute host-evacuate-live.

This step is executed using CLI because there is no API for it.

Parameters

• source_host (str) – source host

6.13. Openstack CLI 325

Page 330: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• target_host (str) – target host

• servers (list) – list of server objects

• check (bool) – flag whether to check result or not

Raises AssertionError – if check failed

nova_list(api_version=None, check=True)Step to get nova list.

Parameters

• api_version (str|None) – micro version for nova list command

• check (bool) – flag whether to check result or not

Raises TimeoutExpired|AssertionError – if check failed after timeout

class stepler.cli_clients.steps.CliOpenstackSteps(client)CLI openstack client steps.

baremetal_node_list(check=True)Step to get baremetal node list.

Parameters check (bool) – flag whether to check result or not

Raises TimeoutExpired|AssertionError – if check failed after timeout

cancel_stack_update(stack, check=True)Step to cancel stack update.

Parameters

• stack (obj) – heat stack to cancel update

• check (bool) – flag whether to check step or not

create_stack(name, template_file, parameters=None, check=True)Step to create stack.

Parameters

• name (str) – name of stack

• template_file (str) – path to yaml template

• parameters (dict|None) – parameters for template

• check (bool) – flag whether check step or not

Returns heat stack

Return type dict

Raises AssertionError – if command exit_code is not 0

delete_stack(stack, check=True)Step to delete stack.

Parameters

• stack (obj) – stack to delete

• check (bool) – flag whether to check step or not

get_resource_type_template(resource_type, check=True)Step to check stack resources.

326 Chapter 6. Deep to structure

Page 331: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• resource_type (obj) – heat resource type

• check (bool) – flag whether to check step or not

Returns resource template

Return type dict

get_stack_event(stack, resource, event, check=True)Step to get stack’s events list.

Parameters

• stack (obj) – heat stack

• resource (str) – name of the resource the event belongs to

• event (str) – ID of event to display details for

• check (bool) – flag whether to check step or not

Raises AssertionError – if stack event is empty

Returns stack event

Return type dict

get_stack_events_list(stack, check=True)Step to show stack’s events list.

Parameters

• stack (obj) – heat stack to show events list

• check (bool) – flag whether to check step or not

Returns list of stack events

Return type list

Raises AssertionError – if events list is empty

resume_stack(stack, check=True)Step to resume stack.

Parameters

• stack (obj) – heat stack

• check (bool) – flag whether to check step or not

server_list(check=True)Step to get server list.

Parameters check (bool) – flag whether to check result or not

Returns result of command shell execution

Return type str

Raises TimeoutExpired|AssertionError – if check failed after timeout

show_stack(stack, check=True)Step to show stack.

Parameters

• stack (obj) – heat stack to show

6.13. Openstack CLI 327

Page 332: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• check (bool) – flag whether to check step or not

Raises AssertionError – if output contains wrong stack’s name or id

show_stack_output(stack, output, output_result, check=True)Step to show a specific stack output.

Parameters

• stack (obj) – heat stack

• output (str) – name of output to show

• output_result (str) – expected output result

• check (bool) – flag whether to check step or not

Raises AssertionError – if output contains unexpected result

stack_resources_check(stack, check=True)Step to check stack resources.

Parameters

• stack (obj) – heat stack

• check (bool) – flag whether to check step or not

suspend_stack(stack, check=True)Step to suspend stack.

Parameters

• stack (obj) – heat stack

• check (bool) – flag whether to check step or not

update_stack(stack, template_file, parameters=None, check=True)Step to update stack.

Parameters

• stack (obj) – heat stack to update

• template_file (str) – path to stack template file

• parameters (list, optional) – additional parameters to template

• check (bool) – flag whether to check step or not

class stepler.cli_clients.steps.CliNeutronSteps(client)CLI neutron client steps.

check_negative_router_create_with_distributed_option(project, username,password, distributed,name=None)

Step to check that router is not created with distributed option.

In case of creation of the router with explicit distributed option by user with member role this creationshould be prohibited by policy.

Parameters

• project (str) – name of the project

• username (str) – user name

• password (str) – user password

328 Chapter 6. Deep to structure

Page 333: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• distributed (bool) – flag whether to create DVR or not

• name (str) – name of created router

Raises AssertionError – if command exit code is 0 or stderr doesn’t contain expectedmessage

create_router(name=None, project=None, username=None, password=None, distributed=None,expected_error=False, check=True)

Step to create router using CLI.

Parameters

• name (str) – name of created router

• project (str) – name of the project

• username (str) – user name

• password (str) – user password

• distributed (bool) – flag whether to create DVR or not

• expected_error (bool) – flag whether to expect error during router creation ornot

• check (bool) – flag whether to check step or not

Returns (router or None, exit_code, stdout, stderr)

Return type tuple

class stepler.cli_clients.steps.CliSwiftSteps(client)CLI object storage client steps.

check_container_presence(container_name, must_present=True)Step to check that container is in container list.

Parameters

• container_name (str) – object storage container

• must_present (bool) – flag whether container should present or not

Raises

• AssertionError – check failed if container exists/doesn’t exist in

• containers list

check_object_in_container(container_name, object_name)Step to check if object presents into container objects list.

Parameters

• container_name (str) – object storage container

• object_name (str) – name of object to upload

Raises

• AssertionError – check failed if object does not present in

• container objects list

create(container_name, check=True)Step to create swift container.

Parameters

6.13. Openstack CLI 329

Page 334: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• container_name (str) – name of created container

• check (bool) – flag whether to check result or not

Raises AnsibleExecutionException – if command execution failed

delete(container_name, check=True)Step to delete swift container.

Parameters

• container_name (str) – object storage container

• check (bool) – flag whether to check result or not

Raises AnsibleExecutionException – if command execution failed

execute_command(cmd, use_openrc=True, environ=None, **kwargs)Execute swift cli command in shell.

Swift can’t determine keystone version, so we set OS_AUTH_URL to point to correct keystone endpoint.

Parameters

• cmd (str) – client command to execute

• use_openrc (bool) – add ‘source openrc’ before cmd executing

• environ (dict) – shell environment variables to set before cmd executing. Bydefault it not set any variable

• **kwargs – base class arguments

Returns (exit_code, stdout, stderr) - result of command execution

Return type tuple

Raises AssertionError – if result check was failed

list(container_name=None, check=True)Step to get swift list.

Parameters

• container_name (str) – object storage container

• check (bool) – flag whether to check result or not

Raises AnsibleExecutionException – if command execution failed

upload(container_name, object_name, check=True)Step to upload object to container.

Parameters

• container_name (str) – object storage container

• object_name (str) – name of object to upload

• check (bool) – flag whether to check result or not

Raises AnsibleExecutionException – if command execution failed

330 Chapter 6. Deep to structure

Page 335: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Openstack CLI tests

Tests for cinder CLI client

stepler.cli_clients.tests.test_cinder.test_change_volume_description_with_unicode(volume,cli_cinder_steps,vol-ume_steps)

Scenario: Change volume description with unicode symbols.

Setup:

1.Create volume

Steps:

1.Change volume description with unicode symbols using CLI

2.Check that volume description was changed

Teardown:

1.Delete volume

stepler.cli_clients.tests.test_cinder.test_change_volume_name_with_unicode(volume,cli_cinder_steps,vol-ume_steps)

Scenario: Change volume name with unicode symbols.

Setup:

1.Create volume

Steps:

1.Change volume name with unicode symbols using CLI

2.Check that volume name was changed

Teardown:

1.Delete volume

stepler.cli_clients.tests.test_cinder.test_create_backup_with_unicode_container(volume,cli_cinder_steps,backup_steps)

Scenario: Create volume backup with unicode container name.

Setup:

1.Create volume

Steps:

1.Create volume backup with unicode container name using CLI

2.Check that backup status is available

Teardown:

1.Delete volume backup

2.Delete volume

6.13. Openstack CLI 331

Page 336: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.cli_clients.tests.test_cinder.test_create_backup_with_unicode_description(volume,cli_cinder_steps,backup_steps)

Scenario: Create volume backup with unicode symbols description.

Setup:

1.Create volume

Steps:

1.Create volume backup with unicode symbols description using CLI

2.Check that backup status is available

Teardown:

1.Delete volume backup

2.Delete volume

stepler.cli_clients.tests.test_cinder.test_create_backup_with_unicode_name(volume,cli_cinder_steps,backup_steps)

Scenario: Create volume backup with unicode symbols name.

Setup:

1.Create volume

Steps:

1.Create volume backup with unicode symbols name using CLI

2.Check that backup status is available

Teardown:

1.Delete volume backup

2.Delete volume

stepler.cli_clients.tests.test_cinder.test_create_snapshot_with_unicode_description(volume,cli_cinder_steps,snap-shot_steps)

Scenario: Create snapshot with unicode symbols description.

Setup:

1.Create volume

Steps:

1.Create volume snapshot with unicode symbols description using CLI

2.Check that snapshot status is available

Teardown:

1.Delete volume snapshot

2.Delete volume

332 Chapter 6. Deep to structure

Page 337: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.cli_clients.tests.test_cinder.test_create_snapshot_with_unicode_name(volume,cli_cinder_steps,snap-shot_steps)

Scenario: Create snapshot with unicode symbols name.

Setup:

1.Create volume

Steps:

1.Create volume snapshot with unicode symbols name using CLI

2.Check that snapshot status is available

Teardown:

1.Delete volume snapshot

2.Delete volume

stepler.cli_clients.tests.test_cinder.test_create_transfer_with_unicode_name(volume,trans-fer_steps,cli_cinder_steps,vol-ume_steps)

Scenario: Create volume transfer with unicode name.

Note: transfer_steps fixture is used for transfer cleanup.

Setup:

1.Create volume

Steps:

1.Create volume transfer with unicode name using CLI

2.Check that volume status is ‘awaiting-transfer’

Teardown:

1.Delete volume transfer

2.Delete volume

stepler.cli_clients.tests.test_cinder.test_create_volume_using_image_name(ubuntu_image,cli_cinder_steps,vol-ume_steps)

Scenario: Create volume from image using image name.

Setup:

1.Create image

Steps:

1.Create volume from image using image name

Teardown:

1.Delete volume

2.Delete image

6.13. Openstack CLI 333

Page 338: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.cli_clients.tests.test_cinder.test_create_volume_with_unicode_description(cli_cinder_steps,vol-ume_steps)

Scenario: Create volume with unicode symbols description.

Steps:

1.Create volume with unicode symbols description using CLI

2.Check that volume status is available

Teardown:

1.Delete volume

stepler.cli_clients.tests.test_cinder.test_create_volume_with_unicode_name(cli_cinder_steps,vol-ume_steps)

Scenario: Create volume with unicode symbols name.

Steps:

1.Create volume with unicode symbols name using CLI

2.Check that volume status is available

Teardown:

1.Delete volume

stepler.cli_clients.tests.test_cinder.test_show_backup_with_unicode_container_name(volume,cre-ate_backup,cli_cinder_steps)

Scenario: Show volume backup with unicode container name.

Setup:

1.Create volume

Steps:

1.Create volume backup with unicode container name using API

2.Check CLI command cinder backup-show <backup id>

Teardown:

1.Delete volume backup

2.Delete volume

stepler.cli_clients.tests.test_cinder.test_show_backup_with_unicode_description(volume,cre-ate_backup,cli_cinder_steps)

Scenario: Show volume backup with unicode description.

Setup:

1.Create volume

Steps:

1.Create volume backup with unicode description using API

2.Check CLI command cinder backup-show <backup id>

334 Chapter 6. Deep to structure

Page 339: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Teardown:

1.Delete volume backup

2.Delete volume

stepler.cli_clients.tests.test_cinder.test_show_backup_with_unicode_name(volume,cre-ate_backup,cli_cinder_steps)

Scenario: Show volume backup with unicode name.

Setup:

1.Create volume

Steps:

1.Create volume backup with unicode name using API

2.Check CLI command cinder backup-show <backup id>

Teardown:

1.Delete volume backup

2.Delete volume

stepler.cli_clients.tests.test_cinder.test_show_snapshot_with_unicode_description(volume,snap-shot_steps,cli_cinder_steps)

Scenario: Show volume snapshot with unicode description.

Setup:

1.Create volume

Steps:

1.Create volume snapshot with unicode description using API

2.Check CLI command cinder snapshot-show <snapshot id>

Teardown:

1.Delete volume snapshot

2.Delete volume

stepler.cli_clients.tests.test_cinder.test_show_snapshot_with_unicode_name(volume,snap-shot_steps,cli_cinder_steps)

Scenario: Show volume snapshot with unicode name.

Setup:

1.Create volume

Steps:

1.Create volume snapshot with unicode name using API

2.Check CLI command cinder snapshot-show <snapshot id>

Teardown:

6.13. Openstack CLI 335

Page 340: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Delete volume snapshot

2.Delete volume

stepler.cli_clients.tests.test_cinder.test_show_transfer_with_unicode_name(volume,cre-ate_volume_transfer,cli_cinder_steps)

Scenario: Show volume transfer with unicode name.

Setup:

1.Create volume

Steps:

1.Create volume transfer with unicode name using API

2.Check CLI command cinder transfer-show <transfer id>

Teardown:

1.Delete volume transfer

2.Delete volume

stepler.cli_clients.tests.test_cinder.test_show_volume_with_unicode_description(volume_steps,cli_cinder_steps)

Scenario: Show volume with unicode description.

Steps:

1.Create volume with unicode description using API

2.Check CLI command cinder show <volume id>

Teardown:

1.Delete volume

stepler.cli_clients.tests.test_cinder.test_show_volume_with_unicode_name(volume_steps,cli_cinder_steps)

Scenario: Show volume with unicode name.

Steps:

1.Create volume with unicode name using API

2.Check CLI command cinder show <volume id>

Teardown:

1.Delete volume

Tests for nova CLI client

stepler.cli_clients.tests.test_nova.test_live_evacuation(cirros_image, flavor,net_subnet_router, key-pair, security_group,create_floating_ip,nova_availability_zone_hosts,cli_nova_steps,server_steps)

Scenario: Live evacuate all servers from one host to another.

336 Chapter 6. Deep to structure

Page 341: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Setup:

1.Create cirros image

2.Create flavor

3.Create network, subnet, router

4.Create keypair

5.Create security group

Steps:

1.Create two servers on host-1

2.Assign floating ip for servers

3.Execute ‘nova host-evacuate-live’ from host-1 to host-2

4.Check that servers are hosted on host-2

5.Check ping between servers

Teardown:

1.Delete servers

2.Delete security group

3.Delete keypair

4.Delete network, subnet, router

5.Delete flavor

6.Delete cirros image

stepler.cli_clients.tests.test_nova.test_nova_list(server, cli_nova_steps,api_version)

Scenario: nova list works via shell.

Setup::

1.Create server

Steps::

1.Execute in shell nova list or nova --os-compute-api-version <api_version>list

Teardown:

1.Delete server

Tests for openstack CLI client

stepler.cli_clients.tests.test_openstack.test_baremetal_node_list(cli_openstack_steps)Scenario: openstack baremetal list works via shell.

Steps::

1.Execute in shell openstack baremetal list

6.13. Openstack CLI 337

Page 342: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.cli_clients.tests.test_openstack.test_server_list(server,cli_openstack_steps)

Scenario: nova list works via shell.

Setup::

1.Create nova server and wait it active

Steps::

1.Execute in shell openstack server list

Teardown:

1.Remove nova server

Heat CLI tests

stepler.cli_clients.tests.test_heat.test_cancel_stack_update(cirros_image,flavor,net_subnet_router,create_flavor,read_heat_template,create_stack,cli_openstack_steps,stack_steps)

Scenario: Cancel stack updating with heat CLI.

Note: This test verifies bug #1570825

Setup:

1.Create cirros image

2.Create flavor

3.Create network

4.Create subnet

5.Create router

6.Set router default gateway to public network

7.Add router interface to created network

Steps:

1.Create 2’nd flavor

2.Read Heat resources template from file

3.Create stack with template with parameters

4.Start stack updating with 2’nd flavor

5.Cancel stack updating with CLI

6.Check stack status

Teardown:

1.Delete stack

338 Chapter 6. Deep to structure

Page 343: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Delete router

3.Delete subnet

4.Delete network

5.Delete flavors

6.Delete cirros image

stepler.cli_clients.tests.test_heat.test_resource_type_template(cli_openstack_steps,heat_resource_type_steps)

Scenario: Show resource type template with openstack CLI.

Steps:

1.Call openstack orchestration resource type show {resource_type_name}

2.Check that template to be shown in console

stepler.cli_clients.tests.test_heat.test_stack_check_resources(empty_stack,cli_openstack_steps,stack_steps)

Scenario: Check stack resources with openstack CLI.

Setup:

1.Create stack

Steps:

1.Call openstack stack check

2.Check that stack’s stack_status is CHECK_COMPLETE

Teardown:

1.Delete stack

stepler.cli_clients.tests.test_heat.test_stack_create_from_file(empty_heat_template_path,cli_openstack_steps,stack_steps)

Scenario: Create stack from template file with CLI.

Setup:

1.Upload template to node

Steps:

1.Create stack with template from file

2.Check that stack is exists

Teardown:

1.Delete stack

stepler.cli_clients.tests.test_heat.test_stack_create_from_url(cli_heat_steps,stack_steps)

Scenario: Create stack from template url with CLI.

Steps:

1.Create stack from URL

2.Check that stack exists

Teardown:

6.13. Openstack CLI 339

Page 344: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Delete stack

stepler.cli_clients.tests.test_heat.test_stack_delete(empty_stack,cli_openstack_steps,stack_steps)

Scenario: Delete stack with openstack CLI.

Setup:

1.Create stack

Steps:

1.Delete stack via cli command

2.Check that stack is not exist

stepler.cli_clients.tests.test_heat.test_stack_preview(empty_heat_template_path,cli_heat_steps)

Scenario: Preview stack with heat CLI.

Setup:

1.Upload template to node

Steps:

1.Preview stack

stepler.cli_clients.tests.test_heat.test_stack_resume(empty_stack,cli_openstack_steps,stack_steps)

Scenario: Resume stack with openstack CLI.

Setup:

1.Create stack

Steps:

1.Suspend stack

2.Call openstack stack resume

3.Check that stack’s stack_status is RESUME_COMPLETE

Teardown:

1.Delete stack

stepler.cli_clients.tests.test_heat.test_stack_show(empty_stack,cli_openstack_steps)

Scenario: Show stack with openstack CLI.

Setup:

1.Create stack

Steps:

1.Call openstack stack show

2.Check that result has correct stack_name and id

Teardown:

1.Delete stack

340 Chapter 6. Deep to structure

Page 345: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.cli_clients.tests.test_heat.test_stack_show_event(create_stack,read_heat_template,cli_openstack_steps,stack_steps)

Scenario: Show stack’s event details with openstack CLI.

Steps:

1.Create stack

2.Call openstack stack event show

3.Check that result table is not empty

Teardown:

1.Delete stack

stepler.cli_clients.tests.test_heat.test_stack_show_events_list(empty_stack,cli_openstack_steps)

Scenario: Show stack events_list with openstack CLI.

Setup:

1.Create stack

Steps:

1.Call openstack stack event list

2.Check that result table is not empty

Teardown:

1.Delete stack

stepler.cli_clients.tests.test_heat.test_stack_show_particular_output(read_heat_template,cli_openstack_steps,stack_steps)

Scenario: Show only particular stack output with openstack CLI.

Setup:

1.Create stack

Steps:

1.Call openstack stack output show

2.Check that result has only particular output

Teardown:

1.Delete stack

stepler.cli_clients.tests.test_heat.test_stack_suspend(empty_stack,cli_openstack_steps,stack_steps)

Scenario: Suspend stack with openstack CLI.

Setup:

1.Create stack

Steps:

1.Call openstack stack suspend

2.Check that stack’s stack_status is SUSPEND_COMPLETE

6.13. Openstack CLI 341

Page 346: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Teardown:

1.Delete stack

stepler.cli_clients.tests.test_heat.test_stack_update(empty_heat_template_path,empty_stack,cli_openstack_steps,stack_steps)

Scenario: Update stack with openstack CLI.

Setup:

1.Create stack

Steps:

1.Update stack with CLI

2.Check that stack status is update_complete

Teardown:

1.Delete stack

Tests for glance CLI client

stepler.cli_clients.tests.test_glance.test_create_image_member(cirros_image_private,project,cli_glance_steps,glance_steps,api_version)

Scenario: Verify ‘glance member-create’ command.

Setup:

1.Create private cirros image

2.Create non-admin project

Steps:

1.Run cli command ‘glance member-create <image_id> <project_id>’

2.Check that project is in image member-list via API

Teardown:

1.Delete project

2.Delete cirros image

stepler.cli_clients.tests.test_glance.test_delete_image_member(cirros_image_private,project,cli_glance_steps,glance_steps,api_version)

Scenario: Verify ‘glance member-delete’ command.

Setup:

1.Create cirros image

2.Create non-admin project

Steps:

342 Chapter 6. Deep to structure

Page 347: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

1.Bind project to image via API

2.Run cli command ‘glance member-delete <image_id> <project_id>’

3.Check that project not in image member-list via API

Teardown:

1.Delete project

2.Delete cirros image

stepler.cli_clients.tests.test_glance.test_download_glance_image(cirros_image,cli_download_image,glance_steps,file_option)

Scenario: Download glance image via CLI.

Setup:

1.Upload cirros image

Steps:

1.Download cirros image via CLI

2.Compare md5 of uploaded cirros image and downloaded cirros image

Teardown:

1.Delete cirros image

stepler.cli_clients.tests.test_glance.test_download_zero_size_image(glance_steps,cli_glance_steps,api_version,progress)

Scenario: Verify that zero-size image can’t be downloaded.

Steps:

1.Create a zero-size image

2.Run cli command ‘glance image-download <image_id>’ without/with option ‘–progress’

3.Check that command is failed with error ‘Image is not active’ (api_version=1) or ‘Image has nodata’ (api_version=2)

Teardown:

1.Delete image

stepler.cli_clients.tests.test_glance.test_filter_disk_formats_in_images_list(glance_steps,cli_glance_steps,api_version=2)

Scenario: Check that created images are filtered.

Steps:

1.Create 3 images with disk format qcow2 with Glance API

2.Create 3 images with disk format ami with Glance API

3.Check that created images filtered with disk_format using CLI

Teardown:

1.Delete images

6.13. Openstack CLI 343

Page 348: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.cli_clients.tests.test_glance.test_filter_names_in_images_list(glance_steps,cli_glance_steps,api_version=2)

Scenario: Check that created images are filtered.

Steps:

1.Create 3 images with disk format qcow2 with Glance API

2.Check that created images filtered using CLI

Teardown:

1.Delete images

stepler.cli_clients.tests.test_glance.test_image_list_contains_created_image(glance_steps,cli_glance_steps,api_version)

Scenario: Check support of unicode symbols in image name.

Steps:

1.Create image with name with Glance API

2.Check that created image is in list using CLI

Teardown:

1.Delete image

stepler.cli_clients.tests.test_glance.test_image_list_contains_created_qcow2_images(glance_steps,cli_glance_steps,api_version)

Scenario: Check that created images are contained in images list.

Steps:

1.Create 3 images with disk format qcow2 with Glance API

2.Check that created images is in list using CLI

Teardown:

1.Delete images

stepler.cli_clients.tests.test_glance.test_image_list_doesnt_contain_deleted_image(glance_steps,cli_glance_steps,api_version)

Scenario: Check support of unicode symbols in image name.

Steps:

1.Create image with name with Glance API

2.Delete image via API

3.Check that image deleted using CLI command

stepler.cli_clients.tests.test_glance.test_negative_remove_deleted_image(glance_steps,cli_glance_steps,api_version)

Scenario: Try to remove already deleted image.

Steps:

1.Create image

2.Delete created image

344 Chapter 6. Deep to structure

Page 349: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

3.Try to remove deleted image

stepler.cli_clients.tests.test_glance.test_project_in_image_member_list(cirros_image_private,project,cli_glance_steps,glance_steps,api_version)

Scenario: Verify ‘glance member-list’ command.

Test checks that ‘glance member-list –image_id <id>’ shows bound project.

Setup:

1.Create cirros image

2.Create non-admin project

Steps:

1.Bind project to image via API

2.Check cli command ‘glance member-list –image_id <id>’ shows bound project

Teardown:

1.Delete project

2.Delete cirros image

stepler.cli_clients.tests.test_glance.test_status_manipulation_via_locations(enable_multi_locations,glance_steps,cli_glance_steps)

Scenario: Glance image status manipulation through locations removal.

Setup:

1.Set show_multiple_locations=True in /etc/glance/glance-api.conf and restart glance service.

Steps:

1.Create glance image

2.Add 2 urls to image locations

3.Check that user can’t manipulate of image status through locations removal

Teardown:

1.Set show_multiple_locations=False in /etc/glance/glance-api.conf and restart glance service.

2.Delete glance image

stepler.cli_clients.tests.test_glance.test_update_image_property(ubuntu_image,glance_steps,cli_glance_steps,api_version)

Scenario: Update image property.

SetUp:

1.Create ubuntu image

Steps:

1.Update image property

2.Check that output cli command ‘glance image-show <id>’ contains updated property

6.13. Openstack CLI 345

Page 350: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

TearDown:

1.Delete ubuntu image

stepler.cli_clients.tests.test_glance.test_upload_image_without_properties(cli_glance_steps,api_version)

Scenario: Verify image is not created from file without properties.

Test checks image from file can’t be created without disk-format and container-format

Steps:

1.Run cli command ‘glance image-create –file <filename>’

2.Check that command failed with expected error message

Neutron CLI tests

stepler.cli_clients.tests.test_neutron.test_create_distributed_router_with_member_user(cli_neutron_steps,new_user_with_project,router_steps,routers_cleanup)

Scenario: Check DVR creation without distributed option.

Setup:

1.Create project

2.Create user for project

3.Grant member role to user

Steps:

1.Create router without parameter Distributed using CLI

2.Check that router parameter Distributed = True

Teardown:

1.Delete router

2.Delete user

3.Delete project

stepler.cli_clients.tests.test_neutron.test_negative_create_distributed_router_with_member_user(cli_neutron_steps,new_user_with_project,router_steps,routers_cleanup,dis-tributed)

Scenario: Check DVR creation with distributed option.

Setup:

1.Create project

2.Create user for project

3.Grant member role to user

Steps:

1.Try to create router with parameter Distributed = True/False using CLI

346 Chapter 6. Deep to structure

Page 351: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

2.Check that router creation is disallowed by policy

Teardown:

1.Delete user

2.Delete project

Third party modules

Arpings checking helpers

stepler.third_party.arping.arping(ip, iface, remote, count=None, latency=2)Non-blocking context manager for run arping on background.

It yields ping results (dict) and update it with ‘sent’ and ‘received’ values after CM will be exited.

Parameters

• ip (str) – ip to arping

• iface (string) – name of interface, like ‘eth0’

• remote (obj) – instance of stepler.third_party.ssh.SshClient

• count (int, optional) – Count of packets to send. By default, arping will sendpackets until termination

• latency (int, optional) – time to wait before arping will be terminated

Yields dict – arping results

Chunk serializer

Nova instance metadata has restriction - keys and values of it can contains not more than 255 symbols. This serializerdumps passed metadata to json, split to to small chunks and makes a dict with this chunks.

stepler.third_party.chunk_serializer.dump(obj, prefix)Transform object to dict with small chunks of jsoned object.

Example

>>> dump({'keypair': 'a' * 260}, prefix='some_prefix_'){

'some_prefix_0':'{"keypair": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa# cutaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',

'some_prefix_1': 'aaaaaaaaaaaaaaaaaa"}'}

Parameters

• obj (object) – object to serialize. Should be json-serializable

• prefix (str) – prefix to result dict keys

6.14. Third party modules 347

Page 352: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Returns dict with small chunks of json object representation

Return type dict

stepler.third_party.chunk_serializer.load(meta, prefix)Restore object from dict, created with dump function.

Parameters

• meta (dict) – dict with serialized object

• prefix (str) – serialized records keys prefix

Returns deserialized object

Return type object

Custom context manager generator

stepler.third_party.context.context(func)Decorator to make context manager from generator with guaranteed finalization.

Note: contextlib.contextmanager doesn’t guarantee context manager finalization and requires usageof try-finally for that. But in fixtures it needs to rid of try-finally and to guarantee context managerfinalization after yield. This decorator makes that.

Example

@pytest.fixturedef create_server_context(server_steps):

@contextdef _create_server_context(server_name, *args, **kwgs):

server = server_steps.create_server(server_name,

*args, **kwgs)yield serverserver_steps.delete_server(server)

return _create_server_context

See also:

1.Exception inside context manager:

@contextdef x():

yield

with x():raise Exception('error')

Exception: error will be raised.

2.Exception in context manager finalization:

348 Chapter 6. Deep to structure

Page 353: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

@contextdef x():

yieldraise Exception('final')

with x():pass

Exception: final will be raised.

3.Exceptions inside context manager and in finalization:

@contextdef x():

yieldraise Exception('final')

with x():raise Exception('error')

Exception: error will be raise as root cause.

Pytest plugin to add mark @pytest.mark.idempotent_id(<id>)

stepler.third_party.idempotent_id.get_item_id(item)Return item (test) idempotent id.

stepler.third_party.idempotent_id.pytest_addoption(parser)Add option to pytest.

stepler.third_party.idempotent_id.pytest_collection_modifyitems(session, items)Add marker to test name, if test marked with idempotent_id marker.

If optional kwargs passed - test parameters should be a superset of this kwargs to mark be applied. Also kwargscan be passed as params argument.

stepler.third_party.idempotent_id.pytest_runtestloop(session)Check idempotent id presence.

Logger for steps

stepler.third_party.logger.log(func)Decorator to log function with arguments and execution time.

Network checks

stepler.third_party.network_checks.check_tcp_connect(ip, port=22, timeout=1)Check whether TCP connection to ip with port.

Parameters

• ip (str) – ip to establish connect to

• port (int, optional) – TCP port

• timeout (int, optional) – socket timeout to wait connection.

6.14. Third party modules 349

Page 354: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Returns is connection can be established or not

Return type bool

Pytest plugin to show output error message if no tests are found

It shows error message in stdout if no tests are found according to input parameters. For example:

No tests are found matching input parameters: keyword expression'test1 and not test2', mark expression 'destructive'.

stepler.third_party.no_tests_found.pytest_collection_modifyitems(config,items)

Hook to show error message if no tests are found.

Collection of utilities for parsing CLI clients output

stepler.third_party.output_parser.listing(output_lines)Return list of dicts with basic item info parsed from cli output.

stepler.third_party.output_parser.table(output_lines)Parse single table from cli output. Return dict with list of column names in ‘headers’ key and rows in ‘values’key.

stepler.third_party.output_parser.tables(output_lines)Find all ascii-tables in output and parse them.

Return list of tables parsed from cli output as dicts. (see OutputParser.table()) And, if found, label key (separatedline preceding the table) is added to each tables dict.

Pings checking helpers

class stepler.third_party.ping.FixedIDPinger(ip_to_ping, remote, icmp_id, com-mand_path=’ping’)

Pinger class to work with modified ping implementation.

Custom implementation allows to set ID for ICMP requests.

class stepler.third_party.ping.PingResultPing result class.

Useful for object-oriented access to results of ping (such as transmitted, received, loss counts)

class stepler.third_party.ping.Pinger(ip_to_ping, remote=None)Pinger class to call ping and return result.

Can be used directly (as Pinger.ping) and as non-blocking context manager.

Example

>>> with Pinger('10.109.8.2') as result:... some_action()>>> print(result.loss)0

350 Chapter 6. Deep to structure

Page 355: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

>>> result = Pinger('10.0.0.1', remote=remote).ping(count=3)>>> print(result.loss)0

ping(count=1)Start ping command and return result.

Parameters count (int) – count of pings to send

Returns instance of PingResult

Return type object

Pytest plugin to mark and choose platform-specific tests

Usage example:

from stepler.third_party.supported_platforms import platform

@platform.mos10def test_something():

pass

Launching example:

py.test stepler --platform mos10

Supported platforms are mos10, mk2x, mcp.

stepler.third_party.supported_platforms.pytest_addoption(parser)Add option --platform to choose platform-specific tests.

stepler.third_party.supported_platforms.pytest_collection_modifyitems(session,items)

Skip tests for unspecified platforms.

Notes

•If platform isn’t specified, only common tests will be executed.

•If platform is specified, common tests with platform-specific tests will be executed.

Interprocess locker

class stepler.third_party.process_mutex.Lock(filename)Process mutex.

acquire()Acquire lock.

release()Release lock.

6.14. Third party modules 351

Page 356: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Pytest plugin to clean test reports

It ensures two things:

• Remove test reports folder before tests launching

• Remove test report folder if test is passed

stepler.third_party.reports_cleaner.pytest_configure(config)Pytest hook to remove test reports before tests launching.

stepler.third_party.reports_cleaner.pytest_runtest_makereport(item, call)Pytest hook to remove test report if test is passed.

SSH client

class stepler.third_party.ssh.SshClient(host, port=22, username=None, password=None,pkey=None, timeout=None, proxy_cmd=None)

SSH client.

background_call(command, stdout=’/dev/null’, stderr=’&1’)Start long-running command in background and return it’s pid.

Parameters

• command (str) – command to execute

• stdout (str) – path to file to redirect command stdout to

• stderr (str, optional) – path to file to redirect command stderr to. By defaultstderr combines with stdout.

Returns pid of running command

Return type str

Raises AssertionError – if command is not running in background

check()Check SSH connection.

check_call(command, verbose=False)Call command and check that exit_code is 0.

Parameters

• command (str) – command to execute

• verbose (bool) – make log records or not

Returns CommandResult instance

Return type object

Raises Exception – if command exit_code is not 0

check_process_present(name)Check that name is present in ps aux output.

Parameters name (str) – command name to search

Raises Exception – if name is not found.

check_stderr(command, verbose=False)Call command and check that stderr is empty.

352 Chapter 6. Deep to structure

Page 357: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• command (str) – command to execute

• verbose (bool) – make log records or not

Returns CommandResult instance

Return type object

Raises Exception – if command stderr is not empty

close()Close ssh connection.

connect()Connect to ssh server.

execute(command, merge_stderr=False, verbose=False, timeout=None)Execute command and returns CommandResult instance.

Parameters

• command (str) – command to execute

• merge_stderr (bool) – merge stderr to stdout

• verbose (bool) – make log records or not

• timeout (int, optional) – maximum command executing time in seconds

Returns CommandResult instance

Return type object

Raises ExecutionTimeout – if command executing more than timeout

execute_async(command, merge_stderr=False, verbose=False)Start executing command async.

Parameters

• command (str) – command to execute

• merge_stderr (bool) – merge stderr to stdout

• verbose (bool) – make log records or not

Returns SSH session, file-like stdin, stdout, stderr

Return type tuple

kill_process(name)Kill all processes by killall <name>

Parameters name (str) – command name to search

Returns CommandResult for execute command

Return type object

open(path, mode=’r’)Open remote file with SFTP.

Parameters

• path (str) – path to remote file

6.14. Third party modules 353

Page 358: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• mode (str, optional) – file open mode. The arguments are the same as forPython’s built-in open. Read-only by default.

Yields obj – an SFTPFile object representing the open file

sudo()Context manager to run command with sudo.

wait_process_done(pid, timeout=0)Wait until command with pid will be done.

Parameters

• pid (int|str) – pid

• timeout (int, optional) – time to wait for process to be done

Raises ExecutionTimeout – if process executing after timeout.

Pytest plugin to check consistency

• steps and fixtures only are called inside a test

• steps must have format described in STEPS architecture

Checker can be disabled via py.test key --disable-steps-checker.

Checker can be disabled with comments:

def test_inline():foo = 'bar'baz = non_permitted_call(

foo) # checker: disable

def test_block():# checker: disablebaz = non_permitted_call_1()baz = non_permitted_call_2()# checker: enable

stepler.third_party.steps_checker.pytest_addoption(parser)Hook to register checker options.

stepler.third_party.steps_checker.pytest_collection_modifyitems(config, items)Hook to detect forbidden calls inside test.

stepler.third_party.steps_checker.pytest_configure(config)Hook to check steps consistency.

stepler.third_party.steps_checker.step(func)Decorator to append step method name to permitted calls.

Parameters func (function) – function to add its name to list with permitted calls

Returns the same function wrapped to log

Return type function

354 Chapter 6. Deep to structure

Page 359: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

tcpdump helpers

stepler.third_party.tcpdump.filter_icmp(packet)Returns True if packet contains ICMP layer.

stepler.third_party.tcpdump.filter_vxlan(packet)Returns True if packet contains VxLAN layer.

stepler.third_party.tcpdump.get_last_ping_reply_ts(path)Returns last ICMP echo response timestamp.

If there are no replies in packets - it returns None.

Parameters packets (list) – list packets

Returns last ICMP reply timestamp or None

Return type float|None

stepler.third_party.tcpdump.read_pcap(path, lfilter=None)Read pcap file and yields packets.

Parameters

• path (str) – path to pcap file

• lfilter (function, optional) – function to filter returned packets. By defaultall packets will be returned.

Yields obj – packet

stepler.third_party.tcpdump.tcpdump(remote, args=’‘, prefix=None, latency=2, lfilter=None)Non-blocking context manager for run tcpdump on backgroud.

It yields path to pcap file.

Parameters

• remote (SshClient) – instance of ssh client

• args (str, optional) – additional tcpdump args

• prefix (str, optional) – prefix for command. It can be useful for executingtcpdump on ip namespace.

• latency (int, optional) – time to wait after tcpdump’s starting and before tcp-dump’s termination to guarantee that all packets will be captured

• lfilter (function, optional) – function to filter returned packets. By defaultall packets will be returned.

Yields str – path to pcap file

Utils

class stepler.third_party.utils.AttrDict(*args, **kwgs)Wrapper over attrdict to provide context manager to update fields.

put(**kwgs)Put fields to update in buffer.

stepler.third_party.utils.generate_ids(prefix=None, postfix=None, count=1, length=None,use_unicode=False, _stepler_prefix=None)

Generate unique identificators, based on UUID.

6.14. Third party modules 355

Page 360: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

Parameters

• prefix (str|None) – prefix of unique ids

• postfix (str|None) – postfix of unique ids

• count (int) – count of unique ids

• length (int|None) – length of unique ids

• use_unicode (boolean|False) – generate str with unicode or not

• _stepler_prefix (str, optional) – Resources prefix is used to callgenerate_ids inside stepler.config and avoid cross imports problem. By de-fault it has value stepler.config.STEPLER_PREFIX.

Returns unique ids

Return type generator

stepler.third_party.utils.generate_files(prefix=None, postfix=None, folder=None,count=1, size=1024)

Generate files with unique names.

Parameters

• prefix (str|None) – prefix of unique ids.

• postfix (str|None) – postfix of unique ids.

• folder (str|None) – folder to create unique files.

• count (int) – count of unique ids.

• size (int) – size of unique files.

Returns files with unique names.

Return type generator

stepler.third_party.utils.generate_file_context(prefix=None, postfix=None,folder=None, size=1024)

Context manager to generate file with unique name and delete it later.

Useful for large files.

Parameters

• prefix (str|None) – prefix of unique id

• postfix (str|None) – postfix of unique id

• folder (str|None) – folder to create unique file

• size (int) – size of unique file (in bytes)

Yields str – file path.

stepler.third_party.utils.generate_ips(ip_start=1, ip_end=254, count=1)Generate random IP v4 addresses.

Examples

173.217.169.131, 207.105.178.224, 193.121.141.217

Parameters

356 Chapter 6. Deep to structure

Page 361: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

• ip_start (int) – Start range of the generated sequence

• ip_end (int) – End range of the generated sequence

• count (int) – count of unique ids.

Returns Random IP addresses

Return type generator

stepler.third_party.utils.get_file_path(url, name=None)Download file by URL to local cached storage.

Parameters

• url (str) – URL of file location.

• name (str|None) – file name.

Returns file path of downloaded file.

Return type str

stepler.third_party.utils.get_size(value, to)Get size of value with specified type.

stepler.third_party.utils.get_unwrapped_func(func)Get original function under decorator.

Decorator hides original function inside itself. But in some cases it’s important to get access to original function,for ex: for documentation.

Parameters func (function) – function that can be potentially a decorator which hides originalfunction

Returns unwrapped function or the same function

Return type function

stepler.third_party.utils.slugify(string)Replace non-alphanumeric symbols to underscore in string.

Parameters string (str) – string to replace

Returns replace string

Return type str

stepler.third_party.utils.background(f, *args, **kwargs)Run function in separate thread.

Parameters

• f (function) – function to call in background

• *args – function args

• **kwargs – function kwargs

Returns started process instance

Return type Process

stepler.third_party.utils.join_process(process)Wait until process to be done.

Parameters process (Process) – process

6.14. Third party modules 357

Page 362: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.third_party.utils.check_ssh_connection_establishment(server_ssh,must_work=True,timeout=0)

Function to check that ssh connection can be established.

Parameters

• server_ssh (ssh.SshClient) – ssh connection

• must_work (bool, optional) – flag whether ‘server_ssh’ should be able to con-nect or not

• timeout (int, optional) – seconds to wait a result of check

Raises

• RuntimeError – if server_ssh is not closed

• TimeoutExpired – if check failed after timeout

Video capture of display

class stepler.third_party.video_recorder.VideoRecorder(file_path, frame_rate=30)Video capture of display.

clear()Remove video file.

start()Start video capture.

stop()Stop video capture.

Waiter

exception stepler.third_party.waiter.ExpectationError(base_ex)Expectation error class.

exception stepler.third_party.waiter.PredicateTimeoutPredicate timeout exception class.

exception stepler.third_party.waiter.TimeoutExpired(base_ex)Timeout expired exception.

stepler.third_party.waiter.wait(predicate, args=None, kwargs=None, expected_exceptions=(),predicate_timeout=None, **wait_kwargs)

Wait that predicate execution returns non-false result.

It catches all raised ExpectationError and uses last exception to construct TimeoutException. It also can passarguments to predicate.

Example

>>> def predicate(foo, bar='baz'):... expect_that(foo, equal_to(bar))... return bar>>> wait(predicate, args=(1,), kwargs={'bar': 2}, timeout_seconds=1)

358 Chapter 6. Deep to structure

Page 363: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

TimeoutExpired: Timeout of 1 seconds expired waiting for <function predicate at 0x7f7798622c08>

Expected: <2> but: was <1>

>>> wait(lambda: False, timeout_seconds=0.5)

TimeoutExpired: Timeout of 0.5 seconds expired waiting for <function <lambda> at 0x7f2b54360848> Noexception raised during predicate executing

Parameters

• predicate (function) – predicate to wait execution result

• timeout_seconds (int) – seconds to wait result

• sleep_seconds (float) – polling time between predicate executions

• multiplier (int) – coefficient to multiply polling time

• expected_exceptions (tuple) – predicate exceptions which will be omitted dur-ing waiting.

• predicate_timeout (int) – max predicate execution timeout. Equals to time-out_seconds by default.

• waiting_for (str) – custom waiting message.

Returns

result of predicate execution in format: (predicate result, “Error message” or None)

Return type tuple

Raises TimeoutExpired – if predicate execution has false value after timeout

6.14. Third party modules 359

Page 364: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

360 Chapter 6. Deep to structure

Page 365: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

CHAPTER 7

Plugins

If you want to have own tests repository but use stepler fixtures and steps, you may organize own repository as steplerplugin, using stepler as required library. In order to use stepler follow next steps:

• Inside requirements.txt file add git+https://review.gerrithub.io/Mirantis/stepler.

• In root directory of project put conftest.py file and add next code:

from stepler.conftest import * # all shared stepler fixturesfrom stepler.conftest import __all__ # to follow pythonic and stepler code stylefrom stepler.conftest import pytest_plugins # if want to use stepler pytest plugins

If after previous steps you have problems with stepler usage, please report a bug.

361

Page 366: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

362 Chapter 7. Plugins

Page 367: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

Python Module Index

sstepler.baremetal.conftest, 44stepler.baremetal.steps, 48stepler.baremetal.tests.test_baremetal_chassis,

59stepler.baremetal.tests.test_baremetal_node,

53stepler.baremetal.tests.test_boot_baremetal_server,

53stepler.baremetal.tests.test_ironic_services,

58stepler.baremetal.tests.test_multitenancy,

59stepler.cinder.conftest, 15stepler.cinder.steps, 20stepler.cinder.tests.test_backups, 33stepler.cinder.tests.test_change_volume_type,

34stepler.cinder.tests.test_create_image_from_volume,

34stepler.cinder.tests.test_create_volume_from_image,

34stepler.cinder.tests.test_edit_volume,

35stepler.cinder.tests.test_extend_volume,

36stepler.cinder.tests.test_services, 37stepler.cinder.tests.test_volume_snapshots,

39stepler.cinder.tests.test_volume_transfer,

39stepler.cinder.tests.test_volumes, 40stepler.cli_clients.conftest, 314stepler.cli_clients.steps, 316stepler.cli_clients.tests.test_cinder,

331stepler.cli_clients.tests.test_glance,

342stepler.cli_clients.tests.test_heat, 338stepler.cli_clients.tests.test_neutron,

346stepler.cli_clients.tests.test_nova, 336stepler.cli_clients.tests.test_openstack,

337stepler.glance.conftest, 61stepler.glance.steps, 64stepler.glance.tests.test_images, 68stepler.glance.tests.test_security, 70stepler.glance.tests.test_services, 69stepler.heat.conftest, 71stepler.heat.steps, 72stepler.heat.tests.test_stack, 76stepler.horizon.conftest, 82stepler.horizon.steps, 90stepler.horizon.tests.test_auth, 102stepler.horizon.tests.test_containers,

103stepler.horizon.tests.test_credentials,

104stepler.horizon.tests.test_defaults, 105stepler.horizon.tests.test_flavors, 105stepler.horizon.tests.test_floatingips,

106stepler.horizon.tests.test_host_aggregates,

106stepler.horizon.tests.test_images, 107stepler.horizon.tests.test_instances,

111stepler.horizon.tests.test_keypairs, 116stepler.horizon.tests.test_metadata_definitions,

117stepler.horizon.tests.test_networks, 117stepler.horizon.tests.test_projects, 118stepler.horizon.tests.test_router, 119stepler.horizon.tests.test_security_groups,

120stepler.horizon.tests.test_user_settings,

120stepler.horizon.tests.test_users, 121stepler.horizon.tests.test_volume_backups,

123

363

Page 368: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.horizon.tests.test_volume_snapshots,125

stepler.horizon.tests.test_volume_types,127

stepler.horizon.tests.test_volumes, 127stepler.keystone.conftest, 132stepler.keystone.steps, 137stepler.keystone.tests.test_keystone,

147stepler.neutron.conftest, 150stepler.neutron.steps, 165stepler.neutron.tests.test_basic_verification,

238stepler.neutron.tests.test_dhcp_agent,

189stepler.neutron.tests.test_dvr, 208stepler.neutron.tests.test_l2pop, 225stepler.neutron.tests.test_l3_agent, 181stepler.neutron.tests.test_l3_ha, 227stepler.neutron.tests.test_ovs_restart,

202stepler.neutron.tests.test_sighup, 224stepler.neutron.tests.test_vxlan, 235stepler.nova.conftest, 241stepler.nova.steps, 254stepler.nova.tests.test_basic_verification,

277stepler.nova.tests.test_deferred_delete,

285stepler.nova.tests.test_evacuate, 304stepler.nova.tests.test_host_actions,

289stepler.nova.tests.test_live_migration,

290stepler.nova.tests.test_live_migration_multi_servers,

295stepler.nova.tests.test_metadata, 298stepler.nova.tests.test_rebuild, 300stepler.nova.tests.test_restart_all_services,

303stepler.object_storage.conftest, 309stepler.object_storage.steps, 310stepler.third_party.arping, 347stepler.third_party.chunk_serializer,

347stepler.third_party.context, 348stepler.third_party.idempotent_id, 349stepler.third_party.logger, 349stepler.third_party.network_checks, 349stepler.third_party.no_tests_found, 350stepler.third_party.output_parser, 350stepler.third_party.ping, 350stepler.third_party.process_mutex, 351stepler.third_party.reports_cleaner, 351

stepler.third_party.ssh, 352stepler.third_party.steps_checker, 354stepler.third_party.supported_platforms,

351stepler.third_party.tcpdump, 354stepler.third_party.utils, 355stepler.third_party.video_recorder, 358stepler.third_party.waiter, 358

364 Python Module Index

Page 369: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

Index

Aaccept_transfer() (stepler.horizon.steps.VolumesSteps

method), 100accept_volume_transfer()

(stepler.cinder.steps.VolumeTransferStepsmethod), 30

acquire() (stepler.third_party.process_mutex.Lockmethod), 351

add_group_rule() (stepler.horizon.steps.SecurityGroupsStepsmethod), 98

add_group_rules() (stepler.nova.steps.SecurityGroupStepsmethod), 261

add_host() (stepler.nova.steps.AggregateSteps method),254

add_locations() (stepler.glance.steps.GlanceStepsV2method), 65

add_metadata() (stepler.horizon.steps.ImagesStepsmethod), 93

add_network_to_dhcp_agent()(stepler.neutron.steps.AgentSteps method),165

add_port_interface() (stepler.neutron.steps.RouterStepsmethod), 177

add_router_interfaces() (in modulestepler.neutron.conftest), 150

add_router_to_l3_agent()(stepler.neutron.steps.AgentSteps method),165

add_rule_to_group() (stepler.neutron.steps.NeutronSecurityGroupRuleStepsmethod), 170

add_rules_to_group() (stepler.neutron.steps.NeutronSecurityGroupRuleStepsmethod), 170

add_security_group() (stepler.horizon.steps.InstancesStepsmethod), 95

add_subnet() (stepler.horizon.steps.NetworksStepsmethod), 97

add_subnet_interface() (stepler.neutron.steps.RouterStepsmethod), 177

add_user_to_group() (stepler.keystone.steps.UserStepsmethod), 142

admin() (in module stepler.keystone.conftest), 132admin_delete_instance() (stepler.horizon.steps.InstancesSteps

method), 95admin_delete_instances()

(stepler.horizon.steps.InstancesSteps method),95

admin_delete_network() (stepler.horizon.steps.NetworksStepsmethod), 97

admin_filter_instances() (stepler.horizon.steps.InstancesStepsmethod), 95

admin_filter_networks() (stepler.horizon.steps.NetworksStepsmethod), 97

admin_only() (in module stepler.horizon.conftest), 82admin_reset_instances_filter()

(stepler.horizon.steps.InstancesSteps method),95

admin_role() (in module stepler.keystone.conftest), 133admin_update_network()

(stepler.horizon.steps.NetworksSteps method),97

agent_steps() (in module stepler.neutron.conftest), 150AgentSteps (class in stepler.neutron.steps), 165aggregate_steps() (in module stepler.nova.conftest), 241AggregateSteps (class in stepler.nova.steps), 254allocate_floating_ip() (in module

stepler.horizon.conftest), 82allocate_floating_ip() (stepler.horizon.steps.FloatingIPsSteps

method), 92any_one() (in module stepler.horizon.conftest), 82api_access_steps_ui() (in module

stepler.horizon.conftest), 83api_glance_client_v1() (in module

stepler.glance.conftest), 61api_glance_client_v2() (in module

stepler.glance.conftest), 61api_glance_steps() (in module stepler.glance.conftest), 61api_glance_steps_v1() (in module

stepler.glance.conftest), 61api_glance_steps_v2() (in module

stepler.glance.conftest), 61api_ironic_client_v1() (in module

365

Page 370: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.baremetal.conftest), 44api_ironic_steps() (in module stepler.baremetal.conftest),

44api_ironic_steps_v1() (in module

stepler.baremetal.conftest), 44ApiAccessSteps (class in stepler.horizon.steps), 91arping() (in module stepler.third_party.arping), 347associate_floating_ip() (stepler.horizon.steps.FloatingIPsSteps

method), 92attach_fixed_ip() (stepler.nova.steps.ServerSteps

method), 262attach_floating_ip() (stepler.neutron.steps.FloatingIPSteps

method), 169attach_floating_ip() (stepler.nova.steps.ServerSteps

method), 262attach_instance() (stepler.horizon.steps.VolumesSteps

method), 100attach_volume_to_server() (in module

stepler.nova.conftest), 241attach_volume_to_server()

(stepler.nova.steps.NovaVolumeSteps method),261

AttrDict (class in stepler.third_party.utils), 355auth_steps() (in module stepler.horizon.conftest), 83AuthSteps (class in stepler.horizon.steps), 91availability_zone_steps() (in module

stepler.nova.conftest), 241AvailabilityZoneSteps (class in stepler.nova.steps), 255available_flavors_for_hypervisors() (in module

stepler.nova.conftest), 241

Bbackground() (in module stepler.third_party.utils), 357background_call() (stepler.third_party.ssh.SshClient

method), 352backup_steps() (in module stepler.cinder.conftest), 15BackupSteps (class in stepler.cinder.steps), 31baremetal_flavor() (in module stepler.nova.conftest), 241baremetal_network() (in module stepler.neutron.conftest),

150baremetal_node_list() (stepler.cli_clients.steps.CliOpenstackSteps

method), 326baremetal_ubuntu_image() (in module

stepler.glance.conftest), 61BaseSteps (class in stepler.base), 11big_snapshot_quota() (in module stepler.cinder.conftest),

15bind_project() (stepler.glance.steps.GlanceStepsV2

method), 65bootable_volume() (in module stepler.cinder.conftest), 15bootable_volume_with_private_image() (in module

stepler.cinder.conftest), 15

Ccancel_stack_update() (stepler.cli_clients.steps.CliHeatSteps

method), 322cancel_stack_update() (stepler.cli_clients.steps.CliOpenstackSteps

method), 326change_glance_credentials() (in module

stepler.glance.conftest), 61change_neutron_quota() (in module

stepler.neutron.conftest), 151change_stack_template()

(stepler.horizon.steps.StacksSteps method),99

change_user_password() (stepler.horizon.steps.SettingsStepsmethod), 98

change_user_password() (stepler.horizon.steps.UsersStepsmethod), 99

change_volume_status() (stepler.horizon.steps.VolumesStepsmethod), 100

change_volume_type() (stepler.cinder.steps.VolumeStepsmethod), 20

change_volume_type() (stepler.horizon.steps.VolumesStepsmethod), 100

check() (stepler.third_party.ssh.SshClient method), 352check_active_ssh_connection()

(stepler.nova.steps.ServerSteps method),262

check_admin_instances_pagination()(stepler.horizon.steps.InstancesSteps method),95

check_admin_instances_pagination_filter()(stepler.horizon.steps.InstancesSteps method),95

check_agents_count_for_net()(stepler.neutron.steps.AgentSteps method),166

check_aggregate_presence()(stepler.nova.steps.AggregateSteps method),254

check_alert_present() (stepler.horizon.steps.AuthStepsmethod), 91

check_alive() (stepler.neutron.steps.AgentSteps method),166

check_all_active_hosts_available()(stepler.nova.steps.AvailabilityZoneStepsmethod), 255

check_arping_loss_context()(stepler.nova.steps.ServerSteps method),263

check_backup_creation_form_name_field_max_length()(stepler.horizon.steps.VolumesSteps method),100

check_backup_not_created_with_long_container_name()(stepler.cinder.steps.BackupSteps method), 31

check_backup_presence()

366 Index

Page 371: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

(stepler.cinder.steps.BackupSteps method),31

check_backup_status() (stepler.cinder.steps.BackupStepsmethod), 31

check_backups_pagination()(stepler.horizon.steps.VolumesSteps method),101

check_button_import_key_pair_disabled()(stepler.horizon.steps.KeypairsSteps method),96

check_call() (stepler.third_party.ssh.SshClient method),352

check_cinder_available()(stepler.cinder.steps.VolumeSteps method),20

check_container_name_volume_backups()(stepler.horizon.steps.ContainersStepsmethod), 91

check_container_presence()(stepler.cli_clients.steps.CliSwiftStepsmethod), 329

check_create_server_negative()(stepler.nova.steps.ServerSteps method),263

check_current_settings() (stepler.horizon.steps.SettingsStepsmethod), 98

check_dashboard_help_url()(stepler.horizon.steps.SettingsSteps method),98

check_default_migration_policy()(stepler.horizon.steps.VolumesSteps method),101

check_dhcp_on_cirros_server()(stepler.nova.steps.ServerSteps method),263

check_domain_presence()(stepler.keystone.steps.DomainSteps method),137

check_equal_ports() (stepler.neutron.steps.PortStepsmethod), 175

check_files_presence_for_path()(stepler.nova.steps.ServerSteps method),263

check_fixed_id_ping_loss_context()(stepler.nova.steps.ServerSteps method),264

check_flavor_absent_in_instance_launch_form()(stepler.horizon.steps.InstancesSteps method),95

check_flavor_presence() (stepler.nova.steps.FlavorStepsmethod), 256

check_flavors_limited_in_launch_instance_form()(stepler.horizon.steps.ImagesSteps method), 93

check_floating_ip_presence()

(stepler.nova.steps.FloatingIpSteps method),258

check_folder_available_by_public_url()(stepler.horizon.steps.ContainersStepsmethod), 91

check_gateway_presence()(stepler.neutron.steps.RouterSteps method),177

check_get_projects_requires_authentication()(stepler.keystone.steps.ProjectSteps method),139

check_glance_service_available()(stepler.glance.steps.GlanceStepsV2 method),65

check_group_presence() (stepler.keystone.steps.GroupStepsmethod), 138

check_group_presence() (stepler.nova.steps.SecurityGroupStepsmethod), 261

check_host_usage_changing()(stepler.nova.steps.HostSteps method), 258

check_image_bind_status()(stepler.glance.steps.GlanceStepsV2 method),65

check_image_container_and_disk_format()(stepler.glance.steps.GlanceStepsV2 method),66

check_image_content() (stepler.glance.steps.GlanceStepsV2method), 66

check_image_data_corresponds_to_source()(stepler.glance.steps.GlanceStepsV2 method),66

check_image_hash() (stepler.glance.steps.GlanceStepsV2method), 66

check_image_info() (stepler.horizon.steps.ImagesStepsmethod), 93

check_image_list_contains()(stepler.cli_clients.steps.CliGlanceStepsmethod), 318

check_image_list_doesnt_contain()(stepler.cli_clients.steps.CliGlanceStepsmethod), 319

check_image_location_isnot_removed()(stepler.cli_clients.steps.CliGlanceStepsmethod), 319

check_image_present() (stepler.horizon.steps.ImagesStepsmethod), 93

check_image_property() (stepler.cli_clients.steps.CliGlanceStepsmethod), 319

check_image_update_is_forbidden()(stepler.glance.steps.GlanceStepsV1 method),65

check_images_filtered() (stepler.cli_clients.steps.CliGlanceStepsmethod), 319

check_images_pagination()

Index 367

Page 372: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

(stepler.horizon.steps.ImagesSteps method), 93check_instance_active() (stepler.horizon.steps.InstancesSteps

method), 95check_instance_pause() (stepler.horizon.steps.InstancesSteps

method), 95check_instance_suspend()

(stepler.horizon.steps.InstancesSteps method),95

check_instances_pagination()(stepler.horizon.steps.InstancesSteps method),95

check_instances_pagination_filter()(stepler.horizon.steps.InstancesSteps method),95

check_instances_sum() (stepler.horizon.steps.InstancesStepsmethod), 95

check_iperf_loss_context()(stepler.nova.steps.ServerSteps method),264

check_ironic_chassis_presence()(stepler.baremetal.steps.IronicChassisStepsmethod), 52

check_ironic_nodes_attribute_value()(stepler.baremetal.steps.IronicNodeStepsmethod), 49

check_ironic_nodes_maintenance()(stepler.baremetal.steps.IronicNodeStepsmethod), 49

check_ironic_nodes_power_state()(stepler.baremetal.steps.IronicNodeStepsmethod), 49

check_ironic_nodes_presence()(stepler.baremetal.steps.IronicNodeStepsmethod), 49

check_ironic_nodes_provision_state()(stepler.baremetal.steps.IronicNodeStepsmethod), 49

check_keypairs_presence()(stepler.nova.steps.KeypairSteps method),260

check_keypairs_time() (stepler.horizon.steps.KeypairsStepsmethod), 96

check_l3_ha_router_rescheduled()(stepler.neutron.steps.AgentSteps method),166

check_login_time() (stepler.horizon.steps.AuthStepsmethod), 91

check_metadata_presence()(stepler.nova.steps.ServerSteps method),264

check_migration_status()(stepler.cinder.steps.VolumeSteps method),20

check_negative_create_extra_floating_ip()

(stepler.neutron.steps.FloatingIPSteps method),169

check_negative_create_extra_group_rule()(stepler.neutron.steps.NeutronSecurityGroupRuleStepsmethod), 171

check_negative_create_extra_network()(stepler.neutron.steps.NetworkSteps method),172

check_negative_create_extra_port()(stepler.neutron.steps.PortSteps method),175

check_negative_create_extra_router()(stepler.neutron.steps.RouterSteps method),178

check_negative_create_extra_security_group()(stepler.neutron.steps.NeutronSecurityGroupStepsmethod), 171

check_negative_create_extra_subnet()(stepler.neutron.steps.SubnetSteps method),180

check_negative_delete_non_existing_image()(stepler.cli_clients.steps.CliGlanceStepsmethod), 319

check_negative_download_zero_size_image()(stepler.cli_clients.steps.CliGlanceStepsmethod), 319

check_negative_image_create_without_properties()(stepler.cli_clients.steps.CliGlanceStepsmethod), 320

check_negative_router_create_with_distributed_option()(stepler.cli_clients.steps.CliNeutronStepsmethod), 328

check_nets_count_difference_for_agents()(stepler.neutron.steps.NetworkSteps method),172

check_nets_count_for_agent()(stepler.neutron.steps.NetworkSteps method),173

check_network_is_on_agent()(stepler.neutron.steps.AgentSteps method),166

check_network_present()(stepler.horizon.steps.NetworksSteps method),97

check_network_rescheduled()(stepler.neutron.steps.AgentSteps method),166

check_network_share_status()(stepler.horizon.steps.NetworksSteps method),97

check_networks_time() (stepler.horizon.steps.NetworksStepsmethod), 97

check_no_arping_for_ip()(stepler.nova.steps.ServerSteps method),

368 Index

Page 373: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

264check_no_fixed_id_ping_context()

(stepler.nova.steps.ServerSteps method),265

check_no_ping_context() (stepler.nova.steps.ServerStepsmethod), 265

check_no_users_page_in_menu()(stepler.horizon.steps.UsersSteps method),99

check_non_public_image_not_visible()(stepler.horizon.steps.ImagesSteps method), 93

check_object_content() (stepler.object_storage.steps.ContainerSwiftStepsmethod), 310

check_object_hash() (stepler.object_storage.steps.ContainerCephStepsmethod), 312

check_object_in_container()(stepler.cli_clients.steps.CliSwiftStepsmethod), 329

check_object_presence() (stepler.object_storage.steps.ContainerCephStepsmethod), 312

check_object_presence() (stepler.object_storage.steps.ContainerSwiftStepsmethod), 310

check_output_list() (stepler.heat.steps.StackStepsmethod), 72

check_output_show() (stepler.heat.steps.StackStepsmethod), 72

check_page_is_available()(stepler.horizon.steps.ImagesSteps method), 93

check_ping_between_servers_via_floating()(stepler.nova.steps.ServerSteps method),265

check_ping_by_plan() (stepler.nova.steps.ServerStepsmethod), 265

check_ping_for_ip() (stepler.nova.steps.ServerStepsmethod), 265

check_ping_loss_context()(stepler.nova.steps.ServerSteps method),266

check_ping_to_server_floating()(stepler.nova.steps.ServerSteps method),266

check_port_interface_presence()(stepler.neutron.steps.RouterSteps method),178

check_ports_binding_difference()(stepler.neutron.steps.PortSteps method),175

check_ports_ids_equal() (stepler.neutron.steps.PortStepsmethod), 175

check_ports_presence() (stepler.baremetal.steps.IronicPortStepsmethod), 51

check_presence() (stepler.heat.steps.StackSteps method),73

check_presence() (stepler.keystone.steps.Ec2Steps

method), 138check_presence() (stepler.neutron.steps.FloatingIPSteps

method), 169check_presence() (stepler.neutron.steps.NetworkSteps

method), 173check_presence() (stepler.neutron.steps.NeutronSecurityGroupSteps

method), 172check_presence() (stepler.neutron.steps.PortSteps

method), 175check_presence() (stepler.neutron.steps.RouterSteps

method), 178check_presence() (stepler.neutron.steps.SubnetSteps

method), 181check_presence() (stepler.object_storage.steps.ContainerCephSteps

method), 312check_presence() (stepler.object_storage.steps.ContainerSwiftSteps

method), 310check_process_present() (stepler.third_party.ssh.SshClient

method), 352check_project_cant_disable_itself()

(stepler.horizon.steps.ProjectsSteps method),97

check_project_in_image_member_list()(stepler.cli_clients.steps.CliGlanceStepsmethod), 320

check_project_presence()(stepler.keystone.steps.ProjectSteps method),139

check_public_image_visible()(stepler.horizon.steps.ImagesSteps method), 94

check_qcow_image_for_server()(stepler.nova.steps.ServerSteps method),266

check_resource_item_changed()(stepler.horizon.steps.OverviewSteps method),97

check_role_grant_status()(stepler.keystone.steps.RoleSteps method),140

check_role_presence() (stepler.keystone.steps.RoleStepsmethod), 141

check_router_attrs() (stepler.neutron.steps.RouterStepsmethod), 178

check_router_is_on_agent()(stepler.neutron.steps.AgentSteps method),167

check_router_rescheduled()(stepler.neutron.steps.AgentSteps method),167

check_router_type_not_changed_to_centralized()(stepler.neutron.steps.RouterSteps method),178

check_routers_count_for_agent()(stepler.neutron.steps.RouterSteps method),

Index 369

Page 374: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

178check_routers_time() (stepler.horizon.steps.RoutersSteps

method), 98check_rule_presence() (stepler.neutron.steps.NeutronSecurityGroupRuleSteps

method), 171check_rule_presence() (stepler.nova.steps.SecurityGroupSteps

method), 261check_server_attribute() (stepler.nova.steps.ServerSteps

method), 266check_server_doesnot_detach_unattached_fixed_ip()

(stepler.nova.steps.ServerSteps method), 267check_server_host_attr() (stepler.nova.steps.ServerSteps

method), 267check_server_ip() (stepler.nova.steps.ServerSteps

method), 267check_server_log_contains_record()

(stepler.nova.steps.ServerSteps method),267

check_server_not_rebuilt_in_paused_state()(stepler.nova.steps.ServerSteps method),268

check_server_not_rebuilt_in_rescue_state()(stepler.nova.steps.ServerSteps method),268

check_server_presence() (stepler.nova.steps.ServerStepsmethod), 268

check_server_status() (stepler.nova.steps.ServerStepsmethod), 268

check_servers_actions_not_available()(stepler.nova.steps.ServerSteps method),268

check_servers_not_evacuated_in_paused_state()(stepler.nova.steps.ServerSteps method),268

check_servers_not_evacuated_in_rescue_state()(stepler.nova.steps.ServerSteps method),269

check_servers_not_evacuated_in_resized_state()(stepler.nova.steps.ServerSteps method),269

check_servers_not_evacuated_in_shelved_state()(stepler.nova.steps.ServerSteps method),269

check_servers_not_evacuated_to_initial_compute()(stepler.nova.steps.ServerSteps method), 269

check_service_presence()(stepler.keystone.steps.ServiceSteps method),146

check_service_states() (stepler.nova.steps.NovaServiceStepsmethod), 276

check_services_up() (stepler.nova.steps.NovaServiceStepsmethod), 276

check_snapshot_creation_form_name_field_max_length()(stepler.horizon.steps.VolumesSteps method),

101check_snapshot_status() (stepler.cinder.steps.SnapshotSteps

method), 28check_snapshots_pagination()

(stepler.horizon.steps.VolumesSteps method),101

check_snapshots_presence()(stepler.cinder.steps.SnapshotSteps method),29

check_ssh_connection_establishment() (in modulestepler.third_party.utils), 357

check_stack() (stepler.horizon.steps.StacksStepsmethod), 99

check_stack_status() (stepler.heat.steps.StackStepsmethod), 73

check_status() (stepler.heat.steps.StackSteps method), 73check_stderr() (stepler.third_party.ssh.SshClient method),

352check_subnet_interface_presence()

(stepler.neutron.steps.RouterSteps method),179

check_tcp_connect() (in modulestepler.third_party.network_checks), 349

check_that_image_id_is_changed()(stepler.glance.steps.GlanceStepsV2 method),66

check_that_resource_id_changed()(stepler.heat.steps.ResourceSteps method),75

check_timestamps_on_root_and_ephemeral_disks()(stepler.nova.steps.ServerSteps method), 269

check_token_is_revoked()(stepler.keystone.steps.TokenSteps method),145

check_transfer_not_created_with_long_transfer_name()(stepler.cinder.steps.VolumeTransferStepsmethod), 30

check_type_unchangeable_for_active_router()(stepler.neutron.steps.RouterSteps method),179

check_user_cant_disable_itself()(stepler.horizon.steps.UsersSteps method),99

check_user_enable_status()(stepler.horizon.steps.UsersSteps method),99

check_user_in_group() (stepler.keystone.steps.UserStepsmethod), 143

check_user_not_deleted()(stepler.horizon.steps.UsersSteps method),99

check_user_presence() (stepler.keystone.steps.UserStepsmethod), 143

check_user_present() (stepler.horizon.steps.UsersSteps

370 Index

Page 375: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

method), 100check_volume_attachments()

(stepler.cinder.steps.VolumeSteps method),21

check_volume_deletion_with_wrong_id()(stepler.cinder.steps.VolumeSteps method),21

check_volume_deletion_without_cascading_failed()(stepler.cinder.steps.VolumeSteps method), 21

check_volume_extend_failed_incorrect_size()(stepler.cinder.steps.VolumeSteps method),21

check_volume_extend_failed_size_more_than_limit()(stepler.cinder.steps.VolumeSteps method), 21

check_volume_host() (stepler.cinder.steps.VolumeStepsmethod), 21

check_volume_not_created_with_incorrect_size()(stepler.cinder.steps.VolumeSteps method), 21

check_volume_not_created_with_long_name()(stepler.cinder.steps.VolumeSteps method),21

check_volume_not_created_with_non_exist_volume_type()(stepler.cinder.steps.VolumeSteps method), 22

check_volume_not_created_with_size_more_than_limit()(stepler.cinder.steps.VolumeSteps method), 22

check_volume_not_created_with_wrong_image_id()(stepler.cinder.steps.VolumeSteps method), 22

check_volume_presence()(stepler.cinder.steps.VolumeSteps method),22

check_volume_present() (stepler.horizon.steps.VolumesStepsmethod), 101

check_volume_present_in_admin_volume()(stepler.horizon.steps.VolumesSteps method),101

check_volume_properties()(stepler.cinder.steps.VolumeSteps method),22

check_volume_size() (stepler.cinder.steps.VolumeStepsmethod), 22

check_volume_status() (stepler.cinder.steps.VolumeStepsmethod), 22

check_volume_to_server_attachment_status()(stepler.nova.steps.NovaVolumeSteps method),262

check_volume_transfer_presence()(stepler.cinder.steps.VolumeTransferStepsmethod), 30

check_volume_type() (stepler.cinder.steps.VolumeStepsmethod), 23

check_volume_type_presence()(stepler.cinder.steps.VolumeTypeStepsmethod), 26

check_volume_update_failed()

(stepler.cinder.steps.VolumeSteps method),23

check_volumes_pagination()(stepler.horizon.steps.VolumesSteps method),101

cinder_client() (in module stepler.cinder.conftest), 16cinder_quota_steps() (in module stepler.cinder.conftest),

16CinderQuotaSteps (class in stepler.cinder.steps), 27cirros_image() (in module stepler.glance.conftest), 62cirros_image_private() (in module

stepler.glance.conftest), 62cirros_server_to_rebuild() (in module

stepler.nova.conftest), 242cleanup_backups() (in module stepler.cinder.conftest), 16cleanup_chassis() (in module stepler.baremetal.conftest),

44cleanup_nodes() (in module stepler.baremetal.conftest),

45cleanup_snapshots() (in module stepler.cinder.conftest),

16cleanup_transfers() (in module stepler.cinder.conftest), 16cleanup_volumes() (in module stepler.cinder.conftest), 16clear() (stepler.third_party.video_recorder.VideoRecorder

method), 358clear_gateway() (stepler.neutron.steps.RouterSteps

method), 179cli_cinder_steps() (in module stepler.cli_clients.conftest),

315cli_download_image() (in module

stepler.cli_clients.conftest), 315cli_glance_steps() (in module stepler.cli_clients.conftest),

315cli_heat_steps() (in module stepler.cli_clients.conftest),

315cli_ironic_steps() (in module stepler.cli_clients.conftest),

316cli_neutron_steps() (in module

stepler.cli_clients.conftest), 316cli_nova_steps() (in module stepler.cli_clients.conftest),

316cli_openstack_steps() (in module

stepler.cli_clients.conftest), 316cli_swift_steps() (in module stepler.cli_clients.conftest),

316CliCinderSteps (class in stepler.cli_clients.steps), 316CliGlanceSteps (class in stepler.cli_clients.steps), 318CliHeatSteps (class in stepler.cli_clients.steps), 322CliIronicSteps (class in stepler.cli_clients.steps), 325CliNeutronSteps (class in stepler.cli_clients.steps), 328CliNovaSteps (class in stepler.cli_clients.steps), 325CliOpenstackSteps (class in stepler.cli_clients.steps), 326CliSwiftSteps (class in stepler.cli_clients.steps), 329close() (stepler.third_party.ssh.SshClient method), 353

Index 371

Page 376: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

confirm_resize_servers() (stepler.nova.steps.ServerStepsmethod), 269

connect() (stepler.third_party.ssh.SshClient method), 353conntrack_cirros_image() (in module

stepler.glance.conftest), 62container() (in module stepler.horizon.conftest), 83container() (in module stepler.object_storage.conftest),

309container_steps() (in module

stepler.object_storage.conftest), 309ContainerCephSteps (class in

stepler.object_storage.steps), 312containers_steps_ui() (in module

stepler.horizon.conftest), 83ContainersSteps (class in stepler.horizon.steps), 91ContainerSwiftSteps (class in

stepler.object_storage.steps), 310context() (in module stepler.third_party.context), 348create() (stepler.cli_clients.steps.CliSwiftSteps method),

329create() (stepler.heat.steps.StackSteps method), 73create() (stepler.keystone.steps.Ec2Steps method), 138create() (stepler.neutron.steps.FloatingIPSteps method),

169create() (stepler.neutron.steps.NetworkSteps method),

173create() (stepler.neutron.steps.NeutronSecurityGroupSteps

method), 172create() (stepler.neutron.steps.PortSteps method), 176create() (stepler.neutron.steps.RouterSteps method), 179create() (stepler.neutron.steps.SubnetSteps method), 181create() (stepler.object_storage.steps.ContainerCephSteps

method), 312create() (stepler.object_storage.steps.ContainerSwiftSteps

method), 311create_aggregate() (in module stepler.nova.conftest), 242create_aggregate() (stepler.nova.steps.AggregateSteps

method), 254create_backup() (in module stepler.cinder.conftest), 16create_backup() (stepler.cinder.steps.BackupSteps

method), 32create_backup() (stepler.horizon.steps.VolumesSteps

method), 101create_container() (stepler.horizon.steps.ContainersSteps

method), 91create_container_ui() (in module

stepler.horizon.conftest), 83create_domain() (in module stepler.keystone.conftest),

133create_domain() (stepler.keystone.steps.DomainSteps

method), 137create_empty_file_on_server()

(stepler.nova.steps.ServerSteps method),269

create_flavor() (in module stepler.nova.conftest), 242create_flavor() (stepler.horizon.steps.FlavorsSteps

method), 92create_flavor() (stepler.nova.steps.FlavorSteps method),

256create_floating_ip() (in module stepler.neutron.conftest),

151create_floating_ip() (stepler.nova.steps.FloatingIpSteps

method), 258create_folder() (stepler.horizon.steps.ContainersSteps

method), 91create_group() (in module stepler.keystone.conftest), 133create_group() (stepler.keystone.steps.GroupSteps

method), 139create_group() (stepler.nova.steps.SecurityGroupSteps

method), 261create_host_aggregate() (stepler.horizon.steps.HostAggregatesSteps

method), 93create_image() (stepler.horizon.steps.ImagesSteps

method), 94create_image_member() (stepler.cli_clients.steps.CliGlanceSteps

method), 320create_images() (stepler.glance.steps.GlanceStepsV2

method), 66create_images_context() (in module

stepler.glance.conftest), 62create_instance() (stepler.horizon.steps.InstancesSteps

method), 96create_instance_snapshot()

(stepler.horizon.steps.InstancesSteps method),96

create_ironic_chassis() (stepler.baremetal.steps.IronicChassisStepsmethod), 52

create_ironic_nodes() (stepler.baremetal.steps.IronicNodeStepsmethod), 50

create_keypair() (stepler.horizon.steps.KeypairsStepsmethod), 96

create_keypairs() (stepler.nova.steps.KeypairStepsmethod), 260

create_max_networks_with_instances() (in modulestepler.neutron.conftest), 151

create_namespace() (stepler.horizon.steps.NamespacesStepsmethod), 97

create_network() (in module stepler.neutron.conftest),152

create_network() (stepler.horizon.steps.NetworksStepsmethod), 97

create_port() (in module stepler.neutron.conftest), 152create_ports() (stepler.baremetal.steps.IronicPortSteps

method), 51create_project() (in module stepler.keystone.conftest),

133create_project() (stepler.horizon.steps.ProjectsSteps

method), 97

372 Index

Page 377: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

create_project() (stepler.keystone.steps.ProjectStepsmethod), 140

create_qcow_image_for_server()(stepler.nova.steps.ServerSteps method),270

create_qos_spec() (stepler.horizon.steps.VolumeTypesStepsmethod), 100

create_role() (in module stepler.keystone.conftest), 133create_role() (stepler.keystone.steps.RoleSteps method),

141create_router() (in module stepler.neutron.conftest), 152create_router() (stepler.cli_clients.steps.CliNeutronSteps

method), 329create_router() (stepler.horizon.steps.RoutersSteps

method), 98create_security_group() (stepler.horizon.steps.SecurityGroupsSteps

method), 98create_server_context() (in module stepler.nova.conftest),

243create_servers() (stepler.nova.steps.ServerSteps method),

270create_servers_context() (in module

stepler.nova.conftest), 243create_service() (stepler.keystone.steps.ServiceSteps

method), 146create_snapshot() (stepler.horizon.steps.VolumesSteps

method), 101create_snapshots() (stepler.cinder.steps.SnapshotSteps

method), 29create_stack() (in module stepler.heat.conftest), 71create_stack() (stepler.cli_clients.steps.CliHeatSteps

method), 322create_stack() (stepler.cli_clients.steps.CliOpenstackSteps

method), 326create_stack() (stepler.horizon.steps.StacksSteps

method), 99create_subnet() (in module stepler.neutron.conftest), 153create_timestamps_on_root_and_ephemeral_disks()

(stepler.nova.steps.ServerSteps method), 270create_transfer() (stepler.horizon.steps.VolumesSteps

method), 101create_user() (in module stepler.keystone.conftest), 133create_user() (stepler.horizon.steps.UsersSteps method),

100create_user() (stepler.keystone.steps.UserSteps method),

143create_volume() (stepler.cli_clients.steps.CliCinderSteps

method), 316create_volume() (stepler.horizon.steps.ImagesSteps

method), 94create_volume() (stepler.horizon.steps.VolumesSteps

method), 101create_volume_backup() (stepler.cli_clients.steps.CliCinderSteps

method), 317

create_volume_from_snapshot()(stepler.horizon.steps.VolumesSteps method),102

create_volume_snapshot()(stepler.cli_clients.steps.CliCinderStepsmethod), 317

create_volume_transfer() (in modulestepler.cinder.conftest), 16

create_volume_transfer()(stepler.cinder.steps.VolumeTransferStepsmethod), 30

create_volume_transfer()(stepler.cli_clients.steps.CliCinderStepsmethod), 317

create_volume_type() (in module stepler.cinder.conftest),17

create_volume_type() (stepler.cinder.steps.VolumeTypeStepsmethod), 26

create_volume_type() (stepler.horizon.steps.VolumeTypesStepsmethod), 100

create_volumes() (stepler.cinder.steps.VolumeStepsmethod), 23

current_project() (in module stepler.keystone.conftest),133

current_user() (in module stepler.keystone.conftest), 133

Ddefaults_steps_ui() (in module stepler.horizon.conftest),

83DefaultsSteps (class in stepler.horizon.steps), 92delete() (stepler.cli_clients.steps.CliSwiftSteps method),

330delete() (stepler.heat.steps.StackSteps method), 73delete() (stepler.keystone.steps.Ec2Steps method), 138delete() (stepler.neutron.steps.FloatingIPSteps method),

170delete() (stepler.neutron.steps.NetworkSteps method),

173delete() (stepler.neutron.steps.NeutronSecurityGroupSteps

method), 172delete() (stepler.neutron.steps.PortSteps method), 176delete() (stepler.neutron.steps.RouterSteps method), 179delete() (stepler.neutron.steps.SubnetSteps method), 181delete() (stepler.object_storage.steps.ContainerCephSteps

method), 313delete() (stepler.object_storage.steps.ContainerSwiftSteps

method), 311delete_aggregate() (stepler.nova.steps.AggregateSteps

method), 255delete_backup() (stepler.cinder.steps.BackupSteps

method), 32delete_backups() (stepler.horizon.steps.VolumesSteps

method), 102

Index 373

Page 378: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

delete_container() (stepler.horizon.steps.ContainersStepsmethod), 91

delete_domain() (stepler.keystone.steps.DomainStepsmethod), 137

delete_file() (stepler.horizon.steps.ContainersStepsmethod), 91

delete_flavor() (stepler.horizon.steps.FlavorsStepsmethod), 92

delete_flavor() (stepler.nova.steps.FlavorSteps method),256

delete_flavors() (stepler.horizon.steps.FlavorsStepsmethod), 92

delete_floating_ip() (stepler.nova.steps.FloatingIpStepsmethod), 258

delete_folder() (stepler.horizon.steps.ContainersStepsmethod), 92

delete_group() (stepler.keystone.steps.GroupStepsmethod), 139

delete_group() (stepler.nova.steps.SecurityGroupStepsmethod), 261

delete_group_rule() (stepler.horizon.steps.SecurityGroupsStepsmethod), 98

delete_host_aggregate() (stepler.horizon.steps.HostAggregatesStepsmethod), 93

delete_host_aggregates()(stepler.horizon.steps.HostAggregatesStepsmethod), 93

delete_image() (stepler.cli_clients.steps.CliGlanceStepsmethod), 320

delete_image() (stepler.horizon.steps.ImagesStepsmethod), 94

delete_image_member() (stepler.cli_clients.steps.CliGlanceStepsmethod), 320

delete_images() (stepler.horizon.steps.ImagesStepsmethod), 94

delete_instance() (stepler.horizon.steps.InstancesStepsmethod), 96

delete_instances() (stepler.horizon.steps.InstancesStepsmethod), 96

delete_ironic_chassis() (stepler.baremetal.steps.IronicChassisStepsmethod), 53

delete_ironic_nodes() (stepler.baremetal.steps.IronicNodeStepsmethod), 50

delete_keypair() (stepler.horizon.steps.KeypairsStepsmethod), 96

delete_keypairs() (stepler.horizon.steps.KeypairsStepsmethod), 96

delete_keypairs() (stepler.nova.steps.KeypairStepsmethod), 260

delete_metadata() (stepler.horizon.steps.ImagesStepsmethod), 94

delete_namespace() (stepler.horizon.steps.NamespacesStepsmethod), 97

delete_network() (stepler.horizon.steps.NetworksSteps

method), 97delete_networks() (stepler.horizon.steps.NetworksSteps

method), 97delete_object() (stepler.object_storage.steps.ContainerCephSteps

method), 313delete_object() (stepler.object_storage.steps.ContainerSwiftSteps

method), 311delete_ports() (stepler.baremetal.steps.IronicPortSteps

method), 52delete_project() (stepler.horizon.steps.ProjectsSteps

method), 98delete_project() (stepler.keystone.steps.ProjectSteps

method), 140delete_qos_spec() (stepler.horizon.steps.VolumeTypesSteps

method), 100delete_role() (stepler.keystone.steps.RoleSteps method),

141delete_router() (stepler.horizon.steps.RoutersSteps

method), 98delete_rule_from_group()

(stepler.neutron.steps.NeutronSecurityGroupRuleStepsmethod), 171

delete_security_group() (stepler.horizon.steps.SecurityGroupsStepsmethod), 98

delete_servers() (stepler.nova.steps.ServerSteps method),271

delete_service() (stepler.keystone.steps.ServiceStepsmethod), 146

delete_snapshot() (stepler.horizon.steps.VolumesStepsmethod), 102

delete_snapshots() (stepler.cinder.steps.SnapshotStepsmethod), 29

delete_snapshots() (stepler.horizon.steps.VolumesStepsmethod), 102

delete_stack() (stepler.cli_clients.steps.CliHeatStepsmethod), 323

delete_stack() (stepler.cli_clients.steps.CliOpenstackStepsmethod), 326

delete_stack() (stepler.horizon.steps.StacksStepsmethod), 99

delete_stacks() (stepler.horizon.steps.StacksStepsmethod), 99

delete_user() (stepler.horizon.steps.UsersSteps method),100

delete_user() (stepler.keystone.steps.UserSteps method),143

delete_users() (stepler.horizon.steps.UsersSteps method),100

delete_volume() (stepler.horizon.steps.VolumesStepsmethod), 102

delete_volume_transfer()(stepler.cinder.steps.VolumeTransferStepsmethod), 31

delete_volume_type() (stepler.cinder.steps.VolumeTypeSteps

374 Index

Page 379: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

method), 26delete_volume_type() (stepler.horizon.steps.VolumeTypesSteps

method), 100delete_volume_types() (stepler.horizon.steps.VolumeTypesSteps

method), 100delete_volumes() (stepler.cinder.steps.VolumeSteps

method), 23delete_volumes() (stepler.horizon.steps.VolumesSteps

method), 102detach_fixed_ip() (stepler.nova.steps.ServerSteps

method), 271detach_floating_ip() (stepler.neutron.steps.FloatingIPSteps

method), 170detach_floating_ip() (stepler.nova.steps.ServerSteps

method), 271detach_instance() (stepler.horizon.steps.VolumesSteps

method), 102detach_volume_from_server() (in module

stepler.nova.conftest), 243detach_volume_from_server()

(stepler.nova.steps.NovaVolumeSteps method),262

domain() (in module stepler.keystone.conftest), 133domain_steps() (in module stepler.keystone.conftest), 133DomainSteps (class in stepler.keystone.steps), 137download_ec2() (stepler.horizon.steps.ApiAccessSteps

method), 91download_image() (stepler.cli_clients.steps.CliGlanceSteps

method), 321download_rc_v2() (stepler.horizon.steps.ApiAccessSteps

method), 91download_rc_v2_via_menu()

(stepler.horizon.steps.ApiAccessStepsmethod), 91

download_rc_v3() (stepler.horizon.steps.ApiAccessStepsmethod), 91

download_rc_v3_via_menu()(stepler.horizon.steps.ApiAccessStepsmethod), 91

dump() (in module stepler.third_party.chunk_serializer),347

Eec2_credentials() (in module stepler.keystone.conftest),

134ec2_steps() (in module stepler.keystone.conftest), 134Ec2Steps (class in stepler.keystone.steps), 137edit_volume() (stepler.horizon.steps.VolumesSteps

method), 102empty_heat_template_path() (in module

stepler.cli_clients.conftest), 315empty_stack() (in module stepler.heat.conftest), 71enable_multi_locations() (in module

stepler.glance.conftest), 63

evacuate_servers() (stepler.nova.steps.ServerStepsmethod), 271

execute() (stepler.third_party.ssh.SshClient method), 353execute_async() (stepler.third_party.ssh.SshClient

method), 353execute_command() (stepler.cli_clients.steps.CliSwiftSteps

method), 330execute_commands() (stepler.nova.steps.ServerSteps

method), 271ExpectationError, 358extend_volume() (stepler.horizon.steps.VolumesSteps

method), 102

Ffilter_icmp() (in module stepler.third_party.tcpdump),

355filter_instances() (stepler.horizon.steps.InstancesSteps

method), 96filter_projects() (stepler.horizon.steps.ProjectsSteps

method), 98filter_users() (stepler.horizon.steps.UsersSteps method),

100filter_vxlan() (in module stepler.third_party.tcpdump),

355FixedIDPinger (class in stepler.third_party.ping), 350flavor() (in module stepler.nova.conftest), 244flavor_steps() (in module stepler.nova.conftest), 244flavors() (in module stepler.nova.conftest), 244flavors_steps_ui() (in module stepler.horizon.conftest), 84FlavorsSteps (class in stepler.horizon.steps), 92FlavorSteps (class in stepler.nova.steps), 256floating_ip() (in module stepler.horizon.conftest), 84floating_ip() (in module stepler.neutron.conftest), 153floating_ip_steps() (in module stepler.neutron.conftest),

153floating_ips_steps_ui() (in module

stepler.horizon.conftest), 84FloatingIPsSteps (class in stepler.horizon.steps), 92FloatingIPSteps (class in stepler.neutron.steps), 169FloatingIpSteps (class in stepler.nova.steps), 258

Ggenerate_file_context() (in module

stepler.third_party.utils), 356generate_files() (in module stepler.third_party.utils), 356generate_ids() (in module stepler.third_party.utils), 355generate_ips() (in module stepler.third_party.utils), 356generate_os_workload() (in module

stepler.nova.conftest), 244generate_server_cpu_workload()

(stepler.nova.steps.ServerSteps method),272

generate_server_disk_workload()(stepler.nova.steps.ServerSteps method),

Index 375

Page 380: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

272generate_server_memory_workload()

(stepler.nova.steps.ServerSteps method),272

generate_traffic() (in module stepler.nova.conftest), 244get() (stepler.neutron.steps.QuotaSteps method), 177get() (stepler.object_storage.steps.ContainerSwiftSteps

method), 311get_absolute_limits() (stepler.nova.steps.NovaLimitSteps

method), 277get_agent_steps() (in module stepler.neutron.conftest),

153get_agents() (stepler.neutron.steps.AgentSteps method),

167get_another_hypervisor()

(stepler.nova.steps.HypervisorSteps method),259

get_api_ironic_client() (in modulestepler.baremetal.conftest), 45

get_api_ironic_steps() (in modulestepler.baremetal.conftest), 45

get_attached_server_ids()(stepler.cinder.steps.VolumeSteps method),24

get_availability_zone_steps() (in modulestepler.nova.conftest), 245

get_available_fixed_ips()(stepler.neutron.steps.SubnetSteps method),181

get_backup_by_id() (stepler.cinder.steps.BackupStepsmethod), 32

get_backup_steps() (in module stepler.cinder.conftest), 17get_backups() (stepler.cinder.steps.BackupSteps

method), 32get_backups_quota() (stepler.cinder.steps.CinderQuotaSteps

method), 27get_block_device_by_mount()

(stepler.nova.steps.ServerSteps method),272

get_cinder_client() (in module stepler.cinder.conftest), 17get_cinder_quota_steps() (in module

stepler.cinder.conftest), 17get_container() (stepler.horizon.steps.ContainersSteps

method), 92get_container_info() (stepler.horizon.steps.ContainersSteps

method), 92get_current_project() (in module

stepler.keystone.conftest), 134get_current_project() (stepler.keystone.steps.ProjectSteps

method), 140get_current_settings() (stepler.horizon.steps.SettingsSteps

method), 98get_defaults() (stepler.horizon.steps.DefaultsSteps

method), 92

get_dhcp_agents_for_net()(stepler.neutron.steps.AgentSteps method),167

get_dhcp_agents_not_hosting_net()(stepler.neutron.steps.AgentSteps method),167

get_domain() (stepler.keystone.steps.DomainStepsmethod), 137

get_domains() (stepler.keystone.steps.DomainStepsmethod), 137

get_events_list() (stepler.heat.steps.StackSteps method),74

get_file_path() (in module stepler.third_party.utils), 357get_fixed_ip() (stepler.nova.steps.ServerSteps method),

272get_flavor() (stepler.nova.steps.FlavorSteps method), 257get_flavors() (stepler.nova.steps.FlavorSteps method),

257get_floating_ip() (stepler.nova.steps.ServerSteps

method), 273get_floating_ip_steps() (in module

stepler.neutron.conftest), 153get_folder() (stepler.horizon.steps.ContainersSteps

method), 92get_glance_client() (in module stepler.glance.conftest),

63get_glance_steps() (in module stepler.glance.conftest), 63get_group() (stepler.keystone.steps.GroupSteps method),

139get_groups() (stepler.keystone.steps.GroupSteps

method), 139get_host() (stepler.nova.steps.HostSteps method), 258get_hosts() (stepler.nova.steps.HostSteps method), 259get_hypervisor_capacity()

(stepler.nova.steps.HypervisorSteps method),259

get_hypervisors() (stepler.nova.steps.HypervisorStepsmethod), 260

get_image() (stepler.glance.steps.GlanceStepsV2method), 67

get_images() (stepler.glance.steps.GlanceStepsV2method), 67

get_ips() (stepler.nova.steps.ServerSteps method), 273get_ironic_chassis() (stepler.baremetal.steps.IronicChassisSteps

method), 53get_ironic_chassis_steps() (in module

stepler.baremetal.conftest), 45get_ironic_client() (in module stepler.baremetal.conftest),

45get_ironic_node() (stepler.baremetal.steps.IronicNodeSteps

method), 50get_ironic_node_steps() (in module

stepler.baremetal.conftest), 45get_ironic_nodes() (stepler.baremetal.steps.IronicNodeSteps

376 Index

Page 381: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

method), 50get_ironic_port_steps() (in module

stepler.baremetal.conftest), 45get_item_id() (in module

stepler.third_party.idempotent_id), 349get_keypair_steps() (in module stepler.nova.conftest),

245get_keypairs() (stepler.nova.steps.KeypairSteps method),

261get_keystone_client() (in module

stepler.keystone.conftest), 134get_l3_agents_for_router()

(stepler.neutron.steps.AgentSteps method),168

get_last_ping_reply_ts() (in modulestepler.third_party.tcpdump), 355

get_metadata() (stepler.horizon.steps.FlavorsStepsmethod), 92

get_metadata() (stepler.horizon.steps.ImagesStepsmethod), 94

get_metadata() (stepler.nova.steps.FlavorSteps method),258

get_network() (stepler.neutron.steps.NetworkStepsmethod), 173

get_network_by_name() (stepler.neutron.steps.NetworkStepsmethod), 174

get_network_id_by_mac()(stepler.neutron.steps.NetworkSteps method),174

get_network_steps() (in module stepler.neutron.conftest),153

get_networks() (stepler.neutron.steps.NetworkStepsmethod), 174

get_networks_for_dhcp_agent()(stepler.neutron.steps.NetworkSteps method),174

get_neutron_client() (in module stepler.neutron.conftest),153

get_neutron_quota_steps() (in modulestepler.neutron.conftest), 153

get_neutron_security_group_rule_steps() (in modulestepler.neutron.conftest), 154

get_neutron_security_group_steps() (in modulestepler.neutron.conftest), 154

get_node_by_instance_uuid()(stepler.baremetal.steps.IronicNodeStepsmethod), 50

get_nova_client() (in module stepler.nova.conftest), 245get_nova_floating_ip_steps() (in module

stepler.nova.conftest), 245get_object() (stepler.object_storage.steps.ContainerCephSteps

method), 313get_object() (stepler.object_storage.steps.ContainerSwiftSteps

method), 311

get_output() (stepler.heat.steps.StackSteps method), 74get_port() (stepler.neutron.steps.PortSteps method), 176get_ports() (stepler.baremetal.steps.IronicPortSteps

method), 52get_ports() (stepler.neutron.steps.PortSteps method), 176get_project_steps() (in module stepler.keystone.conftest),

134get_projects() (stepler.keystone.steps.ProjectSteps

method), 140get_public_network() (stepler.neutron.steps.NetworkSteps

method), 174get_rabbitmq_cluster_data() (in module

stepler.nova.conftest), 245get_resource() (stepler.heat.steps.ResourceSteps method),

76get_resource_type_template()

(stepler.cli_clients.steps.CliHeatSteps method),323

get_resource_type_template()(stepler.cli_clients.steps.CliOpenstackStepsmethod), 326

get_resource_types() (stepler.heat.steps.ResourceTypeStepsmethod), 76

get_resources() (stepler.heat.steps.ResourceStepsmethod), 76

get_role() (stepler.keystone.steps.RoleSteps method), 141get_role_steps() (in module stepler.keystone.conftest),

134get_router() (stepler.neutron.steps.RouterSteps method),

179get_router_steps() (in module stepler.neutron.conftest),

154get_routers() (stepler.neutron.steps.RouterSteps method),

180get_rules() (stepler.neutron.steps.NeutronSecurityGroupRuleSteps

method), 171get_security_group_steps() (in module

stepler.nova.conftest), 245get_security_groups() (stepler.neutron.steps.NeutronSecurityGroupSteps

method), 172get_server_credentials() (stepler.nova.steps.ServerSteps

method), 273get_server_ssh() (stepler.nova.steps.ServerSteps method),

273get_server_steps() (in module stepler.nova.conftest), 245get_servers() (stepler.nova.steps.ServerSteps method),

273get_service() (stepler.keystone.steps.ServiceSteps

method), 146get_service_steps() (in module stepler.keystone.conftest),

134get_services() (stepler.keystone.steps.ServiceSteps

method), 147get_services() (stepler.nova.steps.NovaServiceSteps

Index 377

Page 382: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

method), 276get_size() (in module stepler.third_party.utils), 357get_snapshot_by_id() (stepler.cinder.steps.SnapshotSteps

method), 29get_snapshot_steps() (in module stepler.cinder.conftest),

17get_snapshots() (stepler.cinder.steps.SnapshotSteps

method), 29get_snapshots_quota() (stepler.cinder.steps.CinderQuotaSteps

method), 27get_ssh_proxy_cmd() (in module stepler.nova.conftest),

245get_stack_event() (stepler.cli_clients.steps.CliHeatSteps

method), 323get_stack_event() (stepler.cli_clients.steps.CliOpenstackSteps

method), 327get_stack_events_list() (stepler.cli_clients.steps.CliHeatSteps

method), 323get_stack_events_list() (stepler.cli_clients.steps.CliOpenstackSteps

method), 327get_stack_output_list() (stepler.heat.steps.StackSteps

method), 74get_stack_output_show() (stepler.heat.steps.StackSteps

method), 74get_stack_template() (stepler.heat.steps.StackSteps

method), 75get_stacks() (stepler.heat.steps.StackSteps method), 75get_subnet_steps() (in module stepler.neutron.conftest),

154get_template_path() (in module stepler.heat.conftest), 71get_token_data() (stepler.keystone.steps.TokenSteps

method), 145get_token_validate() (stepler.keystone.steps.TokenSteps

method), 145get_transfer_steps() (in module stepler.cinder.conftest),

17get_transfers() (stepler.cinder.steps.VolumeTransferSteps

method), 31get_unwrapped_func() (in module

stepler.third_party.utils), 357get_usage_data() (stepler.nova.steps.HostSteps method),

259get_used_resource_overview()

(stepler.horizon.steps.OverviewSteps method),97

get_user() (stepler.keystone.steps.UserSteps method),144

get_user_by_id() (stepler.keystone.steps.UserStepsmethod), 144

get_user_steps() (in module stepler.keystone.conftest),135

get_user_token() (stepler.keystone.steps.UserStepsmethod), 144

get_users() (stepler.keystone.steps.UserSteps method),

144get_volume_by_id() (stepler.cinder.steps.VolumeSteps

method), 24get_volume_migrate_host()

(stepler.cinder.steps.VolumeSteps method),24

get_volume_size_quota()(stepler.cinder.steps.CinderQuotaStepsmethod), 27

get_volume_steps() (in module stepler.cinder.conftest),17

get_volume_types() (stepler.cinder.steps.VolumeTypeStepsmethod), 27

get_volumes() (stepler.cinder.steps.VolumeStepsmethod), 24

get_volumes_quota() (stepler.cinder.steps.CinderQuotaStepsmethod), 27

get_zone() (stepler.nova.steps.AvailabilityZoneStepsmethod), 255

get_zones() (stepler.nova.steps.AvailabilityZoneStepsmethod), 256

glance_client_v1() (in module stepler.glance.conftest), 63glance_client_v2() (in module stepler.glance.conftest), 63glance_steps() (in module stepler.glance.conftest), 63glance_steps_v1() (in module stepler.glance.conftest), 63glance_steps_v2() (in module stepler.glance.conftest), 64GlanceStepsV1 (class in stepler.glance.steps), 64GlanceStepsV2 (class in stepler.glance.steps), 65grant_role() (stepler.keystone.steps.RoleSteps method),

142group() (in module stepler.keystone.conftest), 135group_steps() (in module stepler.keystone.conftest), 135GroupSteps (class in stepler.keystone.steps), 138

Hheat_client() (in module stepler.heat.conftest), 71heat_resource_steps() (in module stepler.heat.conftest),

71heat_resource_type_steps() (in module

stepler.heat.conftest), 72horizon() (in module stepler.horizon.conftest), 84horizon_autouse() (in module stepler.horizon.conftest),

84horizon_create_security_group() (in module

stepler.horizon.conftest), 84horizon_image() (in module stepler.horizon.conftest), 84horizon_images() (in module stepler.horizon.conftest), 85horizon_security_group() (in module

stepler.horizon.conftest), 85horizon_server() (in module stepler.horizon.conftest), 85horizon_server_with_private_image() (in module

stepler.horizon.conftest), 85horizon_servers() (in module stepler.horizon.conftest), 85

378 Index

Page 383: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

horizon_servers_with_private_image() (in modulestepler.horizon.conftest), 86

host_aggregates_steps_ui() (in modulestepler.horizon.conftest), 86

host_steps() (in module stepler.nova.conftest), 246HostAggregatesSteps (class in stepler.horizon.steps), 92HostSteps (class in stepler.nova.steps), 258hypervisor_steps() (in module stepler.nova.conftest), 246HypervisorSteps (class in stepler.nova.steps), 259

Iimage_create() (stepler.cli_clients.steps.CliGlanceSteps

method), 321images_cleanup() (in module stepler.glance.conftest), 64images_steps_ui() (in module stepler.horizon.conftest),

86ImagesSteps (class in stepler.horizon.steps), 93import_keypair() (stepler.horizon.steps.KeypairsSteps

method), 96instances_steps_ui() (in module stepler.horizon.conftest),

86InstancesSteps (class in stepler.horizon.steps), 95ironic_chassis_list() (stepler.cli_clients.steps.CliIronicSteps

method), 325ironic_chassis_steps() (in module

stepler.baremetal.conftest), 45ironic_client() (in module stepler.baremetal.conftest), 46ironic_client_v1() (in module stepler.baremetal.conftest),

46ironic_driver_list() (stepler.cli_clients.steps.CliIronicSteps

method), 325ironic_node() (in module stepler.baremetal.conftest), 46ironic_node_list() (stepler.cli_clients.steps.CliIronicSteps

method), 325ironic_node_steps() (in module

stepler.baremetal.conftest), 46ironic_port() (in module stepler.baremetal.conftest), 46ironic_port_list() (stepler.cli_clients.steps.CliIronicSteps

method), 325ironic_port_steps() (in module

stepler.baremetal.conftest), 46ironic_steps_v1() (in module stepler.baremetal.conftest),

46IronicChassisSteps (class in stepler.baremetal.steps), 52IronicNodeSteps (class in stepler.baremetal.steps), 49IronicPortSteps (class in stepler.baremetal.steps), 51

Jjoin_process() (in module stepler.third_party.utils), 357

Kkeypair() (in module stepler.nova.conftest), 246keypair_steps() (in module stepler.nova.conftest), 246keypairs_cleanup() (in module stepler.nova.conftest), 246

keypairs_steps_ui() (in module stepler.horizon.conftest),87

KeypairsSteps (class in stepler.horizon.steps), 96KeypairSteps (class in stepler.nova.steps), 260keystone_client() (in module stepler.keystone.conftest),

135kill_process() (stepler.third_party.ssh.SshClient method),

353

Llaunch_instance() (stepler.horizon.steps.ImagesSteps

method), 94launch_volume_as_instance()

(stepler.horizon.steps.VolumesSteps method),102

list() (stepler.cli_clients.steps.CliSwiftSteps method), 330list() (stepler.keystone.steps.Ec2Steps method), 138list() (stepler.object_storage.steps.ContainerCephSteps

method), 313list_images() (stepler.cli_clients.steps.CliGlanceSteps

method), 321listing() (in module stepler.third_party.output_parser),

350live_evacuate() (stepler.cli_clients.steps.CliNovaSteps

method), 325live_migrate() (stepler.nova.steps.ServerSteps method),

274live_migration_server() (in module stepler.nova.conftest),

246live_migration_servers() (in module

stepler.nova.conftest), 247live_migration_servers_with_volumes() (in module

stepler.nova.conftest), 248load() (in module stepler.third_party.chunk_serializer),

348Lock (class in stepler.third_party.process_mutex), 351lock_instance() (stepler.horizon.steps.InstancesSteps

method), 96lock_server() (stepler.nova.steps.ServerSteps method),

274log() (in module stepler.third_party.logger), 349logger() (in module stepler.horizon.conftest), 87login() (in module stepler.horizon.conftest), 87login() (stepler.horizon.steps.AuthSteps method), 91logout() (stepler.horizon.steps.AuthSteps method), 91

Mmanage_project_members()

(stepler.horizon.steps.ProjectsSteps method),98

migrate_servers() (stepler.nova.steps.ServerStepsmethod), 274

migrate_volume() (stepler.cinder.steps.VolumeStepsmethod), 25

Index 379

Page 384: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

migrate_volume() (stepler.horizon.steps.VolumesStepsmethod), 102

modify_access() (stepler.horizon.steps.FlavorsStepsmethod), 92

multitenancy_networks() (in modulestepler.baremetal.conftest), 47

multitenancy_resources() (in modulestepler.baremetal.conftest), 47

Nnamespaces_steps_ui() (in module

stepler.horizon.conftest), 87NamespacesSteps (class in stepler.horizon.steps), 96net_subnet_router() (in module stepler.neutron.conftest),

154network() (in module stepler.neutron.conftest), 154network_setup() (in module stepler.horizon.conftest), 87network_steps() (in module stepler.neutron.conftest), 155network_topology_page_availability()

(stepler.horizon.steps.NetworksSteps method),97

networks_steps_ui() (in module stepler.horizon.conftest),88

NetworksSteps (class in stepler.horizon.steps), 97NetworkSteps (class in stepler.neutron.steps), 172neutron_2_networks() (in module

stepler.neutron.conftest), 155neutron_2_servers_2_nets_diff_projects() (in module

stepler.neutron.conftest), 155neutron_2_servers_2_projects_with_shared_net() (in

module stepler.neutron.conftest), 156neutron_2_servers_diff_nets_with_floating() (in module

stepler.neutron.conftest), 158neutron_2_servers_different_networks() (in module

stepler.neutron.conftest), 158neutron_2_servers_different_subnets() (in module

stepler.neutron.conftest), 159neutron_2_servers_iperf_different_networks() (in mod-

ule stepler.neutron.conftest), 159neutron_2_servers_same_network() (in module

stepler.neutron.conftest), 160neutron_client() (in module stepler.neutron.conftest), 161neutron_conntrack_2_projects_resources() (in module

stepler.neutron.conftest), 161neutron_create_security_group() (in module

stepler.neutron.conftest), 162neutron_nets_for_projects() (in module

stepler.neutron.conftest), 162neutron_quota_steps() (in module

stepler.neutron.conftest), 163neutron_security_group() (in module

stepler.neutron.conftest), 163neutron_security_group_rule_steps() (in module

stepler.neutron.conftest), 163

neutron_security_group_steps() (in modulestepler.neutron.conftest), 163

neutron_security_groups_cleanup() (in modulestepler.neutron.conftest), 163

NeutronSecurityGroupRuleSteps (class instepler.neutron.steps), 170

NeutronSecurityGroupSteps (class instepler.neutron.steps), 171

new_user_login() (in module stepler.horizon.conftest), 88new_user_with_project() (in module

stepler.keystone.conftest), 135nova_absolute_limits() (in module stepler.nova.conftest),

248nova_associate_floating_ip()

(stepler.horizon.steps.InstancesSteps method),96

nova_availability_zone() (in modulestepler.nova.conftest), 249

nova_availability_zone_hosts() (in modulestepler.nova.conftest), 249

nova_ceph_enabled() (in module stepler.nova.conftest),249

nova_client() (in module stepler.nova.conftest), 249nova_disassociate_floating_ip()

(stepler.horizon.steps.InstancesSteps method),96

nova_floating_ip() (in module stepler.nova.conftest), 249nova_floating_ip_steps() (in module

stepler.nova.conftest), 249nova_limit_steps() (in module stepler.nova.conftest), 249nova_list() (stepler.cli_clients.steps.CliNovaSteps

method), 326nova_service_steps() (in module stepler.nova.conftest),

249nova_volume_steps() (in module stepler.nova.conftest),

249NovaLimitSteps (class in stepler.nova.steps), 277NovaServiceSteps (class in stepler.nova.steps), 276NovaVolumeSteps (class in stepler.nova.steps), 261

Oopen() (stepler.third_party.ssh.SshClient method), 353open_link_in_new_tab() (stepler.horizon.steps.ImagesSteps

method), 94overview_steps_ui() (in module stepler.horizon.conftest),

88OverviewSteps (class in stepler.horizon.steps), 97

Ppause_server() (stepler.nova.steps.ServerSteps method),

274ping() (stepler.third_party.ping.Pinger method), 351Pinger (class in stepler.third_party.ping), 350PingResult (class in stepler.third_party.ping), 350

380 Index

Page 385: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

pinned_aggregate() (in module stepler.nova.conftest), 250port() (in module stepler.neutron.conftest), 163port_steps() (in module stepler.neutron.conftest), 164PortSteps (class in stepler.neutron.steps), 175PredicateTimeout, 358preview_stack() (stepler.cli_clients.steps.CliHeatSteps

method), 323preview_stack() (stepler.horizon.steps.StacksSteps

method), 99primary_chassis() (in module stepler.baremetal.conftest),

48primary_nodes() (in module stepler.baremetal.conftest),

48primary_volumes() (in module stepler.cinder.conftest), 17project() (in module stepler.keystone.conftest), 135project_name_non_ascii() (in module

stepler.horizon.conftest), 88project_steps() (in module stepler.keystone.conftest), 135projects() (in module stepler.keystone.conftest), 135projects_steps_ui() (in module stepler.horizon.conftest),

88ProjectsSteps (class in stepler.horizon.steps), 97ProjectSteps (class in stepler.keystone.steps), 139public_flavor() (in module stepler.nova.conftest), 250public_network() (in module stepler.neutron.conftest),

164put() (stepler.third_party.utils.AttrDict method), 355put_object() (stepler.object_storage.steps.ContainerCephSteps

method), 313put_object() (stepler.object_storage.steps.ContainerSwiftSteps

method), 311pytest_addoption() (in module

stepler.third_party.idempotent_id), 349pytest_addoption() (in module

stepler.third_party.steps_checker), 354pytest_addoption() (in module

stepler.third_party.supported_platforms),351

pytest_collection_modifyitems() (in modulestepler.third_party.idempotent_id), 349

pytest_collection_modifyitems() (in modulestepler.third_party.no_tests_found), 350

pytest_collection_modifyitems() (in modulestepler.third_party.steps_checker), 354

pytest_collection_modifyitems() (in modulestepler.third_party.supported_platforms),351

pytest_configure() (in modulestepler.third_party.reports_cleaner), 352

pytest_configure() (in modulestepler.third_party.steps_checker), 354

pytest_runtest_makereport() (in modulestepler.third_party.reports_cleaner), 352

pytest_runtestloop() (in module

stepler.third_party.idempotent_id), 349

QQuotaSteps (class in stepler.neutron.steps), 177

Rrabbitmq_steps() (in module stepler.nova.conftest), 250read_heat_template() (in module stepler.heat.conftest), 72read_pcap() (in module stepler.third_party.tcpdump), 355reboot_server() (stepler.nova.steps.ServerSteps method),

274rebuild_server() (stepler.nova.steps.ServerSteps method),

275release() (stepler.third_party.process_mutex.Lock

method), 351release_floating_ip() (stepler.horizon.steps.FloatingIPsSteps

method), 92remote_executor() (in module

stepler.cli_clients.conftest), 314remove_group_rules() (stepler.nova.steps.SecurityGroupSteps

method), 261remove_host() (stepler.nova.steps.AggregateSteps

method), 255remove_image_location()

(stepler.cli_clients.steps.CliGlanceStepsmethod), 322

remove_network_from_dhcp_agent()(stepler.neutron.steps.AgentSteps method),168

remove_port_interface() (stepler.neutron.steps.RouterStepsmethod), 180

remove_router_from_l3_agent()(stepler.neutron.steps.AgentSteps method),168

remove_subnet_interface()(stepler.neutron.steps.RouterSteps method),180

rename_instance() (stepler.horizon.steps.InstancesStepsmethod), 96

rename_volume() (stepler.cli_clients.steps.CliCinderStepsmethod), 317

report_dir() (in module stepler.horizon.conftest), 89reschedule_network_to_dhcp_agent()

(stepler.neutron.steps.AgentSteps method),168

reschedule_router_active_l3_agent() (in modulestepler.neutron.conftest), 164

reschedule_router_to_l3_agent()(stepler.neutron.steps.AgentSteps method),169

rescue_server() (stepler.nova.steps.ServerSteps method),275

reset_instances_filter() (stepler.horizon.steps.InstancesStepsmethod), 96

Index 381

Page 386: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

resize() (stepler.nova.steps.ServerSteps method), 275resize_instance() (stepler.horizon.steps.InstancesSteps

method), 96ResourceSteps (class in stepler.heat.steps), 75ResourceTypeSteps (class in stepler.heat.steps), 76restore_server() (stepler.nova.steps.ServerSteps method),

275resume_stack() (stepler.cli_clients.steps.CliHeatSteps

method), 324resume_stack() (stepler.cli_clients.steps.CliOpenstackSteps

method), 327resume_stack() (stepler.horizon.steps.StacksSteps

method), 99revoke_role() (stepler.keystone.steps.RoleSteps method),

142revoke_token() (stepler.keystone.steps.TokenSteps

method), 146role() (in module stepler.keystone.conftest), 136role_steps() (in module stepler.keystone.conftest), 136RoleSteps (class in stepler.keystone.steps), 140router() (in module stepler.neutron.conftest), 164router_steps() (in module stepler.neutron.conftest), 164routers_cleanup() (in module stepler.neutron.conftest),

164routers_steps_ui() (in module stepler.horizon.conftest),

89RoutersSteps (class in stepler.horizon.steps), 98RouterSteps (class in stepler.neutron.steps), 177

Ss3_client() (in module stepler.object_storage.conftest),

310security_group() (in module stepler.nova.conftest), 250security_group_steps() (in module stepler.nova.conftest),

251security_groups_steps_ui() (in module

stepler.horizon.conftest), 89SecurityGroupsSteps (class in stepler.horizon.steps), 98SecurityGroupSteps (class in stepler.nova.steps), 261server() (in module stepler.nova.conftest), 251server_list() (stepler.cli_clients.steps.CliOpenstackSteps

method), 327server_network_listen() (stepler.nova.steps.ServerSteps

method), 275server_steps() (in module stepler.nova.conftest), 251servers_cleanup() (in module stepler.nova.conftest), 251servers_to_evacuate() (in module stepler.nova.conftest),

251servers_with_volumes_to_evacuate() (in module

stepler.nova.conftest), 252ServerSteps (class in stepler.nova.steps), 262service_steps() (in module stepler.keystone.conftest), 136ServiceSteps (class in stepler.keystone.steps), 146

set_backups_quota() (stepler.cinder.steps.CinderQuotaStepsmethod), 28

set_dhcp_agents_count_for_net() (in modulestepler.neutron.conftest), 164

set_gateway() (stepler.neutron.steps.RouterStepsmethod), 180

set_glance_storage_to_file_with_quota() (in modulestepler.glance.conftest), 64

set_ironic_nodes_power_state()(stepler.baremetal.steps.IronicNodeStepsmethod), 51

set_maintenance() (stepler.baremetal.steps.IronicNodeStepsmethod), 51

set_metadata() (stepler.nova.steps.AggregateStepsmethod), 255

set_metadata() (stepler.nova.steps.FlavorSteps method),258

set_snapshots_quota() (stepler.cinder.steps.CinderQuotaStepsmethod), 28

set_volume_bootable() (stepler.cinder.steps.VolumeStepsmethod), 25

set_volume_size_quota()(stepler.cinder.steps.CinderQuotaStepsmethod), 28

set_volumes_quota() (stepler.cinder.steps.CinderQuotaStepsmethod), 28

settings_steps_ui() (in module stepler.horizon.conftest),89

SettingsSteps (class in stepler.horizon.steps), 98shelve_server() (stepler.nova.steps.ServerSteps method),

275show_image() (stepler.cli_clients.steps.CliGlanceSteps

method), 322show_stack() (stepler.cli_clients.steps.CliHeatSteps

method), 324show_stack() (stepler.cli_clients.steps.CliOpenstackSteps

method), 327show_stack_output() (stepler.cli_clients.steps.CliHeatSteps

method), 324show_stack_output() (stepler.cli_clients.steps.CliOpenstackSteps

method), 328show_volume() (stepler.cli_clients.steps.CliCinderSteps

method), 318show_volume_backup() (stepler.cli_clients.steps.CliCinderSteps

method), 318show_volume_snapshot()

(stepler.cli_clients.steps.CliCinderStepsmethod), 318

show_volume_transfer() (stepler.cli_clients.steps.CliCinderStepsmethod), 318

skip_live_migration_tests() (in modulestepler.nova.conftest), 252

slugify() (in module stepler.third_party.utils), 357small_flavor() (in module stepler.nova.conftest), 252

382 Index

Page 387: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

snapshot_steps() (in module stepler.cinder.conftest), 18SnapshotSteps (class in stepler.cinder.steps), 28sort_users() (stepler.horizon.steps.UsersSteps method),

100sorted_hypervisors() (in module stepler.nova.conftest),

252SshClient (class in stepler.third_party.ssh), 352stack_resources_check() (stepler.cli_clients.steps.CliHeatSteps

method), 324stack_resources_check() (stepler.cli_clients.steps.CliOpenstackSteps

method), 328stack_steps() (in module stepler.heat.conftest), 72stacks_cleanup() (in module stepler.heat.conftest), 72stacks_steps_ui() (in module stepler.horizon.conftest), 89StacksSteps (class in stepler.horizon.steps), 98StackSteps (class in stepler.heat.steps), 72start() (stepler.third_party.video_recorder.VideoRecorder

method), 358start_server() (stepler.nova.steps.ServerSteps method),

276step() (in module stepler.third_party.steps_checker), 354stepler.baremetal.conftest (module), 44stepler.baremetal.steps (module), 48stepler.baremetal.tests.test_baremetal_chassis (module),

59stepler.baremetal.tests.test_baremetal_node (module), 53stepler.baremetal.tests.test_boot_baremetal_server (mod-

ule), 53stepler.baremetal.tests.test_ironic_services (module), 58stepler.baremetal.tests.test_multitenancy (module), 59stepler.cinder.conftest (module), 15stepler.cinder.steps (module), 20stepler.cinder.tests.test_backups (module), 33stepler.cinder.tests.test_change_volume_type (module),

34stepler.cinder.tests.test_create_image_from_volume

(module), 34stepler.cinder.tests.test_create_volume_from_image

(module), 34stepler.cinder.tests.test_edit_volume (module), 35stepler.cinder.tests.test_extend_volume (module), 36stepler.cinder.tests.test_services (module), 37stepler.cinder.tests.test_volume_snapshots (module), 39stepler.cinder.tests.test_volume_transfer (module), 39stepler.cinder.tests.test_volumes (module), 40stepler.cli_clients.conftest (module), 314stepler.cli_clients.steps (module), 316stepler.cli_clients.tests.test_cinder (module), 331stepler.cli_clients.tests.test_glance (module), 342stepler.cli_clients.tests.test_heat (module), 338stepler.cli_clients.tests.test_neutron (module), 346stepler.cli_clients.tests.test_nova (module), 336stepler.cli_clients.tests.test_openstack (module), 337stepler.glance.conftest (module), 61

stepler.glance.steps (module), 64stepler.glance.tests.test_images (module), 68stepler.glance.tests.test_security (module), 70stepler.glance.tests.test_services (module), 69stepler.heat.conftest (module), 71stepler.heat.steps (module), 72stepler.heat.tests.test_stack (module), 76stepler.horizon.conftest (module), 82stepler.horizon.steps (module), 90stepler.horizon.tests.test_auth (module), 102stepler.horizon.tests.test_containers (module), 103stepler.horizon.tests.test_credentials (module), 104stepler.horizon.tests.test_defaults (module), 105stepler.horizon.tests.test_flavors (module), 105stepler.horizon.tests.test_floatingips (module), 106stepler.horizon.tests.test_host_aggregates (module), 106stepler.horizon.tests.test_images (module), 107stepler.horizon.tests.test_instances (module), 111stepler.horizon.tests.test_keypairs (module), 116stepler.horizon.tests.test_metadata_definitions (module),

117stepler.horizon.tests.test_networks (module), 117stepler.horizon.tests.test_projects (module), 118stepler.horizon.tests.test_router (module), 119stepler.horizon.tests.test_security_groups (module), 120stepler.horizon.tests.test_user_settings (module), 120stepler.horizon.tests.test_users (module), 121stepler.horizon.tests.test_volume_backups (module), 123stepler.horizon.tests.test_volume_snapshots (module),

125stepler.horizon.tests.test_volume_types (module), 127stepler.horizon.tests.test_volumes (module), 127stepler.keystone.conftest (module), 132stepler.keystone.steps (module), 137stepler.keystone.tests.test_keystone (module), 147stepler.neutron.conftest (module), 150stepler.neutron.steps (module), 165stepler.neutron.tests.test_basic_verification (module), 238stepler.neutron.tests.test_dhcp_agent (module), 189stepler.neutron.tests.test_dvr (module), 208stepler.neutron.tests.test_l2pop (module), 225stepler.neutron.tests.test_l3_agent (module), 181stepler.neutron.tests.test_l3_ha (module), 227stepler.neutron.tests.test_ovs_restart (module), 202stepler.neutron.tests.test_sighup (module), 224stepler.neutron.tests.test_vxlan (module), 235stepler.nova.conftest (module), 241stepler.nova.steps (module), 254stepler.nova.tests.test_basic_verification (module), 277stepler.nova.tests.test_deferred_delete (module), 285stepler.nova.tests.test_evacuate (module), 304stepler.nova.tests.test_host_actions (module), 289stepler.nova.tests.test_live_migration (module), 290

Index 383

Page 388: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.nova.tests.test_live_migration_multi_servers(module), 295

stepler.nova.tests.test_metadata (module), 298stepler.nova.tests.test_rebuild (module), 300stepler.nova.tests.test_restart_all_services (module), 303stepler.object_storage.conftest (module), 309stepler.object_storage.steps (module), 310stepler.third_party.arping (module), 347stepler.third_party.chunk_serializer (module), 347stepler.third_party.context (module), 348stepler.third_party.idempotent_id (module), 349stepler.third_party.logger (module), 349stepler.third_party.network_checks (module), 349stepler.third_party.no_tests_found (module), 350stepler.third_party.output_parser (module), 350stepler.third_party.ping (module), 350stepler.third_party.process_mutex (module), 351stepler.third_party.reports_cleaner (module), 351stepler.third_party.ssh (module), 352stepler.third_party.steps_checker (module), 354stepler.third_party.supported_platforms (module), 351stepler.third_party.tcpdump (module), 354stepler.third_party.utils (module), 355stepler.third_party.video_recorder (module), 358stepler.third_party.waiter (module), 358stop() (stepler.third_party.video_recorder.VideoRecorder

method), 358stop_server() (stepler.nova.steps.ServerSteps method),

276subnet() (in module stepler.neutron.conftest), 165subnet_steps() (in module stepler.neutron.conftest), 165SubnetSteps (class in stepler.neutron.steps), 180sudo() (stepler.third_party.ssh.SshClient method), 354suspend() (stepler.heat.steps.StackSteps method), 75suspend_stack() (stepler.cli_clients.steps.CliHeatSteps

method), 324suspend_stack() (stepler.cli_clients.steps.CliOpenstackSteps

method), 328suspend_stack() (stepler.horizon.steps.StacksSteps

method), 99swift_client() (in module stepler.object_storage.conftest),

310switch_to_new_tab() (stepler.horizon.steps.ImagesSteps

method), 94

Ttable() (in module stepler.third_party.output_parser), 350tables() (in module stepler.third_party.output_parser), 350tcpdump() (in module stepler.third_party.tcpdump), 355test_absolute_limits_list() (in module

stepler.nova.tests.test_basic_verification),277

test_accept_volume_transfer() (in modulestepler.cinder.tests.test_volume_transfer),

39test_add_delete_image_metadata()

(stepler.horizon.tests.test_images.TestAnyOnemethod), 107

test_add_delete_rule() (stepler.horizon.tests.test_security_groups.TestAnyOnemethod), 120

test_add_router_interface_with_port_id() (in modulestepler.neutron.tests.test_dvr), 208

test_admin_delete_instance()(stepler.horizon.tests.test_instances.TestAdminOnlymethod), 111

test_admin_delete_instances()(stepler.horizon.tests.test_instances.TestAdminOnlymethod), 111

test_admin_filter_instances()(stepler.horizon.tests.test_instances.TestAdminOnlymethod), 111

test_admin_instances_pagination()(stepler.horizon.tests.test_instances.TestAdminOnlymethod), 111

test_admin_instances_pagination_filter()(stepler.horizon.tests.test_instances.TestAdminOnlymethod), 112

test_agents_list() (in modulestepler.neutron.tests.test_basic_verification),238

test_associate_floating_ip_after_restart_l3_on_compute()(in module stepler.neutron.tests.test_dvr), 208

test_attach_detach_fixed_ip_to_server() (in modulestepler.nova.tests.test_basic_verification), 277

test_available_public_container_url()(stepler.horizon.tests.test_containers.TestAnyOnemethod), 103

test_ban_all_dhcp_agents_restart_first() (in modulestepler.neutron.tests.test_dhcp_agent), 189

test_ban_all_dhcp_agents_restart_one() (in modulestepler.neutron.tests.test_dhcp_agent), 190

test_ban_all_l3_agents_restart_one() (in modulestepler.neutron.tests.test_l3_agent), 182

test_ban_dhcp_agent_many_times() (in modulestepler.neutron.tests.test_dhcp_agent), 191

test_ban_l3_agent_for_many_routers() (in modulestepler.neutron.tests.test_l3_ha), 228

test_ban_l3_agent_many_times() (in modulestepler.neutron.tests.test_l3_agent), 183

test_ban_l3_agent_with_active_ha_state_for_router() (inmodule stepler.neutron.tests.test_l3_ha), 228

test_ban_l3_agent_with_ping_public_ip() (in modulestepler.neutron.tests.test_l3_ha), 229

test_ban_some_dhcp_agents() (in modulestepler.neutron.tests.test_dhcp_agent), 192

test_ban_some_l3_agents() (in modulestepler.neutron.tests.test_l3_agent), 184

test_ban_two_dhcp_and_two_l3_agents() (in module

384 Index

Page 389: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.neutron.tests.test_dhcp_agent), 193test_baremetal_node_list() (in module

stepler.cli_clients.tests.test_openstack), 337test_big_image_create_delete()

(stepler.horizon.tests.test_images.TestUserOnlymethod), 110

test_boot_instance_from_volume_bigger_than_flavor()(in module stepler.nova.tests.test_basic_verification),278

test_boot_server_simple() (in modulestepler.baremetal.tests.test_boot_baremetal_server),54

test_boot_servers_concurrently_on_ironic_node() (inmodule stepler.baremetal.tests.test_boot_baremetal_server),54

test_boot_servers_consequently_on_ironic_node() (inmodule stepler.baremetal.tests.test_boot_baremetal_server),55

test_broadcast_traffic_for_single_network() (in modulestepler.neutron.tests.test_l2pop), 226

test_broadcast_traffic_propagation_with_l2pop() (inmodule stepler.neutron.tests.test_vxlan), 236

test_cancel_stack_update() (in modulestepler.cli_clients.tests.test_heat), 338

test_change_default_dhcp_agents_count_for_net() (inmodule stepler.neutron.tests.test_dhcp_agent),194

test_change_glance_credentials() (in modulestepler.glance.tests.test_security), 70

test_change_image_status_directly() (in modulestepler.glance.tests.test_images), 68

test_change_own_password()(stepler.horizon.tests.test_user_settings.TestAdminOnlymethod), 120

test_change_own_settings()(stepler.horizon.tests.test_user_settings.TestAdminOnlymethod), 121

test_change_user_password()(stepler.horizon.tests.test_users.TestAdminOnlymethod), 121

test_change_volume_description_with_unicode() (inmodule stepler.cli_clients.tests.test_cinder),331

test_change_volume_name_with_unicode() (in modulestepler.cli_clients.tests.test_cinder), 331

test_change_volume_status()(stepler.horizon.tests.test_volumes.TestAdminOnlymethod), 128

test_change_volume_type() (in modulestepler.cinder.tests.test_change_volume_type),34

test_change_volume_type()(stepler.horizon.tests.test_volumes.TestAdminOnlymethod), 128

test_change_volume_type_from_empty() (in modulestepler.cinder.tests.test_change_volume_type),34

test_chassis_create() (in modulestepler.baremetal.tests.test_baremetal_chassis),59

test_check_ban_l3_agent_on_node_with_snat() (in mod-ule stepler.neutron.tests.test_dvr), 209

test_check_ban_l3_agents_and_clear_one() (in modulestepler.neutron.tests.test_dvr), 210

test_check_connectivity_to_north_south_routing() (inmodule stepler.neutron.tests.test_dvr), 211

test_check_dhcp_agents_for_net_after_restart() (in mod-ule stepler.neutron.tests.test_dhcp_agent), 195

test_check_east_west_connectivity_between_instances()(in module stepler.neutron.tests.test_dvr), 212

test_check_l3_agent_after_destroy_controller() (in mod-ule stepler.neutron.tests.test_l3_agent), 185

test_check_l3_agent_after_reset_primary_controller()(in module stepler.neutron.tests.test_l3_agent),186

test_check_nets_count_for_agents_nearly_equals() (inmodule stepler.neutron.tests.test_dhcp_agent),195

test_check_objects_are_revoked() (in modulestepler.keystone.tests.test_keystone), 147

test_check_output_show_during_stack_creation() (inmodule stepler.heat.tests.test_stack), 76

test_check_port_binding_after_node_restart() (in modulestepler.neutron.tests.test_dhcp_agent), 196

test_check_router_namespace_on_compute_node() (inmodule stepler.neutron.tests.test_dvr), 212

test_check_router_update_notification_for_l3_agents()(in module stepler.neutron.tests.test_dvr), 213

test_check_tap_interfaces_for_net_after_restart() (inmodule stepler.neutron.tests.test_dhcp_agent),197

test_connectivity_after_ban_l3_agent_many_times() (inmodule stepler.neutron.tests.test_dvr), 214

test_container_name_volume_backup()(stepler.horizon.tests.test_volumes.TestAdminOnlymethod), 128

test_create_backup_with_unicode_container() (in modulestepler.cli_clients.tests.test_cinder), 331

test_create_backup_with_unicode_description() (in mod-ule stepler.cli_clients.tests.test_cinder), 331

test_create_backup_with_unicode_name() (in modulestepler.cli_clients.tests.test_cinder), 332

test_create_bigger_volume_from_volume()(stepler.horizon.tests.test_volumes.TestAnyOnemethod), 130

test_create_delete_flavor() (in modulestepler.nova.tests.test_basic_verification),279

Index 385

Page 390: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

test_create_delete_flavor()(stepler.horizon.tests.test_flavors.TestAdminOnlymethod), 105

test_create_delete_host_aggregate()(stepler.horizon.tests.test_host_aggregates.TestAdminOnlymethod), 107

test_create_delete_keypair() (in modulestepler.nova.tests.test_basic_verification),279

test_create_delete_many_volumes() (in modulestepler.cinder.tests.test_volumes), 40

test_create_delete_router()(stepler.horizon.tests.test_router.TestAnyOnemethod), 119

test_create_delete_security_group()(stepler.horizon.tests.test_security_groups.TestAnyOnemethod), 120

test_create_distributed_router_with_member_user() (inmodule stepler.cli_clients.tests.test_neutron),346

test_create_image_from_volume() (in modulestepler.cinder.tests.test_create_image_from_volume),34

test_create_image_member() (in modulestepler.cli_clients.tests.test_glance), 342

test_create_instance() (stepler.horizon.tests.test_instances.TestAnyOnemethod), 113

test_create_instance_snapshot()(stepler.horizon.tests.test_instances.TestAnyOnemethod), 114

test_create_keypair() (stepler.horizon.tests.test_keypairs.TestAnyOnemethod), 117

test_create_many_servers_boot_from_cinder() (in mod-ule stepler.nova.tests.test_basic_verification),279

test_create_multiple_snapshots() (in modulestepler.cinder.tests.test_volume_snapshots),39

test_create_namespace() (stepler.horizon.tests.test_metadata_definitions.TestAdminOnlymethod), 117

test_create_project() (stepler.horizon.tests.test_projects.TestAdminOnlymethod), 118

test_create_public_container()(stepler.horizon.tests.test_containers.TestAnyOnemethod), 103

test_create_server_on_baremetal_node() (in modulestepler.baremetal.tests.test_boot_baremetal_server),56

test_create_server_on_baremetal_node_in_maintenance_state()(in module stepler.baremetal.tests.test_boot_baremetal_server),56

test_create_shared_network()(stepler.horizon.tests.test_networks.TestAdminOnlymethod), 117

test_create_snapshot_with_unicode_description() (inmodule stepler.cli_clients.tests.test_cinder),332

test_create_snapshot_with_unicode_name() (in modulestepler.cli_clients.tests.test_cinder), 332

test_create_stack_with_aws() (in modulestepler.heat.tests.test_stack), 77

test_create_stack_with_docker() (in modulestepler.heat.tests.test_stack), 77

test_create_stack_with_heat_resources() (in modulestepler.heat.tests.test_stack), 78

test_create_stack_with_neutron_resources() (in modulestepler.heat.tests.test_stack), 78

test_create_stack_with_nova_resources() (in modulestepler.heat.tests.test_stack), 79

test_create_stack_with_wait_condition() (in modulestepler.heat.tests.test_stack), 79

test_create_transfer_with_unicode_name() (in modulestepler.cli_clients.tests.test_cinder), 333

test_create_update_delete_image() (in modulestepler.glance.tests.test_images), 68

test_create_user() (stepler.horizon.tests.test_users.TestAdminOnlymethod), 122

test_create_user_and_authenticate() (in modulestepler.keystone.tests.test_keystone), 147

test_create_volume_backup()(stepler.horizon.tests.test_volume_backups.TestAnyOnemethod), 123

test_create_volume_backup_with_container() (in modulestepler.cinder.tests.test_backups), 33

test_create_volume_backup_with_description()(stepler.horizon.tests.test_volume_backups.TestAnyOnemethod), 124

test_create_volume_backup_with_max_length_description()(stepler.horizon.tests.test_volume_backups.TestAnyOnemethod), 124

test_create_volume_description() (in modulestepler.cinder.tests.test_volumes), 40

test_create_volume_description_max() (in modulestepler.cinder.tests.test_volumes), 41

test_create_volume_from_image() (in modulestepler.cinder.tests.test_create_volume_from_image),35

test_create_volume_from_image()(stepler.horizon.tests.test_images.TestAnyOnemethod), 107

test_create_volume_from_snapshot() (in modulestepler.cinder.tests.test_volumes), 41

test_create_volume_from_snapshot()(stepler.horizon.tests.test_volume_snapshots.TestAnyOnemethod), 125

test_create_volume_from_volume() (in modulestepler.cinder.tests.test_volumes), 41

test_create_volume_max_size() (in module

386 Index

Page 391: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

stepler.cinder.tests.test_volumes), 41test_create_volume_more_max_size() (in module

stepler.cinder.tests.test_volumes), 42test_create_volume_snapshot()

(stepler.horizon.tests.test_volume_snapshots.TestAnyOnemethod), 125

test_create_volume_snapshot_backup() (in modulestepler.cinder.tests.test_backups), 33

test_create_volume_snapshot_with_description()(stepler.horizon.tests.test_volume_snapshots.TestAnyOnemethod), 125

test_create_volume_snapshot_with_long_name()(stepler.horizon.tests.test_volume_snapshots.TestAnyOnemethod), 126

test_create_volume_snapshot_with_max_length_description()(stepler.horizon.tests.test_volume_snapshots.TestAnyOnemethod), 126

test_create_volume_transfer() (in modulestepler.cinder.tests.test_volume_transfer),40

test_create_volume_using_image_name() (in modulestepler.cli_clients.tests.test_cinder), 333

test_create_volume_with_description()(stepler.horizon.tests.test_volumes.TestAnyOnemethod), 130

test_create_volume_with_escaped_symbols()(stepler.horizon.tests.test_volumes.TestAnyOnemethod), 130

test_create_volume_with_unicode_description() (in mod-ule stepler.cli_clients.tests.test_cinder), 333

test_create_volume_with_unicode_name() (in modulestepler.cli_clients.tests.test_cinder), 334

test_create_volume_without_name() (in modulestepler.cinder.tests.test_volumes), 42

test_create_volume_wrong_size() (in modulestepler.cinder.tests.test_volumes), 42

test_dashboard_help_url()(stepler.horizon.tests.test_user_settings.TestAdminOnlymethod), 121

test_default_migration_policy()(stepler.horizon.tests.test_volumes.TestAnyOnemethod), 130

test_delete_flavors() (stepler.horizon.tests.test_flavors.TestAdminOnlymethod), 105

test_delete_image_member() (in modulestepler.cli_clients.tests.test_glance), 342

test_delete_images() (stepler.horizon.tests.test_images.TestAnyOnemethod), 107

test_delete_instance_during_resizing() (in modulestepler.nova.tests.test_basic_verification), 280

test_delete_instances() (stepler.horizon.tests.test_instances.TestAdminOnlymethod), 112

test_delete_instances() (stepler.horizon.tests.test_instances.TestUserOnlymethod), 115

test_delete_ns_for_router_on_node_with_active_ha_state()(in module stepler.neutron.tests.test_l3_ha),230

test_delete_server_with_precreated_port() (in modulestepler.nova.tests.test_basic_verification), 281

test_delete_users() (stepler.horizon.tests.test_users.TestAdminOnlymethod), 122

test_delete_volume_backups()(stepler.horizon.tests.test_volume_backups.TestAnyOnemethod), 124

test_delete_volume_cascade() (in modulestepler.cinder.tests.test_volumes), 42

test_delete_volume_snapshot()(stepler.horizon.tests.test_volume_snapshots.TestAnyOnemethod), 126

test_delete_volumes() (stepler.horizon.tests.test_volumes.TestAnyOnemethod), 131

test_destroy_controller_check_dhcp() (in modulestepler.neutron.tests.test_dhcp_agent), 198

test_destroy_non_primary_controller() (in modulestepler.neutron.tests.test_l3_ha), 231

test_destroy_primary_controller() (in modulestepler.neutron.tests.test_l3_ha), 232

test_dhcp_agent_after_drop_rabbit_port() (in modulestepler.neutron.tests.test_dhcp_agent), 198

test_dhcp_alive_after_primary_controller_reset() (inmodule stepler.neutron.tests.test_dhcp_agent),199

test_disable_all_l3_agents_and_enable_them() (in mod-ule stepler.neutron.tests.test_l3_ha), 232

test_disable_enable_project()(stepler.horizon.tests.test_projects.TestAdminOnlymethod), 118

test_disable_enable_user()(stepler.horizon.tests.test_users.TestAdminOnlymethod), 122

test_disk_io_qos_settings_for_rbd_backend() (in modulestepler.nova.tests.test_basic_verification), 281

test_download_ec2() (stepler.horizon.tests.test_credentials.TestAnyOnemethod), 104

test_download_glance_image() (in modulestepler.cli_clients.tests.test_glance), 343

test_download_rc_v2() (stepler.horizon.tests.test_credentials.TestAnyOnemethod), 104

test_download_rc_v2_non_ascii_project_name()(stepler.horizon.tests.test_credentials.TestAdminOnlymethod), 104

test_download_rc_v2_via_menu()(stepler.horizon.tests.test_credentials.TestAnyOnemethod), 104

test_download_rc_v3() (stepler.horizon.tests.test_credentials.TestAnyOnemethod), 104

test_download_rc_v3_via_menu()(stepler.horizon.tests.test_credentials.TestAnyOne

Index 387

Page 392: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

method), 104test_download_zero_size_image() (in module

stepler.cli_clients.tests.test_glance), 343test_east_west_connectivity_after_ban_clear_l3_on_compute()

(in module stepler.neutron.tests.test_dvr), 215test_east_west_connectivity_after_destroy_controller()

(in module stepler.neutron.tests.test_dvr), 215test_east_west_connectivity_after_reset_computes() (in

module stepler.neutron.tests.test_dvr), 216test_edit_image() (stepler.horizon.tests.test_images.TestAnyOne

method), 108test_edit_image_description()

(stepler.horizon.tests.test_images.TestAnyOnemethod), 108

test_edit_image_disk_and_ram()(stepler.horizon.tests.test_images.TestAnyOnemethod), 108

test_edit_instance_name()(stepler.horizon.tests.test_instances.TestAdminOnlymethod), 112

test_edit_instance_name()(stepler.horizon.tests.test_instances.TestUserOnlymethod), 115

test_edit_instance_security_group()(stepler.horizon.tests.test_instances.TestAdminOnlymethod), 112

test_edit_instance_security_group()(stepler.horizon.tests.test_instances.TestUserOnlymethod), 116

test_edit_volume() (stepler.horizon.tests.test_volumes.TestAnyOnemethod), 131

test_edit_volume_description() (in modulestepler.cinder.tests.test_edit_volume), 35

test_edit_volume_name() (in modulestepler.cinder.tests.test_edit_volume), 35

test_edit_volume_snapshot()(stepler.horizon.tests.test_volume_snapshots.TestAnyOnemethod), 126

test_evacuate_locked_servers() (in modulestepler.nova.tests.test_evacuate), 304

test_evacuate_paused_servers() (in modulestepler.nova.tests.test_evacuate), 305

test_evacuate_rescue_servers() (in modulestepler.nova.tests.test_evacuate), 305

test_evacuate_resized_servers() (in modulestepler.nova.tests.test_evacuate), 306

test_evacuate_servers() (in modulestepler.nova.tests.test_evacuate), 306

test_evacuate_servers_to_initial_compute() (in modulestepler.nova.tests.test_evacuate), 307

test_evacuate_servers_with_volumes() (in modulestepler.nova.tests.test_evacuate), 308

test_evacuate_shelved_servers() (in modulestepler.nova.tests.test_evacuate), 309

test_filter_disk_formats_in_images_list() (in modulestepler.cli_clients.tests.test_glance), 343

test_filter_instances() (stepler.horizon.tests.test_instances.TestAnyOnemethod), 114

test_filter_names_in_images_list() (in modulestepler.cli_clients.tests.test_glance), 343

test_filter_users() (stepler.horizon.tests.test_users.TestAdminOnlymethod), 122

test_flavor_update_metadata()(stepler.horizon.tests.test_flavors.TestAdminOnlymethod), 105

test_flavors_list() (in modulestepler.nova.tests.test_basic_verification),282

test_floating_ip_associate()(stepler.horizon.tests.test_floatingips.TestAnyOnemethod), 106

test_force_delete_server_before_deferred_cleanup() (inmodule stepler.nova.tests.test_deferred_delete),285

test_get_stack_template() (in modulestepler.heat.tests.test_stack), 80

test_hard_reboot_server_on_ironic_node() (in modulestepler.baremetal.tests.test_boot_baremetal_server),57

test_host_resources_info() (in modulestepler.nova.tests.test_host_actions), 289

test_image_access_host_device_when_resizing() (inmodule stepler.nova.tests.test_basic_verification),282

test_image_list_contains_created_image() (in modulestepler.cli_clients.tests.test_glance), 344

test_image_list_contains_created_qcow2_images() (inmodule stepler.cli_clients.tests.test_glance),344

test_image_list_doesnt_contain_deleted_image() (inmodule stepler.cli_clients.tests.test_glance),344

test_image_privacy() (stepler.horizon.tests.test_images.TestUserOnlymethod), 110

test_images_list() (in modulestepler.glance.tests.test_images), 68

test_images_pagination()(stepler.horizon.tests.test_images.TestAnyOnemethod), 108

test_import_key_pair_quota_exceeded()(stepler.horizon.tests.test_keypairs.TestAdminOnlymethod), 116

test_import_keypair() (stepler.horizon.tests.test_keypairs.TestAnyOnemethod), 117

test_impossible_delete_admin_via_button()(stepler.horizon.tests.test_users.TestAdminOnlymethod), 122

test_impossible_delete_admin_via_dropdown()

388 Index

Page 393: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

(stepler.horizon.tests.test_users.TestAdminOnlymethod), 122

test_impossible_disable_admin()(stepler.horizon.tests.test_users.TestAdminOnlymethod), 122

test_instance_connectivity_after_l3_agent_restart() (inmodule stepler.neutron.tests.test_dvr), 217

test_instances_list() (in modulestepler.nova.tests.test_basic_verification),284

test_instances_pagination()(stepler.horizon.tests.test_instances.TestAnyOnemethod), 114

test_instances_pagination_filter()(stepler.horizon.tests.test_instances.TestAnyOnemethod), 114

test_ironic_api_service() (in modulestepler.baremetal.tests.test_ironic_services), 58

test_keystone_permission_lose() (in modulestepler.keystone.tests.test_keystone), 148

test_kill_check_dhcp_agents() (in modulestepler.neutron.tests.test_dhcp_agent), 200

test_kill_glance_on_controller() (in modulestepler.glance.tests.test_services), 69

test_kill_l3_agent_process() (in modulestepler.neutron.tests.test_l3_agent), 187

test_l3_agent_after_drop_rabbit_port() (in modulestepler.neutron.tests.test_l3_agent), 188

test_launch_instance_from_image()(stepler.horizon.tests.test_images.TestAnyOnemethod), 109

test_launch_instances_together()(stepler.horizon.tests.test_instances.TestAdminOnlymethod), 113

test_launch_volume_as_instance()(stepler.horizon.tests.test_volumes.TestAdminOnlymethod), 128

test_launch_volume_as_instance()(stepler.horizon.tests.test_volumes.TestUserOnlymethod), 132

test_list_ec2() (in modulestepler.keystone.tests.test_keystone), 148

test_live_evacuation() (in modulestepler.cli_clients.tests.test_nova), 336

test_lock_instance() (stepler.horizon.tests.test_instances.TestAnyOnemethod), 115

test_login() (in module stepler.horizon.tests.test_auth),102

test_manage_project_members()(stepler.horizon.tests.test_projects.TestAdminOnlymethod), 118

test_manage_volume_attachments()(stepler.horizon.tests.test_volumes.TestAdminOnlymethod), 129

test_manually_rescheduling_dhcp_agent() (in modulestepler.neutron.tests.test_dhcp_agent), 201

test_metadata_reach_all_booted_vm() (in modulestepler.nova.tests.test_metadata), 299

test_migrate_servers() (in modulestepler.nova.tests.test_host_actions), 289

test_migrate_volume() (in modulestepler.cinder.tests.test_volumes), 42

test_migrate_volume() (stepler.horizon.tests.test_volumes.TestAdminOnlymethod), 129

test_migration_with_attached_volume() (in modulestepler.nova.tests.test_live_migration_multi_servers),295

test_migration_with_cpu_workload() (in modulestepler.nova.tests.test_live_migration_multi_servers),296

test_migration_with_disk_workload() (in modulestepler.nova.tests.test_live_migration_multi_servers),296

test_migration_with_ephemeral_disk() (in modulestepler.nova.tests.test_live_migration), 290

test_migration_with_large_flavors() (in modulestepler.nova.tests.test_live_migration_multi_servers),297

test_migration_with_memory_workload() (in modulestepler.nova.tests.test_live_migration_multi_servers),297

test_migration_with_network_workload() (in modulestepler.nova.tests.test_live_migration_multi_servers),298

test_modify_flavor_access()(stepler.horizon.tests.test_flavors.TestAdminOnlymethod), 105

test_modify_project_members_update_quotas() (in mod-ule stepler.keystone.tests.test_keystone), 148

test_move_router_ha_interface_to_down_state() (in mod-ule stepler.neutron.tests.test_l3_ha), 233

test_negative_create_backup_long_container_name() (inmodule stepler.cinder.tests.test_backups), 33

test_negative_create_distributed_router_with_member_user()(in module stepler.cli_clients.tests.test_neutron),346

test_negative_create_volume_name_long() (in modulestepler.cinder.tests.test_volumes), 43

test_negative_create_volume_non_exist_volume_type()(in module stepler.cinder.tests.test_volumes),43

test_negative_create_volume_transfer_long_name() (inmodule stepler.cinder.tests.test_volume_transfer),40

test_negative_create_volume_wrong_image_id() (inmodule stepler.cinder.tests.test_volumes), 43

test_negative_delete_volume_cascade() (in modulestepler.cinder.tests.test_volumes), 43

Index 389

Page 394: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

test_negative_delete_volume_wrong_id() (in modulestepler.cinder.tests.test_volumes), 44

test_negative_edit_volume_name_too_long_name() (inmodule stepler.cinder.tests.test_edit_volume),35

test_negative_extend_volume() (in modulestepler.cinder.tests.test_extend_volume),36

test_negative_extend_volume_more_than_limit() (inmodule stepler.cinder.tests.test_extend_volume),36

test_negative_remove_deleted_image() (in modulestepler.cli_clients.tests.test_glance), 344

test_network_connectivity_to_vm_after_live_migration()(in module stepler.nova.tests.test_live_migration),291

test_network_topology_page_exists()(stepler.horizon.tests.test_networks.TestAnyOnemethod), 117

test_networks_list() (in modulestepler.neutron.tests.test_basic_verification),238

test_neutron_floating_ips_quota() (in modulestepler.neutron.tests.test_basic_verification),238

test_neutron_networks_quota() (in modulestepler.neutron.tests.test_basic_verification),238

test_neutron_ports_quota() (in modulestepler.neutron.tests.test_basic_verification),239

test_neutron_routers_quota() (in modulestepler.neutron.tests.test_basic_verification),239

test_neutron_sec_group_rules_quota() (in modulestepler.neutron.tests.test_basic_verification),239

test_neutron_security_groups_quota() (in modulestepler.neutron.tests.test_basic_verification),240

test_neutron_subnets_quota() (in modulestepler.neutron.tests.test_basic_verification),240

test_no_connectivity_with_different_routers_during_restart()(in module stepler.neutron.tests.test_ovs_restart),202

test_node_create() (in modulestepler.baremetal.tests.test_baremetal_node),53

test_north_south_connectivity_after_ban_clear_l3_on_compute()(in module stepler.neutron.tests.test_dvr), 218

test_north_south_connectivity_after_primary_controller_reset()(in module stepler.neutron.tests.test_dvr), 218

test_north_south_connectivity_after_reset_compute() (in

module stepler.neutron.tests.test_dvr), 219test_north_south_connectivity_without_floating() (in

module stepler.neutron.tests.test_dvr), 220test_north_south_floating_ip_shut_down_br_ex_on_controllers()

(in module stepler.neutron.tests.test_dvr), 221test_not_create_shared_network()

(stepler.horizon.tests.test_networks.TestUserOnlymethod), 118

test_nova_associate_ip() (stepler.horizon.tests.test_instances.TestAdminOnlymethod), 113

test_nova_associate_ip() (stepler.horizon.tests.test_instances.TestUserOnlymethod), 116

test_nova_list() (in modulestepler.cli_clients.tests.test_nova), 337

test_nova_services() (in modulestepler.nova.tests.test_basic_verification),284

test_open_image_info_in_new_tab()(stepler.horizon.tests.test_images.TestAnyOnemethod), 109

test_pause_instance() (stepler.horizon.tests.test_instances.TestAdminOnlymethod), 113

test_per_project_l3_isolation() (in modulestepler.baremetal.tests.test_multitenancy),59

test_ping_routing_during_l3_agent_ban() (in modulestepler.neutron.tests.test_l3_ha), 234

test_port_tags_immutable_after_restart() (in modulestepler.neutron.tests.test_ovs_restart), 203

test_positive_extend_volume() (in modulestepler.cinder.tests.test_extend_volume),37

test_project_in_image_member_list() (in modulestepler.cli_clients.tests.test_glance), 345

test_public_image_visibility()(stepler.horizon.tests.test_images.TestAnyOnemethod), 109

test_put_metadata_on_instances_on_single_compute()(in module stepler.nova.tests.test_metadata),299

test_qos_spec_create() (stepler.horizon.tests.test_volume_types.TestAdminOnlymethod), 127

test_rebuild_in_paused_state() (in modulestepler.nova.tests.test_rebuild), 300

test_rebuild_in_rescue_state() (in modulestepler.nova.tests.test_rebuild), 301

test_rebuild_locked_server() (in modulestepler.nova.tests.test_rebuild), 301

test_rebuild_server_with_description() (in modulestepler.nova.tests.test_rebuild), 302

test_rebuild_with_user_files() (in modulestepler.nova.tests.test_rebuild), 302

test_remove_incorrect_fixed_ip_from_server() (in mod-ule stepler.nova.tests.test_basic_verification),

390 Index

Page 395: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

284test_remove_protected_image()

(stepler.horizon.tests.test_images.TestAnyOnemethod), 109

test_reschedule_router_from_snat_controller() (in mod-ule stepler.neutron.tests.test_dvr), 221

test_reset_primary_controller() (in modulestepler.neutron.tests.test_l3_ha), 235

test_resize_instance() (stepler.horizon.tests.test_instances.TestAnyOnemethod), 115

test_resource_type_template() (in modulestepler.cli_clients.tests.test_heat), 339

test_restart_adds_new_flows() (in modulestepler.neutron.tests.test_ovs_restart), 203

test_restart_agent_controller_with_sighup() (in modulestepler.neutron.tests.test_sighup), 224

test_restart_all_cinder_services() (in modulestepler.cinder.tests.test_services), 37

test_restart_all_glance_services() (in modulestepler.glance.tests.test_services), 69

test_restart_all_nova_services() (in modulestepler.nova.tests.test_restart_all_services),303

test_restart_keystone_service() (in modulestepler.keystone.tests.test_keystone), 149

test_restart_l3_agent_compute_with_sighup() (in modulestepler.neutron.tests.test_sighup), 224

test_restart_many_times() (in modulestepler.neutron.tests.test_ovs_restart), 203

test_restart_metadata_agent_compute_with_sighup() (inmodule stepler.neutron.tests.test_sighup), 225

test_restart_metadata_agent_controller_with_sighup() (inmodule stepler.neutron.tests.test_sighup), 225

test_restart_neutron_server_with_sighup() (in modulestepler.neutron.tests.test_sighup), 225

test_restart_servers_on_single_compute() (in modulestepler.neutron.tests.test_ovs_restart), 204

test_restart_with_broadcast_traffic() (in modulestepler.neutron.tests.test_ovs_restart), 205

test_restart_with_iperf_traffic() (in modulestepler.neutron.tests.test_ovs_restart), 206

test_restart_with_pcs_ban_clear() (in modulestepler.neutron.tests.test_ovs_restart), 206

test_restart_with_pcs_disable_enable() (in modulestepler.neutron.tests.test_ovs_restart), 207

test_restore_soft_deleted_server() (in modulestepler.nova.tests.test_deferred_delete), 286

test_server_basic() (in modulestepler.nova.tests.test_basic_verification),284

test_server_deleted_after_reclaim_timeout() (in modulestepler.nova.tests.test_deferred_delete), 287

test_server_list() (in modulestepler.cli_clients.tests.test_openstack), 337

test_server_migration_with_cpu_workload() (in modulestepler.nova.tests.test_live_migration), 292

test_server_migration_with_disk_workload() (in modulestepler.nova.tests.test_live_migration), 292

test_server_migration_with_memory_workload() (inmodule stepler.nova.tests.test_live_migration),293

test_server_migration_with_network_workload() (inmodule stepler.nova.tests.test_live_migration),294

test_service_list() (in modulestepler.keystone.tests.test_keystone), 150

test_set_image_disk_and_ram_size()(stepler.horizon.tests.test_images.TestAnyOnemethod), 110

test_set_node_maintenance() (in modulestepler.baremetal.tests.test_baremetal_node),53

test_share_glance_image() (in modulestepler.glance.tests.test_images), 68

test_shared_network() (in modulestepler.baremetal.tests.test_multitenancy),60

test_show_backup_with_unicode_container_name() (inmodule stepler.cli_clients.tests.test_cinder),334

test_show_backup_with_unicode_description() (in mod-ule stepler.cli_clients.tests.test_cinder), 334

test_show_backup_with_unicode_name() (in modulestepler.cli_clients.tests.test_cinder), 335

test_show_snapshot_with_unicode_description() (inmodule stepler.cli_clients.tests.test_cinder),335

test_show_snapshot_with_unicode_name() (in modulestepler.cli_clients.tests.test_cinder), 335

test_show_transfer_with_unicode_name() (in modulestepler.cli_clients.tests.test_cinder), 336

test_show_volume_with_unicode_description() (in mod-ule stepler.cli_clients.tests.test_cinder), 336

test_show_volume_with_unicode_name() (in modulestepler.cli_clients.tests.test_cinder), 336

test_shutdown_controller_with_snat() (in modulestepler.neutron.tests.test_dvr), 222

test_snapshot_list() (in modulestepler.cinder.tests.test_volume_snapshots),39

test_sort_users() (stepler.horizon.tests.test_users.TestAdminOnlymethod), 123

test_stack_check_resources() (in modulestepler.cli_clients.tests.test_heat), 339

test_stack_create_from_file() (in modulestepler.cli_clients.tests.test_heat), 339

test_stack_create_from_url() (in modulestepler.cli_clients.tests.test_heat), 339

Index 391

Page 396: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

test_stack_delete() (in modulestepler.cli_clients.tests.test_heat), 340

test_stack_output_list() (in modulestepler.heat.tests.test_stack), 80

test_stack_output_show() (in modulestepler.heat.tests.test_stack), 81

test_stack_preview() (in modulestepler.cli_clients.tests.test_heat), 340

test_stack_resume() (in modulestepler.cli_clients.tests.test_heat), 340

test_stack_show() (in modulestepler.cli_clients.tests.test_heat), 340

test_stack_show_event() (in modulestepler.cli_clients.tests.test_heat), 340

test_stack_show_events_list() (in modulestepler.cli_clients.tests.test_heat), 341

test_stack_show_particular_output() (in modulestepler.cli_clients.tests.test_heat), 341

test_stack_suspend() (in modulestepler.cli_clients.tests.test_heat), 341

test_stack_update() (in modulestepler.cli_clients.tests.test_heat), 342

test_stack_update_parameter_replace() (in modulestepler.heat.tests.test_stack), 81

test_status_manipulation_via_locations() (in modulestepler.cli_clients.tests.test_glance), 345

test_stop_nova_and_cinder_services() (in modulestepler.cinder.tests.test_services), 38

test_stop_start_server_on_baremetal_node() (in modulestepler.baremetal.tests.test_boot_baremetal_server),57

test_subnet_add() (stepler.horizon.tests.test_networks.TestAnyOnemethod), 118

test_suspend_instance() (stepler.horizon.tests.test_instances.TestAdminOnlymethod), 113

test_switch_projects() (stepler.horizon.tests.test_projects.TestAdminOnlymethod), 119

test_transfer_volume() (stepler.horizon.tests.test_volumes.TestAdminOnlymethod), 129

test_try_to_disable_current_project()(stepler.horizon.tests.test_projects.TestAdminOnlymethod), 119

test_try_to_disable_current_user()(stepler.horizon.tests.test_users.TestAdminOnlymethod), 123

test_tunnels_establishing() (in modulestepler.neutron.tests.test_l2pop), 226

test_unavailable_users_list_for_unprivileged_user()(stepler.horizon.tests.test_users.TestUserOnlymethod), 123

test_update_defaults() (stepler.horizon.tests.test_defaults.TestAdminOnlymethod), 105

test_update_flavor() (stepler.horizon.tests.test_flavors.TestAdminOnlymethod), 106

test_update_image_metadata()(stepler.horizon.tests.test_images.TestAnyOnemethod), 110

test_update_image_property() (in modulestepler.cli_clients.tests.test_glance), 345

test_update_project_name()(stepler.horizon.tests.test_projects.TestAdminOnlymethod), 119

test_update_router_from_centralized_to_distributed() (inmodule stepler.neutron.tests.test_dvr), 223

test_update_router_from_distributed_to_centralized() (inmodule stepler.neutron.tests.test_dvr), 224

test_update_user() (stepler.horizon.tests.test_users.TestAdminOnlymethod), 123

test_upload_file_to_container()(stepler.horizon.tests.test_containers.TestAnyOnemethod), 103

test_upload_file_to_folder()(stepler.horizon.tests.test_containers.TestAnyOnemethod), 103

test_upload_image_without_properties() (in modulestepler.cli_clients.tests.test_glance), 346

test_upload_volume_to_image()(stepler.horizon.tests.test_volumes.TestAnyOnemethod), 131

test_user_list() (in modulestepler.keystone.tests.test_keystone), 150

test_user_storage_quota_bypass() (in modulestepler.glance.tests.test_security), 70

test_view_credentials() (stepler.horizon.tests.test_credentials.TestAnyOnemethod), 105

test_view_image() (stepler.horizon.tests.test_images.TestAnyOnemethod), 110

test_view_instance() (stepler.horizon.tests.test_instances.TestAnyOnemethod), 115

test_view_volume() (stepler.horizon.tests.test_volumes.TestAnyOnemethod), 131

test_vni_matching_network_segmentation_id() (in mod-ule stepler.neutron.tests.test_vxlan), 236

test_vni_matching_network_segmentation_id_for_different_computes()(in module stepler.neutron.tests.test_vxlan),237

test_volume_backup_form_max_name_length()(stepler.horizon.tests.test_volume_backups.TestAnyOnemethod), 124

test_volume_backups_pagination()(stepler.horizon.tests.test_volume_backups.TestAnyOnemethod), 124

test_volume_disable_bootable() (in modulestepler.cinder.tests.test_edit_volume), 36

test_volume_enable_bootable() (in modulestepler.cinder.tests.test_edit_volume), 36

test_volume_extend() (stepler.horizon.tests.test_volumes.TestAnyOnemethod), 131

392 Index

Page 397: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

test_volume_present_in_admin_volumes()(stepler.horizon.tests.test_volumes.TestAdminOnlymethod), 129

test_volume_snapshots_pagination()(stepler.horizon.tests.test_volume_snapshots.TestAnyOnemethod), 127

test_volume_type_create()(stepler.horizon.tests.test_volume_types.TestAdminOnlymethod), 127

test_volumes_list() (in modulestepler.cinder.tests.test_volumes), 44

test_volumes_pagination()(stepler.horizon.tests.test_volumes.TestAnyOnemethod), 132

TestAdminOnly (class instepler.horizon.tests.test_credentials), 104

TestAdminOnly (class instepler.horizon.tests.test_defaults), 105

TestAdminOnly (class instepler.horizon.tests.test_flavors), 105

TestAdminOnly (class instepler.horizon.tests.test_host_aggregates),107

TestAdminOnly (class instepler.horizon.tests.test_instances), 111

TestAdminOnly (class instepler.horizon.tests.test_keypairs), 116

TestAdminOnly (class instepler.horizon.tests.test_metadata_definitions),117

TestAdminOnly (class instepler.horizon.tests.test_networks), 117

TestAdminOnly (class instepler.horizon.tests.test_projects), 118

TestAdminOnly (class instepler.horizon.tests.test_user_settings), 120

TestAdminOnly (class in stepler.horizon.tests.test_users),121

TestAdminOnly (class instepler.horizon.tests.test_volume_types),127

TestAdminOnly (class instepler.horizon.tests.test_volumes), 128

TestAnyOne (class in stepler.horizon.tests.test_containers),103

TestAnyOne (class in stepler.horizon.tests.test_credentials),104

TestAnyOne (class in stepler.horizon.tests.test_floatingips),106

TestAnyOne (class in stepler.horizon.tests.test_images),107

TestAnyOne (class in stepler.horizon.tests.test_instances),113

TestAnyOne (class in stepler.horizon.tests.test_keypairs),

117TestAnyOne (class in stepler.horizon.tests.test_networks),

117TestAnyOne (class in stepler.horizon.tests.test_router),

119TestAnyOne (class in stepler.horizon.tests.test_security_groups),

120TestAnyOne (class in stepler.horizon.tests.test_volume_backups),

123TestAnyOne (class in stepler.horizon.tests.test_volume_snapshots),

125TestAnyOne (class in stepler.horizon.tests.test_volumes),

130TestUserOnly (class in stepler.horizon.tests.test_images),

110TestUserOnly (class in

stepler.horizon.tests.test_instances), 115TestUserOnly (class in

stepler.horizon.tests.test_networks), 118TestUserOnly (class in stepler.horizon.tests.test_users),

123TestUserOnly (class in

stepler.horizon.tests.test_volumes), 132TimeoutExpired, 358tiny_flavor() (in module stepler.nova.conftest), 253toggle_project() (stepler.horizon.steps.ProjectsSteps

method), 98toggle_user() (stepler.horizon.steps.UsersSteps method),

100token_steps() (in module stepler.keystone.conftest), 136TokenSteps (class in stepler.keystone.steps), 145transfer_steps() (in module stepler.cinder.conftest), 18

Uubuntu_image() (in module stepler.glance.conftest), 64ubuntu_server() (in module stepler.nova.conftest), 253ubuntu_server_to_rebuild() (in module

stepler.nova.conftest), 253ubuntu_xenial_image() (in module

stepler.glance.conftest), 64unbind_project() (stepler.glance.steps.GlanceStepsV2

method), 67unexpected_chassis_cleanup() (in module

stepler.baremetal.conftest), 48unexpected_node_cleanup() (in module

stepler.baremetal.conftest), 48unexpected_servers_cleanup() (in module

stepler.nova.conftest), 254unexpected_volumes_cleanup() (in module

stepler.cinder.conftest), 18unlock_instance() (stepler.horizon.steps.InstancesSteps

method), 96unmount_fs_for_server() (stepler.nova.steps.ServerSteps

method), 276

Index 393

Page 398: stepler Documentation · CHAPTER 1 Annotation Stepler framework is intended to provide the community with a testing framework that is capable of perform advanced scenario and destructive

stepler Documentation, Release

update() (stepler.neutron.steps.NetworkSteps method),175

update() (stepler.neutron.steps.PortSteps method), 176update() (stepler.neutron.steps.QuotaSteps method), 177update_defaults() (in module stepler.horizon.conftest), 89update_defaults() (stepler.horizon.steps.DefaultsSteps

method), 92update_flavor() (stepler.horizon.steps.FlavorsSteps

method), 92update_image() (stepler.horizon.steps.ImagesSteps

method), 95update_metadata() (stepler.horizon.steps.FlavorsSteps

method), 92update_project_name() (stepler.horizon.steps.ProjectsSteps

method), 98update_router() (stepler.neutron.steps.RouterSteps

method), 180update_settings() (in module stepler.horizon.conftest), 89update_settings() (stepler.horizon.steps.SettingsSteps

method), 98update_snapshot() (stepler.horizon.steps.VolumesSteps

method), 102update_stack() (stepler.cli_clients.steps.CliHeatSteps

method), 324update_stack() (stepler.cli_clients.steps.CliOpenstackSteps

method), 328update_stack() (stepler.heat.steps.StackSteps method), 75update_user() (stepler.horizon.steps.UsersSteps method),

100update_user() (stepler.keystone.steps.UserSteps method),

144update_volume() (stepler.cinder.steps.VolumeSteps

method), 25upload() (stepler.cli_clients.steps.CliSwiftSteps method),

330upload_file() (stepler.horizon.steps.ContainersSteps

method), 92upload_image() (stepler.glance.steps.GlanceStepsV1

method), 65upload_image() (stepler.glance.steps.GlanceStepsV2

method), 67upload_volume_to_image() (in module

stepler.cinder.conftest), 18upload_volume_to_image()

(stepler.horizon.steps.VolumesSteps method),102

user() (in module stepler.keystone.conftest), 136user_only() (in module stepler.horizon.conftest), 90user_steps() (in module stepler.keystone.conftest), 136user_try_to_create_shared_network()

(stepler.horizon.steps.NetworksSteps method),97

users() (in module stepler.keystone.conftest), 136users_steps_ui() (in module stepler.horizon.conftest), 90

UsersSteps (class in stepler.horizon.steps), 99UserSteps (class in stepler.keystone.steps), 142

Vvideo_capture() (in module stepler.horizon.conftest), 90VideoRecorder (class in

stepler.third_party.video_recorder), 358view_credentials() (stepler.horizon.steps.ApiAccessSteps

method), 91view_image() (stepler.horizon.steps.ImagesSteps

method), 95view_instance() (stepler.horizon.steps.InstancesSteps

method), 96view_stack() (stepler.horizon.steps.StacksSteps method),

99view_volume() (stepler.horizon.steps.VolumesSteps

method), 102virtual_display() (in module stepler.horizon.conftest), 90volume() (in module stepler.cinder.conftest), 18volume_backups() (in module stepler.cinder.conftest), 18volume_extend() (stepler.cinder.steps.VolumeSteps

method), 25volume_size_quota() (in module stepler.cinder.conftest),

19volume_snapshot() (in module stepler.cinder.conftest), 19volume_snapshots() (in module stepler.cinder.conftest),

19volume_steps() (in module stepler.cinder.conftest), 19volume_type() (in module stepler.cinder.conftest), 19volume_type_steps() (in module stepler.cinder.conftest),

20volume_types_steps_ui() (in module

stepler.horizon.conftest), 90volume_upload_to_image()

(stepler.cinder.steps.VolumeSteps method),25

volumes() (in module stepler.cinder.conftest), 20volumes_steps_ui() (in module stepler.horizon.conftest),

90VolumesSteps (class in stepler.horizon.steps), 100VolumeSteps (class in stepler.cinder.steps), 20VolumeTransferSteps (class in stepler.cinder.steps), 30VolumeTypesSteps (class in stepler.horizon.steps), 100VolumeTypeSteps (class in stepler.cinder.steps), 26

Wwait() (in module stepler.third_party.waiter), 358wait_process_done() (stepler.third_party.ssh.SshClient

method), 354

394 Index