Fix type of Targets in ShareParameters for Dell

The type for Targets in Dell OEM requests using ShareParameters
should be an array and not an string.

See the commit in the Dell Repo [1]
[1] 67657e97c2

Closes-Bug: #2111528
Change-Id: Ifeb3b6b1e137a8ba6abaca1e3f5069d6dddbec26
Signed-off-by: Iury Gregory Melo Ferreira <imelofer@redhat.com>
This commit is contained in:
Iury Gregory Melo Ferreira
2025-05-22 16:21:22 -03:00
parent 880ab20930
commit 075eac0669
3 changed files with 15 additions and 10 deletions

View File

@@ -0,0 +1,5 @@
---
fixes:
- |
Fix the Target property in the Dell OEM, it should be an array
as a value instead of a string.

View File

@@ -83,7 +83,7 @@ class DellManagerExtension(oem_base.OEMResourceBase):
ACTION_DATA = {
'ShareParameters': {
'Target': 'ALL'
'Target': ['ALL']
},
'ImportBuffer': None
}
@@ -395,7 +395,7 @@ VFDD\
action_data = {
'ShareParameters': {
'Target': target
'Target': [target]
},
'ExportFormat': "JSON",
'ExportUse': export_use,

View File

@@ -71,7 +71,7 @@ class ManagerTestCase(BaseTestCase):
self.conn.post.assert_called_once_with(
'/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager'
'.ImportSystemConfiguration',
data={'ShareParameters': {'Target': 'ALL'},
data={'ShareParameters': {'Target': ['ALL']},
'ImportBuffer':
'<SystemConfiguration><Component FQDD="iDRAC.Embedded.1">'
'<Attribute Name="ServerBoot.1#BootOnce">Enabled'
@@ -88,7 +88,7 @@ class ManagerTestCase(BaseTestCase):
self.conn.post.assert_called_once_with(
'/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager'
'.ImportSystemConfiguration',
data={'ShareParameters': {'Target': 'ALL'},
data={'ShareParameters': {'Target': ['ALL']},
'ImportBuffer':
'<SystemConfiguration><Component FQDD="iDRAC.Embedded.1">'
'<Attribute Name="ServerBoot.1#BootOnce">Enabled'
@@ -123,7 +123,7 @@ class ManagerTestCase(BaseTestCase):
self.conn.post.assert_called_with(
'/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager'
'.ImportSystemConfiguration',
data={'ShareParameters': {'Target': 'ALL'},
data={'ShareParameters': {'Target': ['ALL']},
'ImportBuffer':
'<SystemConfiguration><Component FQDD="iDRAC.Embedded.1">'
'<Attribute Name="ServerBoot.1#BootOnce">Enabled'
@@ -158,7 +158,7 @@ class ManagerTestCase(BaseTestCase):
self.conn.post.assert_called_with(
'/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager'
'.ImportSystemConfiguration',
data={'ShareParameters': {'Target': 'ALL'},
data={'ShareParameters': {'Target': ['ALL']},
'ImportBuffer':
'<SystemConfiguration><Component FQDD="iDRAC.Embedded.1">'
'<Attribute Name="ServerBoot.1#BootOnce">Enabled'
@@ -227,7 +227,7 @@ class ManagerTestCase(BaseTestCase):
self.conn.post.assert_called_once_with(
'/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager'
'.ExportSystemConfiguration', data={'ShareParameters':
{'Target': 'ALL'},
{'Target': ['ALL']},
'ExportFormat': 'JSON',
'ExportUse': 'Default',
'IncludeInExport': 'Default'})
@@ -244,7 +244,7 @@ class ManagerTestCase(BaseTestCase):
self.conn.post.assert_called_once_with(
'/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager'
'.ExportSystemConfiguration', data={'ShareParameters':
{'Target': 'RAID'},
{'Target': ['RAID']},
'ExportFormat': 'JSON',
'ExportUse': 'Clone',
'IncludeInExport':
@@ -309,7 +309,7 @@ class ManagerTestCase(BaseTestCase):
self.conn.post.assert_called_once_with(
'/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager'
'.ExportSystemConfiguration', data={'ShareParameters':
{'Target': 'RAID'},
{'Target': ['RAID']},
'ExportFormat': 'JSON',
'ExportUse': 'Clone',
'IncludeInExport':
@@ -552,7 +552,7 @@ class ManagerTestCase(BaseTestCase):
self.conn.post.assert_called_once_with(
'/redfish/v1/Managers/iDRAC.Embedded.1/Actions/Oem/EID_674_Manager'
'.ImportSystemConfiguration', data={'ShareParameters':
{'Target': 'ALL'},
{'Target': ['ALL']},
'ImportBuffer':
'{"key": "value"}',
'ShutdownType': 'NoReboot'})