It will fail when non-admin tenants try to get share networks
and security services with option '{all_tenants: 1}'.
The reason is that the policy of 'get_all_share_networks' and
'get_all_security_services' are admin api, they do not allow
the non-admin tenants list the share networks and security
services with all_tenants=1. This patch removes the policy check
of non-admin tenants and allows non-admin tenants to request to
list with 'all_tenants=1', however 'all_tenants' in the request
is just ignored.
Change-Id: Ied021b66333f1254cd232bbc38562a4a9b762ad2
Co-Authored-By: Goutham Pacha Ravi <gouthampravi@gmail.com>
Related-Bug: #1721787
Added support for display count info
in share list&detail APIs:
1. /v2/{project_id}/shares?with_count=True
2. /v2/{project_id}/shares/detail?with_count=True
Partially-Implements bp add-amount-info-in-list-api
Change-Id: I12c41a46140b04f26565d8934e0326480477c612
Config option 'resources_prefix' was deprecated and marked
for removal.
- 6dd6fc66d8/tempest/config.py (L1081)
Tempest is going to remove this config options soon.
This commit removes its usage and hardcode the resource
prefix to 'tempest'
Change-Id: I9c140b3a9efabeced7fc26cb1f169ebe6789d88b
It should be possible to use share type quotas in each project/tenant.
But we get error trying to set share types quota in second+ project
for the same share type. It happens so due to the bug in DB schema,
where we don't have 'project_id' in unique constraint.
So, add new DB migration that fixes unique constraint and cover it with
DB and tempest tests.
Change-Id: I1405ced4e12b40904b7227c9f6285e2775005f8a
Closes-Bug: #1722707
Since the merge of the stable interface for Tempest network_resources
[0], a call within the Manila scenario tests was causing failures
around the ordering of method calls in the set up of the test class.
This patch removes the call as currently it doesn't do anything and
will fix our scenario tests.
[0] - I4eab8f2a722b47edc20e4aab0ef453bec16842f3
Change-Id: Ia9226329035508c37ca499e6efbd2382502eb141
Closes-Bug: #1717562
Currently tempest tests do not support creating and
adding Security Service to newly created share networks.
This causes CIFS multitenancy tests to fail on some
of the backends.
Therefore, having pre-existing share network helps
testing such scenarios.
When using a pre-existing share network,
we can still test the share network API and
create share networks, however, we shouldn't
create shares on such networks.
So, any tests that create new share networks
and use them to create shares need to be skipped.
- This patch makes sure that the pre-existing
share_network is not cleaned up.
- One share_server related test is skipped
to avoid deleting share network as part of test.
- One share network negative test is skipped
to avoid creating a share with new share network.
Change-Id: I272806b05c8b4d30451d0cf4b9dd3f366b8bf728
Closes-Bug: #1698429
Some of the available checks are disabled by default, like:
[H106] Don't put vim configuration in source files
[H203] Use assertIs(Not)None to check for None
[H904] Use ',' instead of '%', String interpolation should be
delayed to be handled by the logging code, rather than
being done at the point of the logging call.
Change-Id: Ie985fcf78997a86d41e40eacbb4a5ace8592a348
We cannot deny ipv6 access rules because we remove the ipv6
access rules from global delete rules, not just remove the
ipv6 access rules from driver update_access interface parameters.
So the ipv6 access rules cannot be deleted in db.
Now, changed to only remove the ipv6 access rules
from the driver update_access interface parameters(add_rules,
delete_rules, access_rules_to_be_on_share).
Closes-bug: 1707066
Depends-On: Ifea1799e1d2e3963fec7e90ce3f9cb47b9f02f4f
Change-Id: Idd0014d898d5468922625e62f9e649926dc04e35
Tempest is going to expose a new optional interface in the plugin
class, to automatically register service clients implemented in
a plugin. Along with this the former client manager, renamed to
ServiceClients, is going to move to a stable interface in
tempest.lib.
Co-Authored-By: Raissa Sarmento <rdearauj@redhat.com>
Change-Id: I4cc9e2b9cd5cb09dff04ee16edcf85e59aec554f
"Quota" APIs now will return two new following keys:
- 'share_groups'
- 'share_group_snapshots'
For user and project, but not share type.
Default values can be configured using following config options:
- 'quota_share_groups'
- 'quota_share_group_snapshots'
APIImpact
DocImpact
Implements BluePrint add-share-groups-quota
Change-Id: I397a8e886226cb22fa50abdf2a4a938bb04c655d
Tempest is migrating their dynamic credentials interface to tempest
lib as part of the effort to create stable interfaces. [0] We will
need to update its location in our code to conform with it.
[0] http://lists.openstack.org/pipermail/openstack-dev/2017-July/119934.html
Depends-On: Id8d60e4d7c22bc72c3e48bc768509ff0cc0c89d5
Change-Id: Iaa6bf908ff5d63cbbfddc7060594818c66ce607c
Filtering issues are most common when creating a share. User messages
now keep information which was the last executed filter if hosts
filtering failed.
DocImpact
Partially-implements: blueprint user-messages
Change-Id: I9ce096eebda3249687268e361b7141dea4032b57
Fix the ``exact`` filters (name, description) in ``shares``,
``snapshots``, ``share-networks`` list can be filter by ``inexact``
value.
Change-Id: I51e6b754f37a09c09a60e9a7fb51d3c9721f2d1f
Closes-bug: #1704971
With this feature it will be possible to set quotas per share type
for all existing quota resources. It is useful for deployments with
multiple backends that are accessible via different share types.
Also, fix one of existing DB migrations that hangs on PostgreSQL.
APIImpact
DocImpact
Implements blueprint support-quotas-per-share-type
Change-Id: I8472418c2eb363cf5a76c672c7fdea72f21e4f63
Function 'tempest.test.attr()' has moved to 'tempest.lib.decorators
.attr()' in Pike and will be removed in a future version.
This patch replaces the 'tempest.test.attr()' with the 'tempest.lib
.decorators.attr().'
Change-Id: I672fbce15ea9b70d977eb0073426c394a1318b86
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
For quite some time, OpenStack services have wanted to be able to send
messages to API end users (by user I do not mean the operator, but the
user that is interacting with the client).
This patch implements basic user messages with the following APIs.
GET /messages
GET /messages/<message_id>
DELETE /messages/<message_id>
Implements the basic /messages resource and tempest tests
The patch is aligned with related cinder patch where possible:
I8a635a07ed6ff93ccb71df8c404c927d1ecef005
DocImpact
APIImpact
Needed-By: I5ffb840a271c518f62ee1accfd8e20a97f45594d
Needed-By: I9ce096eebda3249687268e361b7141dea4032b57
Needed-By: Ic7d25a144905a39c56ababe8bd666b01bc0d0aef
Partially-implements: blueprint user-messages
Co-Authored-By: Jan Provaznik <jprovazn@redhat.com>
Change-Id: Ia0cc524e0bfb2ca5e495e575e17e9911c746690b
Add like filter support in ``shares``, ``snapshots``,
``share-networks``, ``share-groups`` list APIs.
APIImpact
Implements BP like-filter
Change-Id: I5fdf6d89d0b6c7fa182ddfaac60979bc6c0fc2a5
Share and share instance list API will accept new query string parameter
'export_location'. It can pass path and id of export_location to
retrieve shares filtered.
APIImpact
Partly-implement: BP support-filter-share-by-export-location
Change-Id: I5fdf6d89d0b6c7fa182ddfaac60979bc6c0fc2a6
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:
https://review.openstack.org/#/c/457555/
Change-Id: I7c3740d8941b837767d576d4e9b1fb86cd164d59
Since assertEmpty() function has already been implemented in tempest,
let's use this function instead of generic assertEqual() function.
This change makes the code and the error messages to be more readable.
Therefore it improves maintainability a little bit.
TrivialFix
Change-Id: I3d671436e9ea2f7cbdda6d3dbf5c8a3f9d7625d4
Previous change [1] added logic for handling of availability zones with
share groups and [2] for scheduling with share group capability
to create consistent snapshots. Those two added two new DB fields
for 'share_groups' DB model, but not to API response that requires
microversion bump. So, add these fields to API and bump microversion.
Following two new fields will be available with new microversion:
- 'availability_zone_id'
- 'consistent_snapshot_support'
Also, add tempest tests to these API changes.
[1] I000adeb53fe8435465cbedc3c539e6aaae6503c5
[2] I05553c308ae40c4ddc2c6469ff1c1a3da36a87da
Partially-Implements BP manila-share-groups
Change-Id: I343d0c6f3a5c7b58d88e95dba4af984fae738954
If we provide some other type than None or dict as group specs
creating share group type, then we get error 500 caused by unhandled
exception. So, avoid it by explicitly checking type of provided group
specs.
Change-Id: I81312617f37a8f559b3c9201b03cf8be31761365
Closes-Bug: #1673446
That will be used for scheduling share groups based on their possibility
to create consistent snapshots.
Also apply following tempest plugin changes:
- Add new 'capability_sg_consistent_snapshot_support' tempest config
option, that will be used for creation of new share group types and used
to prove that scheduling works as expected.
- Fix some share group test attributes from 'only API involved' to
'API and Backend are involved', because it is so indeed.
Change-Id: I05553c308ae40c4ddc2c6469ff1c1a3da36a87da
Partially-Implements BP manila-share-groups
Use ddt in share instances tempest test, and use
list_share_instances instead of get_instances_of_share
in test_list_share_instances to avoid redundant test with
test_get_instances_of_share.
TrivialFix
Change-Id: I03ae35b67e76b382b04747541afab0e4f574942c
When we do manila access-list, the 'created_at' and 'updated_at' time
should be shown to the user. And then the user could determine which
is the recent access rule. As the design, the recent access-allow
rule caused the error access-status of share instance.
APIImpact
Closes-Bug: #1682795
Change-Id: Iad6070d60ec77b7de9cc9679cfa7478876084da1
In the Newton cycle the ability to create read-only rules for
cephx-backed access rules was added but there were no functional tests
to exercise this feature. This patchset adds new parameters to the
existing cephx access rule test to also test read-only rules.
Change-Id: I4b4fd5790526ebc596471fd913ffe9cdb2faa520
Currently, The user access name is limited to 32 characters in manila API service,
but actually the user access name is longer than 32 characters. so we need
to change user access name limit from 32 to 255 characters
APIImpact
Closes-bug: 1674908
Change-Id: I68d8afabcd3fef57e472b4067ea8949e0aa8f53a
Tempest provides stable library interfaces under tempest.lib.
This patch switches to use it for data_utils.
Change-Id: Ia331ec10a84118e5d72a95f8f8b86509f57232a1
The scenario tests base class from Tempest is not a stable interface
and it's going to be refactored on Tempest side, as notified in
http://lists.openstack.org/pipermail/openstack-dev/2017-February/112938.html
Maintain a local copy of the base class, taken from Tempest with head of
master at c5f1064759fe6c75a4bc5dc251ed1661845936cb.
Change-Id: I1b7470f38b9814b9baa064f9302f4f3b6a8c7894
Before it was possible to pick up temporary status of share server
and fail to filter share servers as second API call, because status
could be changed. Fix it by filtering with 'active' status.
Change-Id: Idcff68ce475d31b38a34d410970cc839b06d18b3
Closes-Bug: #1670757
This option is used to control how revert-to-snapshot
extra-spec is used when creating a share type for several tests,
but for the same tests, it is more appropriate to either not
create a share-type (thus use the default or "don't care"
behavior) or do so based on the value of
run_revert_to_snapshot_tests.
TrivialFix
Change-Id: Ie8a0030a896634eb8deaff17ea72371419eecdea
Also, allow filtering by host based on policy 'list_by_host' that
defaults to 'admin only'.
Do not bump API, because it is not considered as expected behavior,
hence should not be kept for old microversions.
Co-Authored-By: Valeriy Ponomaryov <vponomaryov@mirantis.com>
APIImpact
Change-Id: I799bb7378927b6c3ee0f9fe88fd9876a03dd85b5
Closes bug: 1664370