From e953beffb6dddf608c0f37041f9ef95da1840418 Mon Sep 17 00:00:00 2001 From: raghavendrat Date: Fri, 6 Dec 2024 10:24:16 +0000 Subject: [PATCH] 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 --- cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py | 1 + cinder/volume/drivers/hpe/hpe_3par_iscsi.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py b/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py index 3079dea5cc0..59e0b5bdd29 100644 --- a/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py +++ b/cinder/tests/unit/volume/drivers/hpe/test_hpe3par.py @@ -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 + diff --git a/cinder/volume/drivers/hpe/hpe_3par_iscsi.py b/cinder/volume/drivers/hpe/hpe_3par_iscsi.py index 15cafd14b1a..24e48cb24e6 100644 --- a/cinder/volume/drivers/hpe/hpe_3par_iscsi.py +++ b/cinder/volume/drivers/hpe/hpe_3par_iscsi.py @@ -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",