Commit Graph

214 Commits

Author SHA1 Message Date
Jonathan Rosser 05b8517bf8 Switch default external network name to 'physnet1'
Unify the default network naming with changes in the all-in-one
deployment and upstream neutron docs.

Change-Id: I3ceea9a1a5fab2f0ab91883f334fb924d89a5650
2024-02-12 13:24:24 +00:00
Zuul 56d86e29bd Merge "Adopt for usage openstack_resources role" 2024-02-03 09:30:13 +00:00
Dmitriy Rabotyagov f25f81ebd1 Adopt for usage openstack_resources role
With efforts to create a resources in same, unified way,
we convert tempest role to use openstack_resources
for creating and managing openstack resources, like projects, flavors,
networks, images, etc. This should reduce maintenance costs
in case of futher collection updates and unify approach.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/878794
Change-Id: I8d7609fac96935ed51e92ebf58515e8eb0c44d5c
2024-02-02 22:28:13 +00:00
Zuul 184595e6cc Merge "Add blazar tempest support" 2024-01-11 04:54:21 +00:00
Dmitriy Rabotyagov d5a2c6e5a4 Add blazar tempest support
Change-Id: I4666a7dfc12aed265b646ea093fe39d6cc41a77c
2024-01-05 18:08:48 +00:00
likui 843f1cabd7 Drop deprecated project
panko was deprecated.

[0] https://review.opendev.org/c/openstack/governance/+/850005

Change-Id: I3ca2a489acac075f1b3a032163a27f42279f7733
2023-10-13 14:25:11 +08:00
Jonathan Rosser 00965ed13e Allow tempest_tempest_conf_overrides to be defined in many variables
Combine all variables starting with tempest_tempest_conf_overrides
to give a complete set of configuration to tempest when multiple
different test scenarios are enabled at the same time.

Change-Id: Iba5e061d1682d16c0516249f628f948a20580df8
2023-09-29 08:59:25 +00:00
Jonathan Rosser 242203bafa Allow include/exclude lists to be defined in many variables
Previously the os_tempest role had a single variable for
defining the include and exclude lists in order to select the
tempest tests to run.

This works for simple scenarios, where a single service
is deployed and the tests for that service are enabled through
the necessary variables set in user_variables. This approach is
used in openstack-ansible CI / AIO.

More complicated scenarios such as magnum+barbican+octavia, would
create several user_variables files each with conflicting settings
for the test settings. It is possible in this scenario for there to
be no valid tempest tests to run and tempest to fail immediately.

This patch adds the possibility to have many variables defining
the include/exclude lists which have names using a common prefix.
Any variable names matching the prefix are gathered and combined
with the original role default to make extending the test lists
easy to do in an incremental/distibuted way in the ansible variables
instead of having to maintain a single point defining all necessary
tests.

Change-Id: Ie3a9a7be849171af042567ba8a152e5df5d2cb53
2023-08-17 11:20:14 +00:00
Jonathan Rosser 9ec945a0a3 Rename includelist/excludelist file path vars
These variable names collide with the best name prefix to use when
gathering many variable names into a combined include/exclude list.

Codesearch shows no use of these as overrides and the number of
cases when an override would be needed is small.

Change-Id: Ic64165e41d24ae8dc75061589de84fa57998f03d
2023-08-16 10:25:30 +01:00
Jonathan Rosser 47deba8c31 Remove deprecated variables
More suitable replacement variables have been available for
several releases now so we can remove the deprecated vars.

Tripleo still defines these deprecated variables in several
places but seems to have made no attempt to move to the new
vars, and tripleo is itself now deprecated so we should move
ahead with removal of these vars from os_tempest.

Change-Id: I5a4a90bc963acc8b44caf7eb060b763e0f90a50f
2023-08-16 09:03:23 +01:00
Dmitriy Rabotyagov 687dcb30bf Fix linters and metadata
With update of ansible-lint to version >=6.0.0 a lot of new
linters were added, that enabled by default. In order to comply
with linter rules we're applying changes to the role.

With that we also update metdata to reflect current state.

Change-Id: Ifcb6ebfa971e324e447509e50cc7294bddd6a4a0
2023-07-14 20:37:15 +02:00
Dmitriy Rabotyagov 0a8459bec0 Make tempest respect service_install_method
For all services we do respect service_install_method vairable,
and define 'source' as the default options. At the moment tempest
attempts to follow source path even for distro deployments.

Change-Id: I5256943b5f175cbf46ae36361887dd055e0c52be
2023-05-22 15:30:38 +00:00
Chandan Kumar d8ddd9fcee Add support for whitebox-neutron-tempest-plugin
Signed-off-by: Chandan Kumar <chkumar@redhat.com>
Change-Id: Id7fb7f53c2b099ee6f671350cf3cc896be5bf758
2023-01-19 10:22:04 +05:30
Damian Dabrowski 514b0ca612 Fix the behavior of defining fixed_network_name
Currently we define fixed_network_name only when
tempest_create_isolated_networks == False.

It makes things complicated because tempest_create_isolated_networks is
applicable only when dynamic credentials are used.

fixed_network_name should be also defined when dynamic credentials
are not used.

Basically the only scenario when fixed_network_name should not be
defined is using dynamic credentials together with
tempest_create_isolated_networks.

fixed_network_name should be defined in all other cases.

Change-Id: I547d70995de5afbdc84c9f4e86b2599ad4cb100b
2022-07-12 08:39:19 +00:00
Damian Dabrowski e1ca4b83bf Allow to define extra tempest plugins
Allow to define extra tempest plugins without overriding the whole
`tempest_plugins` list.

Change-Id: Ie00ffb42ceb49331c997f1a700a9423c12a32684
2022-07-12 08:39:13 +00:00
Damian Dabrowski 021f18905f Make _tempest_plugins a list of dicts.
For some reason we define a list inside a _tempest_plugins dict.

It should be simplified to the list of dicts.

Change-Id: I891f77e3e22c962615697504d0870e25017511d7
2022-07-12 10:37:47 +02:00
Dmitriy Rabotyagov 3404d6cef9 Update default endpoint type to "internal"
internalURL is not a valid value for heat plugin, which makes workspace
creation to silenly fail. To avoid that we change  default to just
`internal`, that should be supported by all plugins.

Change-Id: I86eef4f4a5cbcd7825488293bb8eaa9c7b9be5f1
2022-05-20 21:00:56 +02:00
Zuul b39b6ba987 Merge "Improve domain support" 2022-05-03 18:32:56 +00:00
Zuul 42cea5e6b4 Merge "Remove unused variables" 2022-04-27 14:47:37 +00:00
Zuul 9e49925f3d Merge "Add support for both Credential Provider Mechanisms" 2022-04-27 14:47:34 +00:00
Zuul 601db553f8 Merge "Allow to create only specific tempest resources." 2022-04-27 14:36:42 +00:00
Damian Dabrowski 6a7a209c9b Improve domain support
Allow to set domain for admin authentication and dynamically provisioned
accounts.

Currently tempest admin user has to reside in the same domain as
dynamically provisioned accounts.

Change-Id: I1d5aa1f32bae42e2eeeed37588f6ca564563e57a
2022-04-26 16:45:44 +00:00
Damian Dabrowski d194e546f6 Remove unused variables
Few variables defined in defaults/main.yml are not used anywhere.
We should remove them.

Change-Id: I969ba3f83c053ec22ec02ed58a97b71a3f9686b3
2022-04-26 16:45:21 +00:00
Damian Dabrowski 0566c20d99 Add support for both Credential Provider Mechanisms
Tempest currently has two different internal methods for providing
authentication to tests: dynamic credentials and pre-provisioned credentials.
Depending on which one is in use the configuration of Tempest is slightly
different.
We should provide a support for both of them.

https: //docs.openstack.org/tempest/latest/configuration.html#credential-provider-mechanisms
Change-Id: I26d69caa3f96a530bc0a4a21365404b1a84e489a
2022-04-26 16:45:14 +00:00
Damian Dabrowski 1baf863bf6 Allow to create only specific tempest resources.
In most cases, many of tempest resources are not needed.
From the other hand, some of our contributors still need them so we
can't just drop this functionality from this role.
The best solution I see is to add more flexibility and let users
choose which resources should be created by tempest role.

- public network:
  new variable: bool tempest_public_net_create (default: true)
  if false: require tempest_neutron_public_network_id to be set
  if true: require all other tempest_public_net_* variables to be set
  explanation: it'd be useful to choose if user wants to use already
    existing public net or create a new one/
- private network:
  new variable: bool tempest_private_net_create (default: false)
  if true: require all tempest_private_* variables to be set
  explanation: by default tempest has use_dynamic_credentials &
    create_isolated_networks enabled, so it spawns an usable network,
    subnet, and router when needed for each project it creates, so in
    most cases it doesn't make sense to create special 'private' net.
- router:
  new variable: bool tempest_router_create (default: false)
  if true: both tempest_public_net_create and
    tempest_private_net_create should be enabled
  explanation: same case as for private network
- image:
  new variable: bool tempest_images_create (default: true)
  if false: require tempest_glance_image_id_1,
    tempest_glance_image_id_2 to be set
  explanation: tempest needs public images, so it'd be useful to just
    use already existing ones
- flavor:
  new variable: bool tempest_flavors_create (default: true)
  if false: require tempest_nova_flavor_id_1, tempest_nova_flavor_id_2
    to be set
  explanation: tempest needs public flavors, so it'd be useful to just
    use already existing ones
- projects:
  new variable: bool tempest_projects_create (default:
    "{{ tempest_public_net_create or tempest_private_net_create or
      tempest_public_router_create }}")
  explanation: by default tempest has use_dynamic_credentials &
    create_isolated_networks enabled, so we don't need to create any
    'static' projects, but network resources spawned by tempest
    playbook belong to this project, so it should exist if any of
    these resources are going to be created

I don't see any reason why users and tempest role should be created
so i dropped this functionality.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/825166
Change-Id: Icb46f5cb9e2dda6511cc49e30587f541aa7e399f
2022-04-26 16:44:02 +00:00
Zuul 4ae36d5828 Merge "do not include [*-feature-enabled] sections in tempest.conf" 2022-04-26 15:42:26 +00:00
Damian Dabrowski f82ea26fcb do not include [*-feature-enabled] sections in tempest.conf
We should not include [*-feature-enabled] sections in tempest.conf and use
``tempest_tempest_conf_overrides`` for these customizations instead.

There is no way we can keep feature list updated all the time and cover all
possible features in defaults/main.yml.
That's why I think we shouldn't cover them here at all.

If we need these customizations for testing purposed(tested it and I think we
don't), we should define them using ``tempest_tempest_conf_overrides`` only for
these tests.

Change-Id: If7d7ca5ae76cb3cb24f95fb9608ce3e1182d5e5a
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/825166
2022-04-14 22:52:04 +02:00
Zuul 169e8c1452 Merge "Implement variable: tempest_endpoint_type" 2022-04-14 02:43:36 +00:00
Zuul 2402146bf7 Merge "Deprecate unnecessary variables" 2022-03-21 18:39:17 +00:00
Pranali Deore c94c802b2d Add the glance-tempest-plugin
Adding the glance-tempest-plugin to be used to test in os_glance
role.

Change-Id: Icdb9b34e8b85712824bb53466c536aba6d5ccd86
2022-03-03 15:51:26 +05:30
Dmitriy Rabotyagov 6f75a07982 Define variables for tempest plugins
This allow us to define and later bump specific version of tempest
plugins for stable branches and override source of the repositories for
deployers.

Change-Id: I83fa8c729967046829db638500b65faa7f55a50d
2022-01-25 18:10:46 +00:00
Dmitriy Rabotyagov 1900f0ff6b Deprecate congress and lxd tempest plugins
Congress is no longer maintained and no reason to carry on it's
tempest testing.

LXD driver is also not supported by nova and project has been deprecated
back in Train.

Tempest tests for neutron vpnaas and bgpvpn were moved to neutron tempest
plugin with [1] and [2]

[1] 4077093c10
[2] 44866dadba

Change-Id: I161167b995a4cd3ee532719fa5fcf1f1a6cacb73
2022-01-24 16:08:46 +00:00
Damian Dabrowski 23387a5fbd Implement variable: tempest_endpoint_type
``tempest_endpoint_type`` variable has been implemented to avoid having endpoint type hardcoded in tempest.conf

Change-Id: Id218dcdfa788c184074d15519ac170d938290bd4
2022-01-19 17:32:06 +00:00
Damian Dabrowski 18b2cba8cc Deprecate unnecessary variables
It is really unlikely to change these variables:
``tempest_network_tenant_network_cidr``, ``tempest_network_tenant_network_mask_bits``
and ``tempest_fatal_deprecations``

To keep tempest role as simple as it is possible, we should deprecate them.
They still can be changed using ``tempest_tempest_conf_overrides``.

Change-Id: Ia95f10c3548a5773c286e7d7075b71861fcef28b
2022-01-18 23:54:43 +01:00
Damian Dabrowski 6a03389cbc Do not set default value for tempest_private_net_seg_id
It is generally better idea to not set tempest_private_net_seg_id by default for vxlan network(which is the default type for private net) and let openstack automatically choose segmentation id

Change-Id: Ie08e2a612711a57d74dca3e13d1d4223fd441989
2021-12-28 11:48:10 +00:00
Dmitriy Rabotyagov b86ad14b4b Do not install ceilometerclient
ceilometerclient has been deprecated and should not be installed anymore

Change-Id: Id1e43e2a0362bdb4fa11080f8babda546eafe773
Related-Bug: #1948683
2021-10-26 13:53:03 +03:00
Martin Kopec e656a2e264 python-tempestconf moved from osf/ to openinfra
python-tempestconf project got moved from osf/ namespace into
openinfra/one by:
https://review.opendev.org/c/openstack/project-config/+/808479
This commit reflects that.

Change-Id: I696349c0eee715f270ce97b60b421b219ab0fec4
2021-10-18 11:01:18 +00:00
Arx Cruz 4c0fcc91c3 Add tempest_test_extra_test variable
This add a aditional test in the tempest_test_includelist. This is
required right now as a workaround for tripleo jobs, while the
implementation of the includelist in openstack-tempest-skiplist tool.
Tripleo uses os_tempest to setup and run tempest, but it doesn't run all
tempest tests. Sometimes, the list of excluded tests matches the list of
included tests and so tempest fail with no tests to run. This
tempest_test_extra_test will ensure that it will execute at least one
keystone api test to avoid this.
Right now, the tempest_test_whitelist variable is parsed to ansible via
-e command line, and so it's hard to overwrite it on tripleo side, and
it's spreaded in several different jobs with several different set of
tests. So, this is the best/easy way to fix this problem, while we work
on a long term solution.

Change-Id: Ic5f5b44d81ed39b1fa622b5a1d76e482c2aa23aa
2021-06-22 08:48:15 +02:00
Jonathan Herlin 0e71336651 Rename whitelist and blacklist in role
'--whitelist-file' option is deprecated, use '--include-list' instead which is functionally equivalent.
Right now Tempest still supports this option for backward compatibility, however, it will be removed soon.

This change addresses the occurences of whitelist and blacklist in the os_tempest OSA role.

Change-Id: Id021d084867ef2891c381c5863b82421e90ee2ca
2021-05-25 08:15:40 +00:00
Dmitriy Rabotyagov 9b9d8ad489 Extend telemetry testing
Add gnocchi and panko to the available options for tempest testing.

Change-Id: I6a0e6fd644d6c9a0f829ed675a338a1a9e020e27
2021-04-19 18:13:36 +00:00
Dmitriy Rabotyagov 7cec1361a4 Add trove tempest support
Change-Id: Ic137659b550edf3513daefde09e8afe31242dfdd
2021-04-08 15:58:22 +00:00
Zuul d93aa2d6d9 Merge "Add whitebox-tempest-plugin support" 2021-03-11 18:53:57 +00:00
Jonathan Rosser fdd4508a5e Switch default virtualenv to python3
Change-Id: I717ee40bb7b79d62e6a4731d08d2d97f1f9071e4
2021-03-10 08:42:30 +00:00
Artom Lifshitz 6e859e968e Add whitebox-tempest-plugin support
Add whitebox-tempest-plugin installation where available.

Change-Id: I3d994ec33678e61512d7e7480a829b816d6eecd7
2021-03-02 10:52:42 -05:00
Jonathan Rosser 049a1aed1e Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: Ic75eac3e27fd542370a04f9bd946d907f0756061
2021-03-01 10:29:57 +00:00
Zuul 082cc2b366 Merge "Move tempest pip package from a constraint to a requirement" 2021-02-05 23:28:37 +00:00
Zuul 827a874001 Merge "Add support for senlin tempest plugin" 2021-01-18 23:19:19 +00:00
Jonathan Rosser 1fd23f2aed Move tempest pip package from a constraint to a requirement
This is necessary to support the new pip resolver.

Depends-On: I9be6bbf4a29a4da2ddf96dc0336bc2a7d8ec9281
Depends-On: I49c75dd11d6c4e8d37fe013b7ffdfd56ff193fcd
Change-Id: If53aca6f16324d305b150466b94d3f18c8a1096a
2021-01-18 16:38:13 +00:00
Martin Kopec 18f796ad6a Add tempest cleanup support
If a user sets tempest_cleanup variable to true, tempest cleanup will be
executed prior tempest tests (to generate saved_state.json) and after the
tests in order to delete leaked resources if any.

Change-Id: Ief00b43237cb634ee25a18264461bfda8464bbc7
2020-11-11 19:56:17 +00:00
James Denton 253f023888 Allow deployer to skip default resource creation
This patch is part of a set that aims to break out tempest
resource creation from the role, and introduces the
tempest_default_role_resources var. When true, default role
resources are created. When false, deployer-specific resources
must be created prior to executing os-tempest-install.yml or
including the os_tempest role in other playbooks.

Change-Id: I42cb8ffbe8aa8cfdcdcfcbbccf28117a27c519b1
2020-11-09 09:02:21 -06:00