From c1c1133a7f912f6d4136ace537a1e5d80ec81bb6 Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Wed, 25 May 2022 02:57:17 +0530 Subject: [PATCH] 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 (cherry picked from commit db8eafd838c603407d86b13e226d8d8b028b595e) --- manilaclient/v2/shares.py | 4 ++-- ...88-skip-force-kwarg-if-unspecified-f98c717df1d6e364.yaml | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/bug-1975488-skip-force-kwarg-if-unspecified-f98c717df1d6e364.yaml diff --git a/manilaclient/v2/shares.py b/manilaclient/v2/shares.py index 42026c8e6..51ae6795c 100644 --- a/manilaclient/v2/shares.py +++ b/manilaclient/v2/shares.py @@ -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.""" diff --git a/releasenotes/notes/bug-1975488-skip-force-kwarg-if-unspecified-f98c717df1d6e364.yaml b/releasenotes/notes/bug-1975488-skip-force-kwarg-if-unspecified-f98c717df1d6e364.yaml new file mode 100644 index 000000000..07efb9c0e --- /dev/null +++ b/releasenotes/notes/bug-1975488-skip-force-kwarg-if-unspecified-f98c717df1d6e364.yaml @@ -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 `_ for more details.