Commit Graph

742 Commits

Author SHA1 Message Date
Zuul
2fcf110f24 Merge "Use time.sleep() instead of eventlet.sleep()" 2024-12-06 23:02:16 +00:00
Carlos Eduardo
3c1c8b8593 Fix broken exception handling on unit tests
Unit tests are now broken for python-manilaclient. We used to
expect an argparse exception for some cases but now we should be
expecting a ParserException.

Change-Id: Ibf47932ff848906d8d71a0affe2af564ba962abb
2024-12-06 12:10:23 -03:00
Cyril Roelandt
3273229f9c Use time.sleep() instead of eventlet.sleep()
In a patched environment, time.sleep will be eventlet.sleep, so this
does not have any actual impact, but it removes one direct dependency on
eventlet.

Change-Id: I1603cfa94c44c9fdd4c79e332ca981f6c9f05625
2024-11-12 23:02:11 +01:00
Carlos Eduardo
baa0091d53 Add ensure shares command
Added a new command to trigger the ensure shares API.

Change-Id: If40328c83ec4c87d727aceac89a1a14b9fd8a25d
Signed-off-by: Carlos Eduardo <ces.eduardo98@gmail.com>
2024-10-30 11:04:30 -03:00
Zuul
80950ea18b Merge "Metadata for share export location" 2024-10-09 07:24:47 +00:00
Clifford
5ba65e94e4 Metadata for share export location
Adds set and unset commands for export location
properties within unified CLI

Depends-On: Icf096a5cbc650f02eca68d714c876eb854499b9b
Partially-implements: bp metadata-for-share-resources
Change-Id: I3878868c2359fba7aa8a49421a31a952a5776766
2024-09-04 22:23:11 +00:00
Zuul
87f72498fc Merge "Remove support for Identity v2 API" 2024-08-28 22:49:40 +00:00
Zuul
e58355919c Merge "Added "--wait" option for creating/deleting a share group snapshot" 2024-08-28 22:49:39 +00:00
tspyderboy
d24527a7f4 Handle empty metadata properly in filter/list
Introduced "None" tag for metadata command.
"list --metadata None" command will filter out shares that has empty metadata, i.e., metadata={}
Closes-Bug: #1782847
Change-Id: Iac33cd1295b1e7c2ff11e6d7bd003fde28785c0e
2024-08-14 15:36:38 +00:00
Takashi Kajinami
a415eeadc6 Remove support for Identity v2 API
Identity v2 API was removed from Keystone in Queens release.

Change-Id: I9efc4cc8c1cdfb83b8c3bb0da8efabb9692332da
2024-08-05 18:48:22 +09:00
Zuul
e12db73f85 Merge "Add "--wait" option for creating/promoting/deleting a share replicas" 2024-07-31 18:35:52 +00:00
Carlos da Silva
c8b1665d63 Add new filter options for share server list
After share server migration and manage/unmanage of share servers
were implemented, share servers can be filtered by their source
share server ID field, as well as the back end identifier. So we
add these fields to the share servers list to be used as a search
option.

Change-Id: I8071f7218101f9fcee059d943494b5914a89ba1a
Closes-Bug: #2068631
2024-07-23 13:10:07 +00:00
Zuul
85f2173217 Merge "Don't set availability_zone for 2.32 version of api" 2024-05-22 01:43:22 +00:00
morozovalekseywot
ae363bdf08 Don't set availability_zone for 2.32 version of api
Closes-Bug: #2065769
Change-Id: Id0c7dc63e6dca5d32cf1cf8983588d44601b4338
2024-05-21 13:05:44 +03:00
morozovalekseywot
48fbad6f62 Fix show info about share network
Add check for _info dict, without this check an exception will occur and user doesn't get info.

Closes-Bug:#2065771
Change-Id: I0b0dba95c53aad264921dc32644ee8e5b86fc1e2
2024-05-15 17:45:55 +00:00
Zuul
56ba694486 Merge "adds bandit testing and Zuul CI job." 2024-05-11 03:14:50 +00:00
annwesha.das
1dceeb36bd adds bandit testing and Zuul CI job.
adds a job to project.yaml Zuul CI file to run the Bandit
test environment

Change-Id: I76bafa2a444e277e895e510bc53603da0295d88b
2024-05-01 00:23:11 +00:00
tspyderboy
789e65bee3 Add "--wait" option for creating/promoting/deleting a share replicas
1) Creating a share replica
$ manila share-replica-create share1 --az manila-zone-1 --wait
<CLI waits on the share replica to become available before providing replica details>
(The CLI does not wait for "replica_state" to become "in_sync" - it only waits until the replica reaches an "available"
status)

2) Promoting a share replica
$ manila share-replica-promote 9b6b909b-3790-4a65-a89d-f9437496f171 --wait
<CLI waits on the share replica's "replica_state" to become "active" before returning to the prompt>

3) Deleting a share replica
$ manila share-replica-delete 9b6b909b-3790-4a65-a89d-f9437496f171 --wait
<CLI waits on the share replica to be deleted before returning to the prompt>

Closes-Bug: #1898310
Change-Id: If269c708c894756c0223e3bfa173670bcc6ef763
2024-04-10 02:13:16 +05:30
Zuul
9e81815674 Merge ""--wait" option added for snapshot create/revert/delete commands" 2024-04-01 14:55:23 +00:00
Takashi Kajinami
0510ccbd61 Remove --nova-net-id option
Support for nova-network was removed from manila during Ocata cycle[1],
and nova-network was actually removed from nova several cycles ago.

[1] b213a25c44c0d49edefaa17d3a4de7a88c3c2de0

Change-Id: I4e9d4c7459fcae7bee8ff4919b61f22811336423
2024-03-28 00:45:48 +09:00
tspyderboy
9a29099b31 Added "--wait" option for creating/deleting a share group snapshot
1) Creating a share group snapshot
$ manila share-group-snapshot-create --name share-group-snap-1 --wait
<CLI waits on the share group snapshot to become available before providing group snapshot details>

2) Deleting a share group
$ manila share-group-snapshot-delete share-group-snap-1 --wait
<CLI waits on the share group snapshot to be deleted before returning to the prompt>

Closes-Bug: #1898319

Change-Id: Id8e4a7c4808152a41b35ec2e6c09f1d439cf14e2
2024-03-26 19:07:53 +05:30
tspyderboy
202f65bd83 "--wait" option added for snapshot create/revert/delete commands
1) Creating a snapshot:
$ manila snapshot-create share1 --name testshare1snapshot --wait
<CLI waits on the share snapshot to become available before providing snapshot details>

2) Deleting a snapshot:
$ manila snapshot-delete testshare1snapshot --wait
<CLI waits on the share snapshot to be deleted before returning to the prompt>

3) Reverting a share to its snapshot:
$ manila revert-to-snapshot testshare1snapshot --wait

Closes-Bug: #1898307
Change-Id: Ib248e48c53c4c6c5886f2693e3bc26a0848fff3a
2024-03-26 16:11:23 +05:30
tspyderboy
3103b8c56a "--wait" option added for managing/unmanaging a share snapshot
Implements: Add "--wait" to asynchronous operation commands
Closes-Bug: #1898312
Change-Id: I354ca855352228911f809769ce89d06af8dd9f61
2024-03-20 09:04:58 +05:30
jayaanand.borra@netapp.com
b097cec84f Human readable export location CLI changes
OpenStack CLI option is added to support user friently export location.

example command:
$ openstack share create nfs 1 --name share_name --mount-point-name custom_export_path

partially-implements: bp human-readable-export-locations
Depends-On: I72ac7e24ddd4330d76cafd5e7f78bac2b0174883
Change-Id: If896065a74fc4ebabd09b677e5eb0329cecfaab9
2024-03-11 13:47:12 -04:00
Zuul
5907822db6 Merge "[OSC] Fix output format for osc share subnet create" 2024-03-04 18:19:29 +00:00
Zuul
06e96b7a0b Merge "[OSC] Add OSC Functional Tests Snapshot Instances" 2024-02-29 13:32:52 +00:00
Zuul
5fd1e894d0 Merge "CLI for disable service reason" 2024-02-28 23:40:06 +00:00
haixin
67cadf3831 CLI for disable service reason
Adds cli option to allow users to give reason
for service-disable.

Closes-Bug: #2037700
Depends-On: I3d7c46945366ac9e1d305c2f6de2233859259bf7

Change-Id: I0b6ac3a3a16a3eaa56758bc0b7f77bfbf2eef9e7
2024-02-27 09:44:28 +08:00
Zuul
fb9137d167 Merge "Fix list call when search_opts isn't provided" 2024-02-20 12:11:46 +00:00
Zuul
91bd8fc327 Merge "Fix share force delete case" 2024-02-17 00:27:23 +00:00
Zuul
8fd50c30e9 Merge "Fix "per_share_gigabytes" in "openstack quota set"" 2024-02-06 07:15:03 +00:00
Kiran Pawar
99be0ce9cc Fix share force delete case
Manilaclient force delete sends two REST requests, first
force delete and then delete. Fix it.

Change-Id: I8257c04f2b5f1a02533dc0fa5d37ae6ff923a56a
Closes-Bug: #2051737
2024-02-01 07:39:07 +00:00
Takashi Kajinami
5a2c000557 Bump hacking
hacking 3.0.x is too old.

Change-Id: I1fa5bf30150c4d6fa38d4103f652fb6b82963cf3
2024-01-27 23:27:41 +09:00
Goutham Pacha Ravi
3ec364d1fd Fix "per_share_gigabytes" in "openstack quota set"
The "per_share_gigabytes" quota param was introduced
in API version 2.62; when using older API versions,
we shouldn't be setting this parameter.

Closes-Bug: #2047249
Change-Id: I1eceee52726cef3494648521e4516010ca02f095
2024-01-26 11:43:49 -08:00
sdailey
d66d7b1d14 Fix list call when search_opts isn't provided
Added line to the list implementation versions 2.35 to 2.68 to point
the search_opts variable to an empty dict if it was set to none.

Closes-bug: #1967312
Change-Id: Ibbd95047ad082665c323f58b735e843d32001c45
2024-01-04 19:46:36 +00:00
Zuul
64f58141bb Merge "Fix default share type resolution in OSC" 2023-10-02 19:27:40 +00:00
Goutham Pacha Ravi
a870c13cf1 Fix default share type resolution in OSC
This patch also fixes an incorrect docstring
in the share types SDK method.

Closes-Bug: #2030686
Change-Id: Iaea9746e6f4e133574f5504d906a49cc80fa4243
2023-09-22 20:05:03 +00:00
Goutham Pacha Ravi
244e87af2f Fix "test_share_access_show" osc functional test
The "updated_at" attribute on access rules is
now properly set in manila, and can no longer
be empty.

Related-Bug: #2031193
Change-Id: I9c24aff7dc88c628aaf9419cd75f23357fede050
2023-09-18 17:55:14 -04:00
Goutham Pacha Ravi
946c11373f Fix decoder path and add transfer commands
the file path to the decoder is better resolved
with the module path.

share transfer commands exist in the manila
shell, it'll be helpful to show the OSC translations
to these as well.

Implements: bp/openstack-client-support
Change-Id: I85d7ebd5c5c34c95402c0ea95f358bef91d26657
2023-09-12 18:56:23 +00:00
Ashley Rodriguez
3628f3d498 [OSC] Add OSC Functional Tests Snapshot Instances
Adds osc functional tests for share snapshot instances
show, list, and set

Partially-implements: bp openstack-client-support
Change-Id: I9f6f5adbd7905a23b2fcfafc204e0477983bb630
2023-09-12 15:13:00 +00:00
Zuul
2cdbf4eccb Merge "Deprecate "manila" CLI client" 2023-08-31 18:21:59 +00:00
Zuul
8a3f65bf2f Merge "Implement share backup" 2023-08-31 14:30:51 +00:00
Kiran Pawar
5e24577904 Implement share backup
Add share backup feature. This will allow the user to create,
restore and delete backups as well as listing backups and showing
the details of a specific backup.

Implement: blueprint share-backup
Depends-On: Ice01ab7892b1eb52b3202f2c79957977f73f3aca
Change-Id: I2c3848cbbeb921ede74756e25e58ef82277e0d2b
2023-08-29 06:59:35 +00:00
silvacarloss
4eccd68794 Allow restricting access rules
Access rules can now have the visibility of sensible fields
restricted, as well as the deletion can be prevented.

To do so, two new parameters were implemented in the access create
command: `restrict_visibility` and `restrict_deletion`.

In order to drop the delete restriction, users must specify
the `unrestrict` option while issuing the share access delete
command.

Depends-On: Iea422c9d6bc99a81cd88c5f4b7055d6a1cf97fdc

Change-Id: I31899a563c621e6f799e320fd990f9e510a8a9cc
2023-08-28 01:30:56 +00:00
Goutham Pacha Ravi
1734b45fa5 Support for resource locks
Add OSC and SDK interfaces to create,
view, update and delete resource locks.

Depends-On: I146bc09e4e8a39797e22458ff6860346e11e592e
Partially-Implements: bp allow-locking-shares-against-deletion
Change-Id: Ib8586a4f80aa8c172d876c6745ae73b7bdaf4705
2023-08-23 16:25:56 -07:00
Goutham Pacha Ravi
ba9a388786 Deprecate "manila" CLI client
This has been a long time coming; we have finally
reached full feature parity and new features have
only been permitted in the openstack CLI plugin for
a couple of releases now.

We're signalling a major version bump for the package
with this change.

Implements: bp/openstack-client-support
Change-Id: I0a72883f1cd8a5ab9df9c349b6876248fe9edee3
2023-08-23 22:10:03 +00:00
Kiran Pawar
7a15a2a1ae Add '--count' option for snapshot list API.
Added support for display count info in share snapshot list
and detail APIs:

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

Microversion upgraded to 2.79

Related-Bug: #2024556
Depends-On: I37d8ca9022e2ea2c107c6695e20e951d7950043a
Change-Id: I230c2195c414eec28ebc5e5e9714726731307a95
2023-08-18 12:12:47 +00:00
lkuchlan
2f6cd660c6 Enable the option to return the response body
As a continuation of the patch mentioned below:
https://review.opendev.org/c/openstack/python-manilaclient/+/890330

Change-Id: I4c1c1e089a726608124693c13eca73ce12fd5b8e
2023-08-09 10:39:03 +03:00
lkuchlan
47b0ac7d59 Enable the option to return the response body
As part of our efforts to enhance automation and CI for Manila,
we have begun developing code in the Tobiko tool to support the
Manila client. During create/get operations, we have observed
that the returned body contains solely the resource id in the
format <Share: <id>>.
To address this, we are introducing a patch that allows retrieving
the full body response, not just the id resource.

Change-Id: Ia15274e75aa5d3da04d861a64a2f437cd4a9a584
2023-08-03 13:16:30 +03:00
Zuul
8e1b721fc3 Merge "Metadata for Share Network Subnets" 2023-07-10 13:14:39 +00:00