Change ibmcclient compatible version

And fix a couple of things to adapt to latest release.

Change-Id: I1cf2dadcfa66975f7f5020ca97a75ebf7b055d4a
This commit is contained in:
Riccardo Pittau 2020-05-15 14:48:58 +02:00
parent f6b9f34358
commit 805a785a3a
5 changed files with 10 additions and 6 deletions

View File

@ -17,7 +17,7 @@ sushy>=3.2.0
ansible>=2.7 ansible>=2.7
# HUAWEI iBMC hardware type uses the python-ibmcclient library # HUAWEI iBMC hardware type uses the python-ibmcclient library
python-ibmcclient>=0.1.0,<0.2.0 python-ibmcclient>=0.2.2,<0.3.0
# Dell EMC iDRAC sushy OEM extension # Dell EMC iDRAC sushy OEM extension
sushy-oem-idrac<=1.0.0 sushy-oem-idrac<=1.0.0

View File

@ -152,7 +152,7 @@ def handle_ibmc_exception(action):
try: try:
return f(*args, **kwargs) return f(*args, **kwargs)
except ibmc_error.ConnectionError as e: except ibmc_error.IBMCConnectionError as e:
error = (_('Failed to connect to iBMC for node %(node)s, ' error = (_('Failed to connect to iBMC for node %(node)s, '
'Error: %(error)s') 'Error: %(error)s')
% {'node': node.uuid, 'error': e}) % {'node': node.uuid, 'error': e})

View File

@ -144,8 +144,8 @@ class IBMCUtilsTestCase(base.IBMCTestCase):
conn = self.mock_ibmc_conn(connect_ibmc) conn = self.mock_ibmc_conn(connect_ibmc)
# Mocks # Mocks
conn.system.get.side_effect = [ conn.system.get.side_effect = [
ibmc_error.ConnectionError(url=self.ibmc['address'], ibmc_error.IBMCConnectionError(url=self.ibmc['address'],
error='Failed to connect to host'), error='Failed to connect to host'),
mock.PropertyMock( mock.PropertyMock(
boot_source_override=mock.PropertyMock( boot_source_override=mock.PropertyMock(
target=constants.BOOT_SOURCE_TARGET_PXE, target=constants.BOOT_SOURCE_TARGET_PXE,

View File

@ -264,8 +264,8 @@ if not ibmc_client:
# Mock iBMC client exceptions # Mock iBMC client exceptions
exceptions = mock.MagicMock() exceptions = mock.MagicMock()
exceptions.ConnectionError = ( exceptions.IBMCConnectionError = (
type('ConnectionError', (MockKwargsException,), {})) type('IBMCConnectionError', (MockKwargsException,), {}))
exceptions.IBMCClientError = ( exceptions.IBMCClientError = (
type('IBMCClientError', (MockKwargsException,), {})) type('IBMCClientError', (MockKwargsException,), {}))
sys.modules['ibmc_client.exceptions'] = exceptions sys.modules['ibmc_client.exceptions'] = exceptions

View File

@ -0,0 +1,4 @@
---
upgrade:
- |
Updates required ibmcclient version for ibmc drivers to 0.2.2.