Fix regression breaking Ironic boot-from-volume
After the recent openstacksdk patches, the volume code uses the SDK's get_node instead of the local _get_node wrapper, causing the resulting object to not have a UUID field that Nove expects. This change proposes the minimum possible fix to unwedge the CI. Change-Id: I8165628877f887553bf7b36da301ee062d29621c
This commit is contained in:
@@ -2332,7 +2332,8 @@ class IronicDriverTestCase(test.NoDBTestCase):
|
||||
props = self.driver.get_volume_connector(instance)
|
||||
|
||||
self.assertEqual(expected_props, props)
|
||||
self.mock_conn.get_node.assert_called_once_with(node_uuid)
|
||||
self.mock_conn.get_node.assert_called_once_with(
|
||||
node_uuid, fields=mock.ANY)
|
||||
self.mock_conn.volume_connectors.assert_called_once_with(
|
||||
node=node_uuid, details=True,
|
||||
)
|
||||
@@ -2392,7 +2393,8 @@ class IronicDriverTestCase(test.NoDBTestCase):
|
||||
props = self.driver.get_volume_connector(instance)
|
||||
|
||||
self.assertEqual(expected_props, props)
|
||||
self.mock_conn.get_node.assert_called_once_with(node_uuid)
|
||||
self.mock_conn.get_node.assert_called_once_with(
|
||||
node_uuid, fields=mock.ANY)
|
||||
self.mock_conn.volume_connectors.assert_called_once_with(
|
||||
node=node_uuid, details=True,
|
||||
)
|
||||
|
||||
@@ -2003,7 +2003,7 @@ class IronicDriver(virt_driver.ComputeDriver):
|
||||
:param instance: nova instance
|
||||
:return: A connector information dictionary
|
||||
"""
|
||||
node = self.ironic_connection.get_node(instance.node)
|
||||
node = self._get_node(instance.node)
|
||||
properties = self._parse_node_properties(node)
|
||||
connectors = self.ironic_connection.volume_connectors(
|
||||
details=True,
|
||||
|
||||
Reference in New Issue
Block a user