UCS: node-get-boot-device is failing for Cisco servers
The UCS to Ironic key mapping for supported boot devices was changed in UcsSdk v0.8.2.2. As a result of that, UCS drivers are failing while looking at the UCS to Ironic mapping devices dict. This change would address this problem. Change-Id: Id86c4e2a7dfde552f808fcf83baba4097d9fd0c5 Closes-Bug: #1478452
This commit is contained in:
parent
ccf9d91f0e
commit
eace02d8d6
@ -25,9 +25,9 @@ Prerequisites
|
|||||||
to manage Cisco UCS Managed B/C-series servers.
|
to manage Cisco UCS Managed B/C-series servers.
|
||||||
|
|
||||||
Install ``UcsSdk`` [1]_ module on the Ironic conductor node.
|
Install ``UcsSdk`` [1]_ module on the Ironic conductor node.
|
||||||
Required version is 0.8.1.9::
|
Required version is 0.8.2.2::
|
||||||
|
|
||||||
$ pip install "UcsSdk==0.8.1.9"
|
$ pip install "UcsSdk==0.8.2.2"
|
||||||
|
|
||||||
Tested Platforms
|
Tested Platforms
|
||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~
|
||||||
|
@ -10,7 +10,7 @@ pyghmi
|
|||||||
pysnmp
|
pysnmp
|
||||||
python-scciclient
|
python-scciclient
|
||||||
python-seamicroclient>=0.4.0
|
python-seamicroclient>=0.4.0
|
||||||
UcsSdk==0.8.1.9
|
UcsSdk==0.8.2.2
|
||||||
|
|
||||||
# The drac and amt driver import a python module called "pywsman", however,
|
# The drac and amt driver import a python module called "pywsman", however,
|
||||||
# this does not exist on pypi.
|
# this does not exist on pypi.
|
||||||
|
@ -36,8 +36,10 @@ LOG = logging.getLogger(__name__)
|
|||||||
|
|
||||||
UCS_TO_IRONIC_BOOT_DEVICE = {
|
UCS_TO_IRONIC_BOOT_DEVICE = {
|
||||||
'storage': boot_devices.DISK,
|
'storage': boot_devices.DISK,
|
||||||
|
'disk': boot_devices.DISK,
|
||||||
'pxe': boot_devices.PXE,
|
'pxe': boot_devices.PXE,
|
||||||
'read-only-vm': boot_devices.CDROM
|
'read-only-vm': boot_devices.CDROM,
|
||||||
|
'cdrom': boot_devices.CDROM
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -65,7 +67,7 @@ class UcsManagement(base.ManagementInterface):
|
|||||||
in :mod:`ironic.common.boot_devices`.
|
in :mod:`ironic.common.boot_devices`.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return list(UCS_TO_IRONIC_BOOT_DEVICE.values())
|
return list(set(UCS_TO_IRONIC_BOOT_DEVICE.values()))
|
||||||
|
|
||||||
@ucs_helper.requires_ucs_client
|
@ucs_helper.requires_ucs_client
|
||||||
def set_boot_device(self, task, device, persistent=False, helper=None):
|
def set_boot_device(self, task, device, persistent=False, helper=None):
|
||||||
|
@ -66,7 +66,7 @@ class UcsManagementTestCase(db_base.DbTestCase):
|
|||||||
mock_helper.generate_ucsm_handle.return_value = (True, mock.Mock())
|
mock_helper.generate_ucsm_handle.return_value = (True, mock.Mock())
|
||||||
mock_mgmt = mock_ucs_mgmt.return_value
|
mock_mgmt = mock_ucs_mgmt.return_value
|
||||||
mock_mgmt.get_boot_device.return_value = {
|
mock_mgmt.get_boot_device.return_value = {
|
||||||
'boot_device': 'storage',
|
'boot_device': 'disk',
|
||||||
'persistent': False
|
'persistent': False
|
||||||
}
|
}
|
||||||
with task_manager.acquire(self.context, self.node.uuid,
|
with task_manager.acquire(self.context, self.node.uuid,
|
||||||
|
Loading…
Reference in New Issue
Block a user