Commit Graph

138 Commits

Author SHA1 Message Date
haixin 37f1564c67 Add doc for service disable reason
Change-Id: Ie2774a16323cf03a741583165fc7079cc8ca096d
2024-03-11 08:56:43 +08:00
Zuul da95114610 Merge "Update Share backup APIs and add api ref" 2023-08-28 21:48:33 +00:00
Zuul 44014e6827 Merge "Allow restricting access rules fields and deletion" 2023-08-28 02:40:24 +00:00
Zuul 54d779c0f4 Merge "[api-ref] add provider_location to snapshots" 2023-08-25 14:13:38 +00:00
Kiran Pawar 3a2d220f8a Update Share backup APIs and add api ref
- Follow up change to fix suggestions from earlier pull request i.e.
  https://review.opendev.org/c/openstack/manila/+/343980 .
- Add API-ref docs
- Rename column availability_zone to availability_zone_id in
  share_backups table.

Implement: blueprint share-backup
Closes-bug: #2031311
Change-Id: Ice01ab7892b1eb52b3202f2c79957977f73f3aca
2023-08-25 13:15:05 +00:00
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
Zuul aafc221027 Merge "Resource Locks: Support for share deletion lock" 2023-08-23 23:27:37 +00:00
Zuul 6527af5a4c Merge "Remove trailing spaces, convert dos2unix" 2023-08-21 19:52:48 +00:00
Goutham Pacha Ravi f641577d8a Resource Locks: Support for share deletion lock
Add CRUD APIs for resource locks with support
for preventing deletion of shares (applies to
soft-deletions and unmanage operations as well).

Change-Id: I146bc09e4e8a39797e22458ff6860346e11e592e
Implements: bp/allow-locking-shares-against-deletion
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
2023-08-18 10:47:25 -07:00
Goutham Pacha Ravi 7705b74a75 [api-ref] add provider_location to snapshots
This optional field was missing in the docs

Change-Id: I86a3161b098652788f8a982053a8efd06a73dbba
2023-08-10 15:00:33 -07:00
Kiran Pawar 0e7812657b Add count info in 'snapshot list' API
Added support for display count info in share snapshot
list&detail APIs:

1. /v2/snapshots?with_count=True
2. /v2/snapshots/detail?with_count=True

New microversion added 2.79

Closes-bug: #2024556
Change-Id: I37d8ca9022e2ea2c107c6695e20e951d7950043a
2023-07-25 08:33:15 +00:00
Stephen Finucane 23e6493dee Remove trailing spaces, convert dos2unix
These are issues that pre-commit identified. Address them now.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I19f7d3689a000c41787b3fe15632564928bbf6a6
2023-06-01 12:11:43 +01:00
Kiran Pawar 8eb38ac41a onlyHostFilter: Fix follow-up suggestions.
1. Change context as first argument to function.
2. Fix spelling mistake in version history
3. Add new host_admin RBAC policy which is applied in onlyHostFilter
since non-admin user as well needs to create share on specific host.

Change-Id: Id2c09ebab874ec983da7f26370932d46a0447801
2023-05-23 07:08:11 +00:00
Zuul cb0b41b85a Merge "[DOC] Add api reference to share network subnet metadata" 2023-04-11 20:28:26 +00:00
renanv 8931cdc17f [DOC] Add api reference to share network subnet metadata
Add the api reference to the feature merged in Antelope release cycle
2023.1 share network subnet metadata

Change-Id: I8143c2652dc9024e3fed5e1ea60b16c86de0a5f2
Closes-bug: #2008028
2023-04-11 14:58:40 -03:00
Clifford Emeka 818f4e1d06 Change the default value for `is_public` for share group type creation
The default value for "is_public" parameter for share group type
creation should be True. However, it is set to `false`. Fix the
error in the documentation and sets the default value of `is_public`
to `true`.

Closes-bug: #1997743
Change-Id: Ia596ec0ffcf16414c6b4a5f0e1631e7a755af23a
2023-04-03 08:56:27 +01:00
haixin b4a0fd9af0 Update micversion to 2.77, support share transfer between project
user can create a transfer for a share. will return transfer id
and auth_key. another user can use transfer_id and auth_key to
accept this share. salt of transfer and auth_key compute crypt_hash
by sha1. then compare with crypt_hash in db.

APIImpact
DocImpact

Partially-Implements: blueprint transfer-share-between-project

Change-Id: I8facf9112a6b09e6b7aed9956c0a87fb5f1fc31f
2023-02-17 16:05:01 +08:00
Kiran Pawar 858939c190 Add 'default_ad_site' field to security service object
Allows to configure optional field 'default_ad_site' from version 2.76.
Restrict to make sure either server or 'default_at_site' provided, but
not both.

APIImpact
Relates-bug: #1988146

Change-Id: I8e21e9170eace134a51efed84de1ccc58eb7eaaa
2023-02-16 09:28:28 +00:00
Kiran Pawar 5f0f14a7f8 Add quiesce_wait_time option to share replica promote API.
Currently netapp_snapmirror_quiesce_timeout is an option of replica
promote that can only be set by the operator. There are scenarios where
high timeout value set by operator does not fit well e.g. disaster
stroke and user want to do an unplanned failover fast. Added new
option 'quiesce_wait_time' to share replica promote API which allows
to use specified wait_time(in seconds) instead of config option.

Closes-bug: #2000171
Change-Id: Ib02063ee8b82f7374cd89f90e7f24a845c6c7cd7
2023-02-08 16:05:28 +00:00
Zuul 232f1816c8 Merge "[api-ref] Fix missing parameters in share network list" 2022-09-16 16:02:36 +00: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
silvacarloss b82175f30d [api-ref] Fix missing parameters in share network list
Share network list API referece was missing some filter parametes.
Add the missing parameters so users can be aware of all the options
available to query share networks.

Closes-Bug: #1945711
Change-Id: I21b4f48d0c41f052aca1d7dcd0f1b640cfa3084a
2022-03-03 17:02:17 -03:00
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
Kiran Pawar 9da023eeb5 Add support of scheduler_hints in share replica create
The OnlyHostFilter added for share creation can be extended to use in
share replica creation using scheduler-hints.

e.g. manila share-replica-create share_id \
	--scheduler-hints "only_host=host@backend#pool"

OnlyHostFilter (https://review.opendev.org/c/openstack/manila/+/813293)

Depends-on: I603434cac246e2c0946672d3f0fe469ed5423fa4
Closes-Bug: #1950313
Change-Id: I2e6d8709fc02df16622bdc910127fa489835db38
2022-02-15 03:21:20 +00:00
Kiran Pawar 746fb7e2df OnlyHostFilter allows user to specify host during share create.
e.g. manila create NFS 1 --name Share1 --share-network net1 \
--scheduler_hint="only_host=host1@generic1#GENERIC1"

Since there is no way to create share server in manila, we can use a
workaround of creating first share on specific host
(e.g. host@backend#pool). This will then create the share server
automatically on that host and admin can use idle host when other
hosts are overloaded.

New microversion 2.67 introduced.

DocImpact

Closes-Bug: #1946462
Change-Id: I603434cac246e2c0946672d3f0fe469ed5423fa4
2022-01-10 10:06:27 +00:00
Zuul 37c41e57cf Merge "Support group specs search for share group type API" 2021-12-21 23:26:46 +00:00
Victoria Martinez de la Cruz 3a1e23801f Support group specs search for share group type API
Add support for group_specs filter search in share group type list API.

Implements: blueprint support-group-spec-search-share-group-type-api
Change-Id: I10caed1d524614a74a75e8f856b0579ab11dc4b5
2021-12-09 17:26:11 +00:00
Zuul c09a5f08c4 Merge "Add api-ref for security service update" 2021-12-08 15:21:06 +00:00
silvacarloss 40da25f286 Add api-ref for security service update
Updates the API reference to fit into the changes merged in the
add/update security service in share networks feature.

Change-Id: Id7dd45dc23c41c1ade28b042f87b216142b8a062
2021-12-06 19:07:13 -03:00
tutkuna d4c0f4a907 [api-ref] Fix datatype of cast_rules_to_readonly
Fixing cast_rules_to_readonly type from string to boolean
for share instances and share replicas.

The API-REF had the wrong type for these fields.

Closes-Bug: #1948717

Change-Id: Ie8defe1fcb03bced9887ba1b41d5b062ba477924
2021-12-02 00:39:34 +00:00
haixin fb1aaa93ff [doc] update doc about query user message
Change-Id: I22d35ac31f024712a2bdd6df307682de04301c22
2021-11-10 11:37:42 +08:00
Zuul dd8f1aeee8 Merge "Fix api-ref for access rules" 2021-09-28 17:46:32 +00:00
Chuan Miao 7e7ec7337c Add Share Affinity/Anti-Affinity Scheduler Filters
This patch implements hard affinity and anti-affinity filter for
manila scheduler. Users can specify affinity/anti-affinity share
ids to the field "share.scheduler_hints.same_host" or
"share.scheduler_hints.different_host" in the request payload
when creating a manila share. The scheduler_hints are stored as
share metadata. The filter properties are populated from this
metadata during share migration and so filters will be applied
for share migration as well.

Both fields can be a single share UUID or multiple uuids
separated by comma. For example,

`{
    "share": {
        "scheduler_hints": {
            "same_host": "share_uuid_1,share_uuid_2",
            "different_host": "share_uuid_3"
        }
    }
}`

Implements: bp/affinity-antiaffinity-filter

Change-Id: Ic42d8a0c1d22e77ae64e0ca014607b28fd336467
Co-authored-by: Maurice Escher <maurice.escher@sap.com>
2021-09-03 08:58:46 +02: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 3457fc62f9 Merge "Update api-ref documentation" 2021-07-28 22:25:39 +00:00
ashrod98 bf2c40e3ff Update api-ref documentation
Adds message id, expires_at, created_at parameters to user messages in
response body.

Updates share_types response body to account for extra_specs object including
snapshot_support, create_from_snapshot_support, mount_snapshot_support,
revert_to_snapshot_support, replication_type, and
driver_handles_share_servers.

Change-Id: I408dcf5fdbf2f12eb1dc0ce80232d4e710cef765
2021-07-28 14:21:20 +00:00
kpdev df3382d960 Add documentation for per share gigabytes quotas
Update documentation to fit into the new manila quota key:
- `per_share_gigabytes`

Closes-Bug: #1918959
Change-Id: If0bbac2d153348f26f5b60cba3eb492926aa53c5
2021-05-24 09:18:31 +02:00
Zuul ad4315eb36 Merge "Add api reference for share server migration" 2021-04-07 11:33:44 +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
Maurice Escher aa62a8090e
add additional driver data to migration get progress view
new field `details` is introduced with microversion 2.59

Change-Id: I91d455c585ff546cc65e57e8560f126a280eac8d
Closes-Bug: #1902854
2021-01-25 09:50:35 +01:00
silvacarloss 256c18d6c2 Add api reference for share server migration
Add documentation to the share server migration APIs introduced
during Victoria release.

Partial-bug: #1897903

Change-Id: I13d13c38a3869929bbfdf8083529a597d7982a16
2021-01-06 09:04:23 -03:00
vrushti 295adb71bf Documentation for Share Migration Ocata Improvements.
Implemented several improvements to share migration in documentation
according to https://review.opendev.org/#/c/406305/

Summary of changes:

 - Add driver-assisted mandatory parameters.
 - Removed previous API documentation because support for them isn't
   there anymore after the backwards incompatible changes were
   made via https://review.opendev.org/#/c/406305/.
 - Add force-host-assisted migration.

Change-Id: I6d446b4037a3a9991e375f0a8bfb1f6edce09c1f
Closes-Bug: #1658230
2020-09-22 19:24:16 -03:00
Douglas Viroel 56a6b39aa0 Improve IPv6 documentation for access rules
This patch improves the access rules API documentation
to include IPv6 information that was missing.
It includes a note on user guide and changes an access list
example to IPv6.

Change-Id: I5a9ff4e3c8a70cb0b14caa39f5f17740b17b719a
Closes-Bug: #1705045
Signed-off-by: Douglas Viroel <viroel@gmail.com>
2020-09-10 10:19:50 -03:00
Zuul 5d2294268a Merge "Update Share types api-ref" 2020-08-21 22:58:24 +00:00
Zuul a6f86e53c5 Merge "Add api-ref for share network subnets" 2020-08-20 22:43:47 +00:00
silvacarloss c650b63d33 Updates the API reference for some share operations
Added missing `user_id` field to the response of share create,
show and manage operations.

Change-Id: I1e7244185d44bff2df85b09c4566836a26c84376
Closes-Bug: #1821837
2020-08-13 12:53:50 +00:00
Goutham Pacha Ravi 271214a051 Update Share types api-ref
Was missing a query parameter (is_public)
and some information on an existing query
parameter (extra-specs)

Change-Id: Ib70e08c963cf1f583ab6d5fbae6a69aa3593980a
Closes-Bug: #1816486
2020-08-06 17:06:21 -07:00