HPE 3par: getWsApiVersion now requires login

Earlier the call to getWsApiVersion() worked without login.
Now with new wsapi of 2024, login is required.

This patch makes call to client_login() before getWsApiVersion().

Closes-Bug: #2068795
Change-Id: I30f105ee619386f52bc907f5115c08e0fafb9e42
(cherry picked from commit 1b07bee386)
This commit is contained in:
raghavendrat 2024-06-08 11:52:30 +00:00 committed by Raghavendra Tilay
parent 0ff4262fba
commit 7ab8848a29
2 changed files with 7 additions and 0 deletions

View File

@ -466,6 +466,7 @@ class HPE3PARCommon(object):
# case of a fail-over. # case of a fail-over.
self._get_3par_config(array_id=array_id) self._get_3par_config(array_id=array_id)
self.client = self._create_client(timeout=timeout) self.client = self._create_client(timeout=timeout)
self.client_login()
wsapi_version = self.client.getWsApiVersion() wsapi_version = self.client.getWsApiVersion()
self.API_VERSION = wsapi_version['build'] self.API_VERSION = wsapi_version['build']

View File

@ -0,0 +1,6 @@
---
fixes:
- |
HPE 3PAR driver `Bug #2068795 <https://bugs.launchpad.net/cinder/+bug/2068795>`_:
Fixed: Perform login before invoking getWsApiVersion