Avoid using "force" kwarg in extend API

The extend API was enhanced with API version
2.64 to support a "force" argument; It's possible
that clients are using older microversions
when interacting with the manilaclient SDK;
by mandating the use of the "force" kwarg,
we introduce a regression. The "ShareManager"
class has microversioned "extend" APIs,
some of which do not accept the "force" kwarg.

Change-Id: I56af42c6c3ece862747ddb62cd1eabdf608b9411
Related-Bug: #1855391
Closes-Bug: #1975488
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
This commit is contained in:
Goutham Pacha Ravi 2022-05-25 02:57:17 +05:30
parent 4e7a23b86e
commit db8eafd838
2 changed files with 8 additions and 2 deletions

View File

@ -95,9 +95,9 @@ class Share(base.Resource):
"""Update the share with the provided state."""
self.manager.reset_state(self, state)
def extend(self, new_size, force=False):
def extend(self, new_size, **kwargs):
"""Extend the size of the specified share."""
self.manager.extend(self, new_size, force=force)
self.manager.extend(self, new_size, **kwargs)
def shrink(self, new_size):
"""Shrink the size of the specified share."""

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixed a regression with the use of the "force" keyword in the "extend" API
in the Share resource. See `LP
#1975488 <https://launchpad.net/bugs/1975488>`_ for more details.