Remove commit_required in iDRAC hardware type
The deprecated commit_required attribute in dictionaries returned from various python-dracclient calls has been removed from python-dracclient. This patch removes the iDRAC hardware type's dependency on this attribute. Change-Id: Iaaec6ca325b5ec0a7d9ad80d14a6595ef0bd9a8e
This commit is contained in:
parent
a4718ee7b7
commit
cc10323dbb
@ -109,9 +109,12 @@ def set_config(task, **kwargs):
|
||||
:param task: a TaskManager instance containing the node to act on.
|
||||
:param kwargs: a dictionary of {'AttributeName': 'NewValue'}
|
||||
:raises: DracOperationError on an error from python-dracclient.
|
||||
:returns: A dictionary containing the commit_required key with a boolean
|
||||
value indicating whether commit_bios_config() needs to be called
|
||||
to make the changes.
|
||||
:returns: A dictionary containing the 'is_commit_required' key with a
|
||||
boolean value indicating whether commit_config() needs to be
|
||||
called to make the changes, and the 'is_reboot_required' key
|
||||
which has a value of 'true' or 'false'. This key is used to
|
||||
indicate to the commit_config() call if a reboot should be
|
||||
performed.
|
||||
"""
|
||||
node = task.node
|
||||
drac_job.validate_job_queue(node)
|
||||
|
@ -75,9 +75,14 @@ class DracVendorPassthru(base.VendorInterface):
|
||||
"Required argument : a dictionary of "
|
||||
"{'AttributeName': 'NewValue'}. Returns "
|
||||
"a dictionary containing the "
|
||||
"'commit_required' key with a Boolean value "
|
||||
"indicating whether commit_bios_config() "
|
||||
"needs to be called to make the changes."))
|
||||
"'is_commit_required' key with a Boolean "
|
||||
"value indicating whether "
|
||||
"commit_bios_config() needs to be called "
|
||||
"to make the changes, and the "
|
||||
"'is_reboot_required' key with a value of "
|
||||
"'true' or 'false'. This key is used to "
|
||||
"indicate to the commit_bios_config() call "
|
||||
"if a reboot should be performed."))
|
||||
@task_manager.require_exclusive_lock
|
||||
def set_bios_config(self, task, **kwargs):
|
||||
"""Change BIOS settings.
|
||||
@ -87,9 +92,12 @@ class DracVendorPassthru(base.VendorInterface):
|
||||
:param task: a TaskManager instance containing the node to act on.
|
||||
:param kwargs: a dictionary of {'AttributeName': 'NewValue'}
|
||||
:raises: DracOperationError on an error from python-dracclient.
|
||||
:returns: A dictionary containing the ``commit_required`` key with a
|
||||
:returns: A dictionary containing the ``is_commit_required`` key with a
|
||||
Boolean value indicating whether commit_bios_config() needs
|
||||
to be called to make the changes.
|
||||
to be called to make the changes, and the
|
||||
``is_reboot_required`` key with a value of 'true' or 'false'.
|
||||
This key is used to indicate to the commit_bios_config() call
|
||||
if a reboot should be performed.
|
||||
"""
|
||||
return drac_bios.set_config(task, **kwargs)
|
||||
|
||||
|
@ -621,7 +621,6 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
|
||||
mock_commit_config.return_value = '42'
|
||||
mock_client.create_virtual_disk.return_value = {
|
||||
'is_reboot_required': 'optional',
|
||||
'commit_required': False,
|
||||
'is_commit_required': True}
|
||||
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
@ -659,7 +658,6 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
|
||||
mock_list_physical_disks.return_value = physical_disks
|
||||
mock_client.create_virtual_disk.return_value = {
|
||||
'is_reboot_required': 'optional',
|
||||
'commit_required': False,
|
||||
'is_commit_required': True}
|
||||
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
@ -705,7 +703,6 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
|
||||
mock_commit_config.return_value = '42'
|
||||
mock_client.create_virtual_disk.return_value = {
|
||||
'is_reboot_required': 'optional',
|
||||
'commit_required': False,
|
||||
'is_commit_required': True}
|
||||
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
@ -762,7 +759,6 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
|
||||
mock_commit_config.return_value = '42'
|
||||
mock_client.create_virtual_disk.return_value = {
|
||||
'is_reboot_required': 'optional',
|
||||
'commit_required': False,
|
||||
'is_commit_required': True}
|
||||
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
@ -809,15 +805,12 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
|
||||
|
||||
mock_client.create_virtual_disk.side_effect = [{
|
||||
'is_reboot_required': 'True',
|
||||
'commit_required': True,
|
||||
'is_commit_required': True
|
||||
}, {
|
||||
'is_reboot_required': 'optional',
|
||||
'commit_required': False,
|
||||
'is_commit_required': True
|
||||
}, {
|
||||
'is_reboot_required': 'optional',
|
||||
'commit_required': False,
|
||||
'is_commit_required': True
|
||||
}]
|
||||
|
||||
@ -886,7 +879,6 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
|
||||
mock_commit_config.side_effect = ['42', '12', '13']
|
||||
mock_client.create_virtual_disk.return_value = {
|
||||
'is_reboot_required': 'optional',
|
||||
'commit_required': False,
|
||||
'is_commit_required': True
|
||||
}
|
||||
|
||||
@ -951,7 +943,6 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
|
||||
|
||||
mock_client.create_virtual_disk.return_value = {
|
||||
'is_reboot_required': 'optional',
|
||||
'commit_required': False,
|
||||
'is_commit_required': True
|
||||
}
|
||||
|
||||
@ -1017,7 +1008,6 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
|
||||
mock_commit_config.side_effect = ['42', '12', '13']
|
||||
mock_client.create_virtual_disk.return_value = {
|
||||
'is_reboot_required': 'optional',
|
||||
'commit_required': False,
|
||||
'is_commit_required': True
|
||||
}
|
||||
|
||||
@ -1111,7 +1101,6 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
|
||||
mock_commit_config.side_effect = ['42', '12']
|
||||
mock_client.create_virtual_disk.return_value = {
|
||||
'is_reboot_required': 'optional',
|
||||
'commit_required': False,
|
||||
'is_commit_required': True
|
||||
}
|
||||
|
||||
@ -1170,7 +1159,6 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
|
||||
mock_commit_config.return_value = '42'
|
||||
mock_client.create_virtual_disk.return_value = {
|
||||
'is_reboot_required': 'optional',
|
||||
'commit_required': False,
|
||||
'is_commit_required': True}
|
||||
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
@ -1212,7 +1200,6 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
|
||||
mock_commit_config.return_value = '42'
|
||||
mock_client.create_virtual_disk.return_value = {
|
||||
'is_reboot_required': 'optional',
|
||||
'commit_required': False,
|
||||
'is_commit_required': True
|
||||
}
|
||||
|
||||
@ -1282,7 +1269,6 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
|
||||
mock_commit_config.return_value = '42'
|
||||
mock_client.create_virtual_disk.return_value = {
|
||||
'is_reboot_required': 'optional',
|
||||
'commit_required': False,
|
||||
'is_commit_required': True}
|
||||
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
@ -1324,7 +1310,6 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
|
||||
mock_commit_config.return_value = '42'
|
||||
mock_create_virtual_disk.return_value = {
|
||||
'is_reboot_required': 'optional',
|
||||
'commit_required': False,
|
||||
'is_commit_required': True}
|
||||
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
@ -1368,7 +1353,6 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
|
||||
mock_commit_config.return_value = '42'
|
||||
mock_create_virtual_disk.return_value = {
|
||||
'is_reboot_required': 'optional',
|
||||
'commit_required': False,
|
||||
'is_commit_required': True}
|
||||
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
@ -1412,7 +1396,6 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
|
||||
mock_commit_config.return_value = '42'
|
||||
mock_delete_virtual_disk.return_value = {
|
||||
'is_reboot_required': 'optional',
|
||||
'commit_required': False,
|
||||
'is_commit_required': True}
|
||||
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
@ -1447,7 +1430,6 @@ class DracRaidInterfaceTestCase(test_utils.BaseDracTest):
|
||||
mock_list_virtual_disks.return_value = []
|
||||
mock_delete_virtual_disk.return_value = {
|
||||
'is_reboot_required': 'optional',
|
||||
'commit_required': False,
|
||||
'is_commit_required': True}
|
||||
|
||||
with task_manager.acquire(self.context, self.node.uuid,
|
||||
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
``commit_required`` is no longer present in the dictionary returned by
|
||||
the ``set_bios_config`` vendor passthru call in the ``idrac`` hardware
|
||||
type. ``commit_required`` was split into two keys: ``is_commit_required``
|
||||
and ``is_reboot_required``, which indicate the actions necessary to
|
||||
complete setting the BIOS settings. ``commit_required`` was removed in
|
||||
``python-dracclient`` version 3.0.0.
|
Loading…
Reference in New Issue
Block a user