Merge "UCS: node-get-boot-device is failing for Cisco servers"

This commit is contained in:
Jenkins 2015-07-31 06:59:17 +00:00 committed by Gerrit Code Review
commit bbc6281a2d
4 changed files with 8 additions and 6 deletions

View File

@ -25,9 +25,9 @@ Prerequisites
to manage Cisco UCS Managed B/C-series servers.
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
~~~~~~~~~~~~~~~~

View File

@ -10,7 +10,7 @@ pysnmp
python-ironic-inspector-client
python-scciclient>=0.1.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,
# this does not exist on pypi.

View File

@ -36,8 +36,10 @@ LOG = logging.getLogger(__name__)
UCS_TO_IRONIC_BOOT_DEVICE = {
'storage': boot_devices.DISK,
'disk': boot_devices.DISK,
'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`.
"""
return list(UCS_TO_IRONIC_BOOT_DEVICE.values())
return list(set(UCS_TO_IRONIC_BOOT_DEVICE.values()))
@ucs_helper.requires_ucs_client
def set_boot_device(self, task, device, persistent=False, helper=None):

View File

@ -66,7 +66,7 @@ class UcsManagementTestCase(db_base.DbTestCase):
mock_helper.generate_ucsm_handle.return_value = (True, mock.Mock())
mock_mgmt = mock_ucs_mgmt.return_value
mock_mgmt.get_boot_device.return_value = {
'boot_device': 'storage',
'boot_device': 'disk',
'persistent': False
}
with task_manager.acquire(self.context, self.node.uuid,