Commit Graph

28 Commits

Author SHA1 Message Date
Ghanshyam Mann e5ed4b9f1e Remove Glance v1 APIs tests code
Glance v1 APIs were removed in Rocky and tempest master
does not support the Rocky release. If glance v1 APIs
needs to be tested for older release then older Tempest
can be used.

Tempest is removing the Glance v1 APIs tests, config option,
and its service clients and this change is needed for that.

Needed-By: https://review.opendev.org/c/openstack/tempest/+/890592
Change-Id: I0ef67e86730320755e6f642a36f97ab462fe0aad
2023-08-06 12:05:43 -07:00
Roman Popelka 5307114035 Remove setup_clients method
As tempest.scenario.manager was announced stable interface in Tempest 27.0.0[1]
it can be now reused in plugins.

Replaced methods:
    * setup_clients

Etherpad concerning this effort:
https://etherpad.opendev.org/p/tempest-scenario-manager-cleanup

[1] https://docs.openstack.org/releasenotes/tempest/v27.0.0.html#release-notes-27-0-0

Change-Id: Ib4df699fb7964b3f8e6d3b518a562acbaa3dd280
2022-07-13 15:52:07 +02:00
Roman Popelka 29541dcf25 Remove secgroups related methods
As tempest.scenario.manager was announced stable interface in Tempest 27.0.0[1]
it can be now reused in plugins.

Barbican tempest plugin still uses nova-network old interface for floating ip
related methods, this patch removes them and use tempests's ones which
already use neutron's interface.[2]

Replaced/Removed methods:
    * _default_security_group
    * _create_security_group
    * _create_loginable_secgroup_rule
    * _create_security_group_rule

Etherpad concerning this effort:
https://etherpad.opendev.org/p/tempest-scenario-manager-cleanup

[1] https://docs.openstack.org/releasenotes/tempest/v27.0.0.html#release-notes-27-0-0
[2] bbc9dd34f6

Change-Id: I7605fe11caa8ae5725e0c0583c623ebad73d40da
2022-07-13 15:49:32 +02:00
Roman Popelka ddfeb25152 Remove nova_volume_attach & nova_volume_detach methods
As tempest.scenario.manager was announced stable interface in Tempest
27.0.0[1] it can be now reused in plugins.

Replaced methods:
    * nova_volume_attach
    * nova_volume_detach

Etherpad concerning this effort:
https://etherpad.opendev.org/p/tempest-scenario-manager-cleanup

[1] https://docs.openstack.org/releasenotes/tempest/v27.0.0.html#release-notes-27-0-0

Change-Id: Ieb01041344ddc17b3bb4c34ada83a80d2fd612d9
2022-07-13 13:46:31 +00:00
Roman Popelka 0cc8bb6453 Remove create_floating_ip & get_server_ip methods
As tempest.scenario.manager was announced stable interface in Tempest 27.0.0[1] it can be now reused in plugins.

Barbican tempest plugin still uses nova-network old interface for floating ip related methods, this patch removes them and use tempests's ones which already use neutron's interface.[2]

Replaced methods:
	* create_floating_ip
	* get_server_ip

Etherpad concerning this effort:
https://etherpad.opendev.org/p/tempest-scenario-manager-cleanup

[1] https://docs.openstack.org/releasenotes/tempest/v27.0.0.html#release-notes-27-0-0
[2] 6428139de1

Change-Id: I7b048f78d0ee8fd2aae33134caa1a8034fa31031
2022-07-13 15:46:02 +02:00
Zuul 7336b9a1f1 Merge "Remove create_volume & create_volume_type methods" 2022-07-12 13:02:15 +00:00
Zuul 583a00a4e9 Merge "Remove create_timestamp & get_timestamp methods" 2022-07-12 13:02:13 +00:00
Zuul f654e3ef20 Merge "Remove get_remote_client method" 2022-07-12 13:01:41 +00:00
Zuul f4c25f5206 Merge "Remove create_server and rebuild_server methods" 2022-07-12 13:01:40 +00:00
Zuul e4b0683526 Merge "Fix the import of NotFound exception" 2022-07-01 20:19:30 +00:00
Luigi Toscano 4e9303e1bb Fix the import of NotFound exception
It is exported by tempest.lib.exceptions, not tempest.exceptions
(it was originally until 2015).

Change-Id: Ic8ef45bcb9518968d32872a93fc3381004d218ff
2022-06-24 11:37:34 +02:00
Roman Popelka 5ac56787cb Remove create_volume & create_volume_type methods
As tempest.scenario.manager was announced stable interface in Tempest 27.0.0[1] it can be now reused in plugins.

Replaced methods:
	* create_volume
	* create_volume_type

Etherpad concerning this effort:
https://etherpad.opendev.org/p/tempest-scenario-manager-cleanup

[1] https://docs.openstack.org/releasenotes/tempest/v27.0.0.html#release-notes-27-0-0

Change-Id: I183a0f8190bf7f336370732d8d08d1bb28ad2835
2022-03-17 10:19:42 +01:00
Roman Popelka 781850ab1d Remove create_timestamp & get_timestamp methods
As tempest.scenario.manager was announced stable interface in Tempest 27.0.0[1] it can be now reused in plugins.

Replaced methods:
	* create_timestamp
	* get_timestamp

Etherpad concerning this effort:
https://etherpad.opendev.org/p/tempest-scenario-manager-cleanup

[1] https://docs.openstack.org/releasenotes/tempest/v27.0.0.html#release-notes-27-0-0

Change-Id: Id6ba585c58c0e9b6564d85137fd00ae2a8954c06
2022-03-17 10:10:47 +01:00
Roman Popelka 6c0902bea7 Remove get_remote_client method
As tempest.scenario.manager was announced stable interface in Tempest 27.0.0[1] it can be now reused in plugins.

Replaced methods:
	* get_remote_client

Related tempest commit:
f52c759e5c

Etherpad concerning this effort:
https://etherpad.opendev.org/p/tempest-scenario-manager-cleanup

[1] https://docs.openstack.org/releasenotes/tempest/v27.0.0.html#release-notes-27-0-0

Change-Id: Iab28d75999ae408a8bbefab76319f384e49cbcc0
2022-03-17 10:08:46 +01:00
Roman Popelka f6ea03f7b8 Remove create_server and rebuild_server methods
As tempest.scenario.manager was announced stable interface in Tempest 27.0.0[1] it can be now reused in plugins.

Replaced methods:
	* create_server
	* rebuild_server

Etherpad concerning this effort:
https://etherpad.opendev.org/p/tempest-scenario-manager-cleanup

[1] https://docs.openstack.org/releasenotes/tempest/v27.0.0.html#release-notes-27-0-0

Change-Id: I3f9209fef4da9cc85d78060da0bad61682ff6b73
2022-03-17 07:28:02 +01:00
Roman Popelka 6e39d991c8 Remove _create_port and create_keypair methods
As tempest.scenario.manager was announced stable interface in Tempest 27.0.0[1] it can be now reused in plugins.

Replaced methods:
	* _create_port
	* create_keypair

Etherpad concerning this effort:
https://etherpad.opendev.org/p/tempest-scenario-manager-cleanup

[1] https://docs.openstack.org/releasenotes/tempest/v27.0.0.html#release-notes-27-0-0

Change-Id: I2f96cf7b5f85f2a1297eb7a1aafdfd88485eaebe
2022-03-08 11:16:51 +00:00
Marian Krcmarik 1972c46924 Copy created image into all available glance stores
The openstack can have multiple glance stores deployed/available.
It may be a proper thing to copy newly created signed image into
all the available glance stores so barbican tempest tests can access
image regardless on which compute and storage backend they are ran on
and regardless on which glance store is local.
Additionally there is a nova-compute conf parameter[1] which can even
prevent instances being spawned from image which is not available in local
glance store.
The copy-image would happen only if import_image tempest cong option
is available which indicates glance multistore is available.

[1] https://review.opendev.org/#/c/657078/

Change-Id: I1f0d8be1b237da0c96e820c4b3dca09a83b29752
2021-02-08 23:00:39 +00:00
jacky06 a318f6d77c Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Change-Id: Ia59a23a36ebb8548a20e894000f7342c73012eac
2021-02-08 16:05:29 -06:00
Marian Krcmarik da01199b5e Ceph Multibackend changes
1. Tempest has an option CONF.compute.compute_volume_common_az to make
sure that Volume and Instance are created in common AZ If Availability
zones are used. The paramater is respected when instance is created
because tempest.common.compute.create_test_server() is used but not
respected when volume is created for test purpose. Let's make sure
AZ is set when volume is created if parameter is set.

2. The plain Encryptor provider is not support on ceph backends, the
test test_encrypted_cinder_volumes_cryptsetup fails on:
cinder.exception.VolumeDriverException: Volume driver reported an error:
Provider plain not supported.
This comes from [1] which is called in [2]. The Plain provider will be deprecated
in future completely.

[1] https://opendev.org/openstack/cinder/src/branch/master/cinder/volume/volume_utils.py#L1195
[2] https://opendev.org/openstack/cinder/src/branch/master/cinder/volume/drivers/rbd.py#L877

Change-Id: Ib6290ed1ad5779e4e6fed449f3335dbdada42f0d
2020-09-12 03:04:04 +02:00
Ghanshyam Mann 48d10b8be0 Remove use of deprecated config options for volume API selection
Tempest has moved the Volume APIs testing to v3 as default and can be run
under v2 API via catalog_type.
- https://review.opendev.org/#/q/topic:volume-default-testing-v3+(status:open+OR+status:merged)

Below config options were deprecated since Rocky and now Tempest is going
to remove those (Needed-By patch):
    * ``CONF.volume-feature-enabled.api_v2``
    * ``CONF.volume-feature-enabled.api_v3``

Change-Id: I600ac88dbed8697cd1efe009fd46195f934f3eb6
Needed-By: https://review.opendev.org/#/c/698754/
2019-12-12 16:53:01 +00:00
ghanshyam b8bf147bdc Remove volume v1 API service client usage
Volume v1 API has been gone since long and Tempest also
marked their deprecation since Juno
- https://review.openstack.org/#/c/446238/

Now Tempest is removing the deprecated config option and
alias for voluem v1 service client in
- https://review.openstack.org/#/c/573135/

Before the Tempest patch gets merged, we need to remove all usage
of volume v1 things.

Change-Id: I2d715a8a63069da5cfe02fbc0992eccb7ba598a7
Needed-By: https://review.openstack.org/#/c/573135/
2018-06-07 10:58:23 +00:00
Chandan Kumar c9f0b5d46b Added support of volume api_v3 client
* From rocky release projects are consuming the volume featured
  enabled v3 API, Since the earlier code has support
  for v1, v2 and since api_v3 is used in tempest.conf, it will give
  AttributeError: 'Manager' object has no attribute 'volumes_client'.
  The above patch fixes the issue.

* Keep cinder v1 api as tempest plugin is branchless, it would avoid
  breakage if someone is still consuming it.

Closes-Bug: #1775353

Change-Id: Ia9d070a6033a8192112dbaa1704b1de6838051c5
2018-06-06 19:04:22 +05:30
yatin 5ddcc7eefa Use addCleanup to detach volume instead of explicit detach
Cinder volume delete [1] is executed during resource cleanup.
So, if test fails due to some reason then it tries to delete a volume
which is "in-use" state. Detach volume should be executed before
trying to delete the volume. This patch adds nova_detach volume
as a cleanup task.

[1] a6d945d8e6/barbican_tempest_plugin/tests/scenario/manager.py (L229)

Change-Id: I3457bb6fc22a7bb6a32c8d6f4ea5879aeb8d43c5
Related-Bug: #1755485
2018-03-27 17:06:44 +05:30
Ihar Hrachyshka 2d0cf0a500 Validate instances are accessible before messing with their disks
This should help to isolate failures that are generic from specific test
failures related to barbican. If a test can't pass simple connectivity
check, it's probably broken, and there is no point to attach disks,
because it won't work.

Related-Bug: #1742936
Change-Id: I96cd35392f638c0e5b668f4f3b15cf4cd6114b71
2018-01-31 06:12:11 +00:00
Ihar Hrachyshka ecce1f64f7 Fixed _log_console_output call on failure
_log_console_output is defined in tempest.scenario.manager.Manager but
the test class inherited from BaseTestCase that doesn't have it. So
whenever a test failure occurs, we don't log console output, which may
be handy when debugging gate issues.

Change-Id: I48701da8714c9e483401fd1ba987e4f2bef5bd23
Related-Bug: #1742936
2018-01-18 13:33:30 -08:00
Vu Cong Tuan 17b6193be5 Replace the usage of 'manager' with 'os_primary'
In tempest, alias 'manager' has been moved to 'os_primary'
in version Pike, and it will be removed in version Queens.
This patch is to replace the usage of 'manager' with 'os_primary'.

For other details, please check [1] and [2]
[1] https://review.openstack.org/#/c/468036/
[2] https://review.openstack.org/#/c/463484/

Change-Id: I522405288452f42824991e9709eec4e57aab2606
2017-06-21 19:39:37 +07:00
dane-fichter 53f4fea68b Add volume encryption scenario tests
This change adds scenario tests for Cinder volume
encryption.

Change-Id: Ibe47a916ab77eeb970a2b201fbf1b8cf2409f4a2
Depends-On: Id9629ecbbc75e19eec81f60daec7b0a085bcdc12
2017-03-29 16:13:40 -04:00
Brianna Poulos 011292a2df Switch to local copy of scenario test base class
This is in response to the mailing list post at:
http://lists.openstack.org/pipermail/openstack-dev/2017-February/112938.html

The tempest.scenario.manager class will be refactored,
so a local copy will be maintained in the
barbican_tempest_plugin repository until that refactor
is complete.

Change-Id: I706e256fe4e224e44532ea0ce2c81495791ec97f
2017-03-15 17:25:52 -04:00