Commit Graph

21 Commits

Author SHA1 Message Date
Raissa Sarmento 797048c5ce Remove in-tree tempest plugin
Remove in-tree tempest plugin in favor of newly
created manila-tempest-plugin repository.

Change-Id: I1fb124598f38067fee469df124ee684f748c6f57
2017-12-22 11:11:38 +00:00
zhongjun 4af1944985 Use parenthesis instead of backslashes in tempest folder
Use parenthesis instead of backslashes in tempest folder

TrivialFix
Change-Id: I6c2ea07b0bfc5852b28e44989406cc10eb912e33
2017-06-22 02:48:50 +00:00
Ben Swartzlander 15b27e8fbe Only return share host for admins using shares API
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
2017-02-16 18:13:31 +00:00
Vitaliy Levitksi 306c79fd02 Add MapR-FS native driver
Implement new manila driver for MapR-FS distributed file system

DocImpact

Co-Authored-By: Grigoriy Rozhkov <groghkov@maprtech.com>

Implements: blueprint maprfs-driver

Change-Id: I6073edf76fbf11bf9d3c521129c377c96e57a21
2017-01-12 18:05:39 +02:00
Clinton Knight 0d6db3588c Add create_share_from_snapshot_support extra spec
The snapshot_support extra spec has always meant two
things: a driver can take snapshots and create shares
from snapshots. As we add alternate snapshot semantics,
it is likely that some drivers will want to support
snapshots and some of the new semantics while being
unable to create new shares from snapshots.

This work adds a new extra spec,
create_share_from_snapshot_support, that removes the
overloading on snapshot_support. It also makes the
existing snapshot_support extra spec optional,
allowing admins to create types without setting
snapshot_support; shares created with such types
will not support snapshots.

APIImpact
DocImpact

Co-Authored-By: Goutham Pacha Ravi <gouthamr@netapp.com>
Implements: blueprint add-create-share-from-snapshot-extra-spec
Change-Id: Ib0ad5fbfdf6297665c208149b08c8d21b3c232be
2016-12-21 09:57:08 -05:00
Marc Koderer a0163f4c20 Remove tempest.test usage from manila tests
Manila tempest tests should be independent from tempest code
as much as possible. The decorator test.attr is widely used in
all tests to set testcase attrs. This decorator doesn't
really do anyting else than calling testtools.testcase.attr.

Change-Id: If10beb9ae7562524f602a6fd7254aa95ef24d70e
Partially-Implements: bp tempest-no-deps
2016-09-30 12:47:17 +00:00
Valeriy Ponomaryov d5e8b8d9e8 Fix race condition in tempest test
Test "test_create_get_delete_share" located in
"manila_tempest_tests/tests/api/test_shares.py" assumes
that share is created not so fast and has "creating" status.
But it can be "available" in case of really fast creation
as in case of "dummy" driver.

Change-Id: Ie8a01e9352da47ff6e47ad8baeb5409282d3305c
Closes-Bug: #1607723
2016-07-29 13:20:08 +03:00
Valeriy Ponomaryov 7145891ef8 Add dummy driver
Added dummy driver for ease of testing and development of REST APIs
and internal manila interfaces.
It can be enabled as backend in the same way as all other share drivers.
But, it does not provide any resources.

Also, update tempest to be able to work with share-networks when
networks are defined via config and not API.

CI hooks are configured to run tempest twice using both available
driver modes. Where DHSS=True mode uses StandAloneNetworkPlugin as
network backend.

Change-Id: I9053dddfc643cb5a6602f15235b91bbaea727dbd
Implements BluePrint dummy-driver
2016-07-22 17:57:59 +03:00
Goutham Pacha Ravi eb784f1807 Add user_id and project_id to snapshot APIs
In a cloud with multi-tenancy, administrators
would like to see the project_id of the tenant
while listing snapshots of all tenants.

Likewise, we also should expose the user_id field
as it would help in cases where tenants have multiple
users.

DocImpact
User and administrator references need to capture
this information.

APIImpact
API changes are micro-versioned.

Change-Id: I3ad655dc9ab7440f205b0e153fccaa99abb79bbd
Closes-Bug: #1587161
2016-06-16 18:38:15 -04:00
Valeriy Ponomaryov 797bbcb303 [Tempest] Add valuable tags to tests
To be able to run tests based on following criteria:
- Only API is required and tested.
- API and share back-end required, API is tested.
- API and share back-end required, back-end is tested

Also, add doc with detailed description of running subset of tests.

Change-Id: I9ae105eaa527621c85d5038bba15edf4b065eaa3
Closes-Bug: #1587874
2016-06-08 11:25:32 +03:00
zhongjun 4334a067f0 Add user_id echo in manila show/create/manage API
Add "user_id" detail when we run command
"manila show/create/manage ...". Make the operator know
which user created this share.

APIImpact

Closes-Bug: #1562846
Change-Id: I2858c7f63182288f354b96448f0970d3642d4bf7
2016-05-11 09:16:21 +08:00
Ben Swartzlander 4368c98b71 Update tempest commit and switch to tempest.lib
tempest_lib was renamed to tempest.lib which causes problems
when running tests because tempest imports plugins from other
projects and crashes.

Closes bug: 1552520

Change-Id: Id7d43dee256856062bd0dadad9c469c1500ee36e
2016-03-02 23:09:00 -05:00
John Spray 9ff0d1312e Add Ceph Native driver
This driver enables use of the Ceph filesystem for
Manila shares.  Clients require a native CephFS
client to access the share.  The interface
to Ceph is CephFSVolumeClient, included in
the 'Jewel' Ceph release and later.

APIImpact
The API microversion is bumped to 2.13 to add a
new access type, cephx, supported by the driver.

Co-Authored-By: Ramana Raja <rraja@redhat.com>

Implements: blueprint cephfs-driver
Change-Id: I33801215f64eacb9dade4d92f11f659173abb7f5
2016-03-01 20:30:18 +00:00
daiki kato cce155c147 Add space to message in manila_tempest_tests/tests/api/test_shares.py
There isn't space between "for" and "share".
This patch adds space after "for".

Change-Id: Idc904d608cdc8a0df8e60e984824898ce6c58726
2016-02-17 01:51:30 +00:00
Goutham Pacha Ravi f858e537dd Share Replication API and Scheduler Support
This patch provides the scheduler support to filter share
backends matching replication capabilities reported by the
hosts and the replication_type extra_spec provided via the
share_type during share creation.

It also adds wsgi routes, API endpoints and driver entry
routines to support the actions: list, show, create, delete
and promote share replicas. It augments the ShareInstance
DB model with a 'replica_state' attribute and the Share DB
Model with 'replication_type' attribute to support these
workflows.

Replica states are periodically updated from the respective
backends that the replicas are created on.

APIImpact
Impact on existing APIs:
In Microversion 2.11, the /shares APIs return 2 additional
fields during index and show calls for each share: 'has_replicas'
and 'replication_type'. Similarly, the field 'replica_state' is
added to the API response for /share-instances.
Also, deletion of a share that has replicas is forbidden,
returning error code 403.

DocImpact

Co-Authored-By: Alex Meade <mr.alex.meade@gmail.com>

Implements: blueprint manila-share-replication

Change-Id: I10515d55b1291c34777a31d8c6a3a1954f551235
2016-02-11 19:45:37 +00:00
Jenkins 42ddc48dc6 Merge "Return appropriate data on share create" 2016-02-03 19:34:19 +00:00
Goutham Pacha Ravi 2e65c5cf35 Return appropriate data on share create
With the introduction of share instances in the Liberty
release, some attributes of the share model were moved
to the share_instance model. The create API has since
been returning merely the share data which makes
for a bad user experience with some attributes
being set to null.

Fix this issue by retrieving the share from the database
after the instance has been created; so that the status
field reflects the pre-scheduler acceptable status of
'creating'.

Change-Id: I63955e1a60e7ced3ad126829521cd43e0b914c17
Closes-Bug: #1534161
2016-01-21 19:32:09 +00:00
Valeriy Ponomaryov dcbdcf3534 Implement export location metadata feature
Some upcoming features require more than one export location and
possibility to mark them with specific labels like fast/slow or
rw/ro.

So, implement 'export locations metadata' feature:
- It allows to set any key-value pairs for each export location.
- These key-value pairs can be set only by share manager using
  response from various share driver methods.
- Example of update is implemented using Generic driver
  "create_instance" method.
- Metadata can be updated for any export location in any place
  of share manager where db function "share_export_locations_update"
  is called.
- Keys from export location metadata table will be added to 'share' and
  'share instances' views as export location attributes.

Also:
- Add new attr 'is_admin_only' for existing export locations model.
  If set to True, then only admins will be able to see them. Unless
  policy is changed.
- Add APIs for reading export locations by share and share instance IDs.
- Remove 'export_location' and 'export_locations' attrs
  from 'share' and 'share instance' views.
- Bump microversion as new APIs implemented.

APIImpact

Implements bp export-location-metadata

Change-Id: I36d1aa8d9302e097ffb08d239cf7a81101d2c1cb
2016-01-15 12:29:12 +02:00
Valeriy Ponomaryov fde99c896f [CI] Speed up Tempest jobs
Manila CI jobs fail very often exceeding timeout.
So, do several changes to speed up Tempest jobs:

1) Separate NFS and CIFS tests between jobs.
Run NFS jobs on MySQL ones and CIFS on PostgreSQL.

2) Refactor couple of tests removing creation of redundant shares
testing the same things.

3) Increase amount of threads, to minimize probability of
running heavy test suites in one thread.

Change-Id: I6b60db039a96b47386f8ff538d1cb74559691ccc
2015-12-03 16:59:46 +02:00
Valeriy Ponomaryov 3ea5752570 Add 'snapshot_support' attr to share details
Recently was introduced feature where snapshots become optional.

Share started have new attr "snapshot_support". But it is absent in
share payload and, hence, can not be used outside of Manila.

Also, fix lost import of translation function for related snapshot API.

Change-Id: Iddb0cf1e046b9d480a22e79b33c8674a2405362e
Closes-Bug: #1491345
Closes-Bug: #1491346
2015-09-15 23:22:27 +03:00
Marc Koderer 09798caae1 Use Tempest plugin interface
Make use of the Tempest plugin interface instead of copying Manila
files into Tempest. This will remove the burden to port Manila
tests onto Tempest master recurrently.

This ports all existing Manila Tempest test to the new structure.

It uses manila_tempest_tests as new top folder for all Tempest
tests. It follow the model of Heat (see [1]).

[1]: https://github.com/openstack/heat/tree/master/heat_integrationtests

Change-Id: Ie5ed64a6777ed1acf8dd56522c26705ae897596d
Partly-implements: bp tempest-plugin-interface
Depends-On: I26dd32b1de8cceeaa6dc674092efec683df71889
2015-09-05 00:36:33 +00:00