Commit Graph

24 Commits

Author SHA1 Message Date
Zuul 6238ad6efc Merge "Move general methods under utils file" 2023-01-12 11:13:33 +00:00
lkuchlan 4a80316fe7 Move "get_access_rule_data_from_config" method under utils.py
This method is based only on tempest configuration, so better to
move it under utils.py method that other classes will benefit it
without having to inherit from it.

Change-Id: Ia0cf15210e697988cd54ae82db8bb76aa17a5996
2022-12-14 13:02:16 +02:00
lkuchlan 7b63ec7845 Move general methods under utils file
As a follow-up to the patch [1].
Better to move these methods under utils file
so other classes can benefit from it.

[1] Ia0cf15210e697988cd54ae82db8bb76aa17a5996

Change-Id: I31322352dcd7982443fa1f590a643b341c059ff0
2022-12-11 12:03:59 +02:00
lkuchlan d62b5dcf51 Use _parse_resp method from tempest
As a continuation of the patch [1]. The required change
was merged in tempest. So we can make the cleanup in
manila_tempest_plugin.

[1] https://review.opendev.org/c/openstack/manila-tempest-plugin/+/836877

Change-Id: I093be875910ef18deebe3e56b83c6992d1a307e5
2022-07-08 14:56:19 +00:00
Goutham Pacha Ravi 8bb17fc562 Refactor share metadata tests
1) Use the shares_v2_client to make metadata API requests.
This allows us to test v1 proxies as well where appropriate,
and actually test the supported version of the API instead
of the deprecated version

2) Verify key in GET /v2/shares/<share>/metadata/{key} API

the client's _parse_body helper strips out the top
level key allowing us to miss bugs associated with
any key changes from the server [1]. Allow for opt-in
verification of the key and add this verification
to the affected API.

[1] https://bugs.launchpad.net/manila/+bug/1968069

Depends-On: Ib5a62599b84ba55617071f8bcd8e2a1a11b2537b
Change-Id: I7b1af957f08328c642a74ff123deb78e193bbe3a
Related-Bug: #1968069
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2022-06-23 17:00:50 +05:30
Andre c1a3c0e54e Add functional tests for add multiple subnets feature
This change adds negative and positive functional tests
for the new feature add multiple subnets per az. Older
functional tests impacted by the feature are fixed. Finally,
the new flags `run_share_server_multiple_subnets_tests` and
`run_network_allocation_update_tests` are added and configured
in the community jobs for Dummy DHSS=True and Container Driver.

Partially-Implements: blueprint multiple-share-network-subnets
Change-Id: I99547e1873646fb1494a454f67b14c7293342beb
2022-03-10 09:09:27 -03:00
haixin 4889581976 Remove all usage of six library
Replace six with Python 3 style code.

Change-Id: I724eba28d1a88317655f9cb7da94716772cd01ab
2021-12-09 16:50:57 +08:00
Goutham Pacha Ravi a0acf25969 Fix API version test skip logic
API tests must be evaluated by min and max
versions, however, we've multiple places
where we don't seem to evaluate the min_version;
this leads to incorrect behavior when test
runners set a different min_version in their
test configuration.

We can also consolidate the decorators and
callables that we have. We attempted this in
the recent past [1], however, we replaced the
callables with calling a decorator method, which
resulted in many tests not being skipped.

This bugfix is currently necessary to get
tests working against stable/ussuri and
stable/train branches.

[1] I0c35aff993e67c1ef44c27580f8c2c829a6275f7
Change-Id: I2eceb1d5fe42b1b779e115a0144a5d9639d3753f
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-05-28 00:57:45 -07:00
Luigi Toscano d91870b8e6 Preserve the items order when calling ddt.data()
Several calls to ddt.data() change the lists of items into a set
to de-duplicate them. This happens, for example, when the list
constains microversions which may come from some variable.

In order to generate a consistent and predictable list of tests,
which can be compared over time (as ddt adds the index of the
test to the test name), replace the usage of set with
a new function which removes the duplicates but keeps the order.

Change-Id: I9cbd26016238c25487ac8104c1188cd2cf4f467e
2020-10-03 15:17:23 +02:00
lkuchlan 1d1461d232 Add flake8-import-order extension to tox.ini
This package adds 3 new flake8 warnings

* ``I100``: Your import statements are in the wrong order.
* ``I101``: The names in your from import are in the wrong order.
* ``I201``: Missing newline between sections or imports.

Change-Id: I4feabcd4db583d213e0e4d414eee267b0ddb8870
2020-08-18 10:01:00 +03:00
silvacarloss 6e57568e97 Remove experimental flag from share groups feature
The share groups functionality will no longer be considered
experimental. The existent functional tests were modified to accomplish
with this feature graduation.

Change-Id: Ideba68c0481345e808f185195eea68e879155cf1
Partially-Implements: bp graduate-share-groups-feature
2020-04-22 21:44:03 +00:00
silvacarloss ca4dd9f101 Update share quota functional tests
- Updates the existent functional tests to accomplish with the two
  new quotas for share replicas.
- Add new functional tests for share replicas

Depends-On: I8ba7bc6f167c28d6c169b2187d0e1bda7cad3f69
Change-Id: I9c5df364bca666bbc32fb10b100a38f78888088a
2020-04-17 01:04:42 +00:00
lkuchlan a3b6f7ad25 Move all conditions skipped under "skip_checks" method
Manila tempest plugin class structure should be compatible
with tempest project as manila tempest plugin is a plugin
of tempest.
In some cases incompatibility can cause problems.
For example: using "check_uuid" tool for generating UUIDs
for tests does not work properly in manila, Because some
classes are wrapped with conditions skipped.
I suggest to use "skip_checks" method that been used to
evaluate config before tests methods and skip them based
on these checks.

This patch moves all conditions under this method.

Two new functions been added to "skip_checks" method
in order to skip by microversions and reduce a duplicated
code:
  - "check_skip_with_microversion"
  - "check_skip_with_microversion_not_supported"

Change-Id: Id0a15dbfbd3d85d7773c26e252f4cc4d906cf377
2020-02-14 21:22:21 +00:00
Zuul 171241eb94 Merge "Enable share-replica tests in multitenancy enviroments" 2019-09-21 01:02:59 +00:00
Douglas Viroel b7e27e7719 Adds new functional tests for share-network-subnets
This patch adds functional test for share-network-subnets and
validates the new API version 2.51

Change-Id: I60bdb493ad5766f28408a0c877f960922fe44ad0
Partially-implements: bp share-network-multiple-subnets
2019-09-20 13:33:12 -03:00
Douglas Viroel bd4e78c622 Enable share-replica tests in multitenancy enviroments
This patch enables share-replica tests to be executed in a multitenancy
environment, providing a share-network to be used by both shares and
share-replicas.

The multitenancy test for share-replicas will be enabled only for API
version equal or greater than 2.51.

Depends-On: I60bdb493ad5766f28408a0c877f960922fe44ad0
Change-Id: Icb93fc346b71edc7bb3ac989e9751899bb80fbe5
2019-09-14 13:59:19 +00:00
Lucio Seki 370569423e Add functional tests for manage/unmanage of shares in DHSS=True
This patch adds functional tests for managing/unmanaging
share servers, shares, and snapshots in DHSS=True.

Change-Id: I452c2a99b186f53d737cb7fbd7eabfcfd9b249d6
Partially-implements: bp manage-unmanage-with-share-servers
2019-03-06 21:42:27 -03:00
Victoria Martinez de la Cruz f6bc6fa7bc Create a generic share type (api tests)
Tempest assumes a default share type already created
to work. This means, if a default share type is not
created and not specified in the conf file, tempest
tests fail. A workaround is to create a share type
as part of the environment setup for all the tests
that need it. This patch set does that.

Change-Id: I15880e400df30918762ebd7304244b4a27200168
Closes-Bug: #1743472
2018-08-05 19:37:43 -03:00
Raissa Sarmento 80f5fbf2c9 Initial fixes to plugin repo
Fixing requirements and setup for manila tempest plugin.

Depends-On: I21f2e27ba18f18ebdf07105452c0ffb6fc04bb83
Change-Id: Id773014b915817ff41b9bffd41e84e4d53fb78be
2017-11-20 12:01:12 -03:00
zhongjun 72974ff6a5 Enable IPv6 in manila(allow access)
Please read spec for design detail [1].

Add support to validate IPv6 based addresses
in allow access API when access type is IP.

[1] f7202a6cfe32a057f752a4e393f848f8a0211c36

APIImpact
DocImpact

Change-Id: Ica242007e77a7e21b2151e5fc32401b501d961b2
Partial-Implements: blueprint support-ipv6-access
2017-07-17 09:44:41 +08:00
Rodrigo Barbieri 58d9de38c0 Improve Share Migration tempest tests
Improve coverage by adding tests that validate the share-type
change while also changing the driver mode.

Closes-bug: #1620800

Change-Id: I924c34aa69591754b437d75f43db91d77e73fb07
2016-09-13 13:17:07 -03:00
Rodrigo Barbieri c9abf28dcc Fix Share Migration improper behavior for drivers
Tempest tests were not appropriate for driver-assisted migration,
so this was fixed.

Also, improved docstrings and fixed workflow for drivers when
implementing 2-phase migration to be accurate with tempest and
handle AZs, which were previously locked to the source share's
AZ.

Driver-assisted migration now creates an additional
share instance to better handle and support driver methods.

Updated allow_access and deny_access APIs to allow users to mount
migrating shares before issuing 'migration-complete'.

APIImpact

Closes-bug: #1594922
Change-Id: If4bfaf7e9d963b83c13a6fea241c2eda14f7f409
2016-08-30 08:30:21 -03:00
Xing Yang 69b00b5b26 Manage and unmanage snapshot
Add APIs to support manage and unmanage share snapshots.
Also add support in the Generic driver.
This only supports for DHSS=False driver mode.

Add provider_location column to the share_snapshots table
to save data used to identify the snapshot on the backend.

Also need to bump microversion.

APIImpact
DocImpact
Change-Id: I87a066173c85d969607d132accd9f0e9bd49c235
Implements: blueprint manage-unmanage-snapshot
2016-02-18 04:09:05 -05:00
Valeriy Ponomaryov fcde77103e Fix Tempest microversion comparison approach
Manila microversions have following template:

x.y

where 'x' and 'y' both digits.

And now tempest transforms string 'x.y' to float but it is incorrect
thing to do because float assumes that each left value is bigger than
right one. And it is not suitable for microversion comparisons.

Examples:

Microversions true conditions:
2.9 < 2.10
2.9 < 2.81

Float true conditions:
2.9 > 2.10
2.9 > 2.81

So, create new file 'manila_tempest_tests/utils.py' and place there
old and new functions that serve all microversion actions. In addition,
port another existing utility function called 'rand_ip'.

Change-Id: I88bf2cb51fd8de1bc89bf169bda7a05ca5a0b8ab
Closes-Bug: #1518996
2015-12-16 18:07:57 +02:00