HPE 3par iSCSI: 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().

Change-Id: I334d91c978a8d0d1cff1edeb6c8cdd5aedf4acfe
This commit is contained in:
raghavendrat 2024-12-06 10:24:16 +00:00
parent 02980528fb
commit e953beffb6
2 changed files with 4 additions and 1 deletions

View File

@ -8945,6 +8945,7 @@ class TestHPE3PARISCSIDriver(HPE3PARBaseDriver):
expected_get_ports = [mock.call.getPorts()]
expected_primera = [
mock.call.is_primera_array(),
mock.call.login(HPE3PAR_USER_NAME, HPE3PAR_USER_PASS),
mock.call.getWsApiVersion()]
mock_client.assert_has_calls(
self.standard_login +

View File

@ -131,10 +131,11 @@ class HPE3PARISCSIDriver(hpebasedriver.HPE3PARDriverBase):
4.0.6 - Allow iSCSI support for Primera 4.2 onwards
4.0.7 - Use vlan iscsi ips. Bug #2015034
4.0.8 - Add ipv6 support. Bug #2045411
4.0.9 - getWsApiVersion now requires login
"""
VERSION = "4.0.8"
VERSION = "4.0.9"
# The name of the CI wiki page.
CI_WIKI_NAME = "HPE_Storage_CI"
@ -147,6 +148,7 @@ class HPE3PARISCSIDriver(hpebasedriver.HPE3PARDriverBase):
client_obj = common.client
is_primera = client_obj.is_primera_array()
if is_primera:
common.client_login()
api_version = client_obj.getWsApiVersion()
array_version = api_version['build']
LOG.debug("array version: %(version)s",