Commit Graph

22 Commits

Author SHA1 Message Date
silvacarloss 0f82690ddd Allow restricting access rules fields and deletion
Access rules rules allow API will now take three additional
parameters:

- lock_visibility: when True, only services, administrators and
  the same user will be able to see the content of ``access_to`` and
  access_key.

- lock_deletion: when True, the access rule will be locked for
  deletion. Only services, administrators or the user that placed
  the lock will be able to drop the access rule.

- lock_reason: a reason for the lock. This parameter should only
  be provided in the presence of at least one of the former
  parameters.

In order to delete an access rule that is currently locked, the
requester will need to specify ``unrestrict=True`` in the request.

In case a service placed the restrictions, only the own service or
the system administrator will be able to release it.

This change also implements filters to the access list API. It is
now possible to filter access rules based on `access_to`,
`access_type`, `access_level` and `access_key`.

DocImpact

Change-Id: Iea422c9d6bc99a81cd88c5f4b7055d6a1cf97fdc
2023-08-24 14:53:06 -03:00
Goutham Pacha Ravi 95b44453b5 [DOC] Replace references to policy.json
The override file now supports yaml format. While
JSON formatting is absolutely fine, the file suffix
".json" will confuse our tooling.

Change-Id: I01ce4ab3e879a8dbbc7377997f7e497f15c9b15e
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2022-07-05 15:11:25 +00:00
Goutham Pacha Ravi 88cec4f2c5 Fix headings in the API ref
openstackdocstheme's custom styling doesn't display (h1)
headings in the body of the API ref. To work-around this
problem, demote the section headers and increase
the display level of the toctree.

Change-Id: I18b6ab44b62c4f17d854e5d32b4aef546992c79a
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2022-03-25 01:56:30 +05:30
haixin d51eb05c05 Update micversion to API2.69, Manila share support Recycle Bin
Add support share Recycle Bin, the end user can soft delete
share to Recycle Bin, and can restore the share within 7 days,
otherwise the share will be deleted automatically.

DocImpact
APIImpact
Partially-Implements: blueprint manila-share-support-recycle-bin

Change-Id: Ic838eec5fea890be6513514053329b1d2d86b3ba
2022-02-19 02:02:06 +08:00
Goutham Pacha Ravi 18741fe632 Fix api-ref for access rules
The key for access rule metadata in the API
request or response is just "metadata".

The "access_key" in /share-access-rules
endpoint responses doesn't need to specify
a min-version since its present in all API
versions that the endpoint itself is supported
with.

TrivialFix

Change-Id: I66ac3804f22d70ad673eb7185e5e7eb08843c811
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-08-31 21:10:56 +00:00
haixin cdbc428b69 Extend share will go through scheduler
Add an force parameter to the API layer that lets the user choose
whether to go through the scheduler or not, which is boolean.and
default is False,set True means extend share directly, set False
means extend share will go through scheduler.
Add an new min_version 2.64 to extend share api. force parameter
only support min_version >= 2.64.

Closes-Bug:#1855391
Change-Id: I6da36a687a37c78a7fb7d3f252318d03d4a05133
2021-08-27 05:35:45 +00:00
Zuul 50401393c7 Merge "[api-ref] Fix incorrect parameters" 2021-03-23 01:34:21 +00:00
Goutham Pacha Ravi 2eab5de885 [api-ref] Fix incorrect parameters
Some of the response parameters for the
/shares APIs were either incorrect or
out of date. These inconsistencies
were discovered by Ashley Rodriguez
when working on the openstacksdk
integration for these APIs.

Change-Id: I475a7e4df2ee6924699b97c196f1958d4885c01d
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-02-12 18:17:24 -08:00
Goutham Pacha Ravi de29398128 [doc] remove project_id from api endpoints
As of API version 2.60, a project_id is no
longer needed in the API URLs.

Fix the docs to indicate that.

Also fix up a few quota parameters that use
project_id in a different place in the API path.

Change-Id: I24b32c8521805a7d67d512d36d644c0f07c532ea
Implements: bp remove-project-id-from-urls
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2021-02-09 21:59:07 -08:00
Goutham Pacha Ravi f185ff0f44 [api-ref] De-duplicate date and time parameters
Many APIs present information when the resource
in question was 'created_at' and 'updated_at'.

Having common parameters is easier to maintain in
the documentation since the description is the same
across the board.

Change-Id: Ia5d4ac399fe0d7983c61f5c5e0245d0987e97d6a
Partial-Bug: #1760644
2019-04-04 15:59:32 +00:00
Thomas Bechtold d7140ffe09 [api-ref] Replace "tenant" terminology with "project"
Nowadays "project" and "project_id" are used instead of "tenant" in
the OpenStack world. See [1] and [2].

- Replace "tenant_id" in the API paths to "project_id"
- For most manila resources, the "project_id" in an API response body
  refers to the project that owns the resource. So, create a unified
  parameter and share that across the APIs.
- Fix path variable names, and their order
- Fix usage of "UUID" to refer to project and user IDs
- Fix query parameters

[1] https://docs.openstack.org/operations-guide/ops-projects-users.html
[2] https://developer.openstack.org/api-ref/identity/v3/index.html#projects

Partial-Bug: #1760644
Co-Authored-By: Goutham Pacha Ravi <gouthampravi@gmail.com>
Change-Id: I64e4ef8ad258d07c7d80d11a4d015c4b82156722
2019-04-04 08:58:01 -07:00
Goutham Pacha Ravi 41d243c394 [doc][api-ref] Fix annotation and missing parameters
- Call out the maximum API version in Stein (2.49)
- Add parameter 'cast_rules_to_readonly' to share instance API ref
- Remove parameters 'export_location' and 'export_locations' from
  share instance API ref.
- Add "min_version" and "max_version" annotations on parameters
  where missing.
- Add "versionadded" annotation to APIs
- Add "DEPRECATED" annotation to deprecated APIs along with
  a warning message.

Identical changes to the manage/unmanage APIs are handled
in https://review.openstack.org/#/c/647973/

Partial-Bug: #1760644
Change-Id: I5342cc26d1cbeea8ca3d55868e0f69d525333421
2019-03-27 20:09:29 +00:00
Goutham Pacha Ravi 5cd643785d [doc][api-ref] Clarify manage/unmanage APIs
Clarify the usage of these APIs wrt DHSS=True/False
drivers.

Partial-Bug: #1818758
Partial-Bug: #1760644
Change-Id: I0fb239a44dee5b2c8da1d469ae761e780d14b4b2
2019-03-26 23:54:05 -07:00
zhongjun2 22656d097c Add api ref for access rule metadata feature
Partially-implements: bp metadata-for-access-rule
Change-Id: Icbac8ec427e23f6a781a7d3e682fe4852fa16179
2019-02-14 17:15:31 -08:00
junboli acf8c99e9b Use rest_status_code for api-ref response codes
Rather than our freeform way of listing response codes in our
api-ref, we should be using the os-api-ref extension option to
get nicely formatted response code listings.

https://docs.openstack.org/os-api-ref/latest/usage.html#rest-status-code

Change-Id: Ibafafa2f9c3b301b5cdd9b1cb3b8b6d678faa731
2018-03-24 01:07:16 +00:00
zhongjun b04fa3998c [Doc] Fix access rule description in api-ref
Added ipv6 description in ip rule.
Change user rule characters long from 32 to 255.

Change-Id: Ief71b9912c2c84e0df1d12d303517fa20ff7908b
2017-08-15 02:40:25 +00:00
yangweiwei 5a8c3c11b9 Change to share access list API
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
2017-05-05 17:19:25 +08:00
Goutham Pacha Ravi 64a73b1419 Refactor Access Rules APIs
- Pull up policy check to beginning of the APIs.
- Avoid making access rules changes when one or
  more instances of the share are in an invalid state.
- Add back the per rule share instance access status.
  This restoration provides better visibility for which
  rules were applied successfully.
- Remove 'updating' and 'updating_multiple' as valid
  states for the share instance access rules status.
- Deprecate the access rule state 'new' in favor of
  'queued_to_apply' and the share instance access rules
  status 'out_of_sync' in favor of 'syncing'.

In a new API micro-version:
- Allow access rule changes irrespective of the share's
   access_rules_status.
- Expose new access rule states and share's
  access_rules_status values.

Access rules for each share instance now transition
from 'queued_to_apply' to 'applying' to 'active' or 'error';
and from 'active', 'queued_to_apply', 'applying' or 'error'
to 'queued_to_deny' to 'denying' to 'deleted'.

APIImpact
DocImpact

Partially-implements: bp fix-and-improve-access-rules
Co-Authored-By: Mike Rooney <rooneym@netapp.com>
Change-Id: Ic25e63215b5ba723cbc8cab7c51789c698e76f28
2017-01-19 15:02:58 -05:00
Clinton Knight d4a379d083 Implement share revert to snapshot
This commit adds the ability for Manila to revert a
share to the latest available snapshot.

The feature is implemented in the LVM driver, for
testing purposes.

APIImpact
DocImpact
Co-Authored-By: Ben Swartzlander <ben@swartzlander.org>
Co-Authored-By: Andrew Kerr <andrew.kerr@netapp.com>
Implements: blueprint manila-share-revert-to-snapshot
Change-Id: Id497e13070e0003db2db951526a52de6c2182cca
2017-01-17 15:06:01 -05:00
Ha Van Tu 46584eeec9 [api-ref] Refactor share actions API documentation
This patch makes share actions API documentation be more readable
and maintainable.

Change-Id: I388bdc4d9f22eda50fbede1106afebba6ceb355f
2016-12-28 14:24:16 +07:00
Ramana Raja 0d4f2ee4e0 add access_key to share_access_map
For backends with internal authentication system,
e.g. Ceph, that return ``access_key`` (credential) for
client identities that are granted share access:

* Retrieve ``access_key`` as return value of driver's
  update_access()

* Store ``access_key`` in ShareAccessMapping model

* Expose it in access_list API

APIImpact

DocImpact

Partially implements bp auth-access-keys

Co-Authored-By: John Spray <jspray@redhat.com>

Change-Id: I486064f117cf3001dba7735ca92a7d89aee3ce5b
2016-08-22 20:41:19 +05:30
Daniel Gonzalez 3e86e3deac Migrate API reference into tree
The API Documentation team has requires [1] that
projects maintain their api-reference in-tree and
build it to the developer.openstack.org website.

This version of the API reference uses os-api-ref
and compiles API documentation close to that of
the OpenStack compute service (nova).

Co-Authored-By: Goutham Pacha Ravi <gouthamr@netapp.com>

[0] http://lists.openstack.org/pipermail/openstack-dev/2016-May/093765.html

Implements: bp move-manila-api-reference-in-tree
Change-Id: I67bb3354162d6e0e00fa2788edde864cc14920ee
2016-07-25 15:55:00 +00:00