diff --git a/changelogs/fragments/66060-redfish-new-resource-id-option.yaml b/changelogs/fragments/66060-redfish-new-resource-id-option.yaml new file mode 100644 index 00000000000..031b1c48483 --- /dev/null +++ b/changelogs/fragments/66060-redfish-new-resource-id-option.yaml @@ -0,0 +1,4 @@ +minor_changes: +- redfish_config, redfish_command - Add ``resource_id`` option to specify which System, Manager, or Chassis resource to modify. +deprecated_features: +- redfish_config, redfish_command - Behavior to modify the first System, Mananger, or Chassis resource when multiple are present is deprecated. Use the new ``resource_id`` option to specify target resource to modify. diff --git a/docs/docsite/rst/porting_guides/porting_guide_2.10.rst b/docs/docsite/rst/porting_guides/porting_guide_2.10.rst index c3fd35624e2..c4cf9030bd9 100644 --- a/docs/docsite/rst/porting_guides/porting_guide_2.10.rst +++ b/docs/docsite/rst/porting_guides/porting_guide_2.10.rst @@ -71,6 +71,7 @@ The following functionality will be removed in Ansible 2.14. Please update updat * :ref:`iam_policy `: the ``policy_document`` option will be removed. To maintain the existing behavior use the ``policy_json`` option and read the file with the ``lookup`` plugin. * :ref:`redfish_config `: the ``bios_attribute_name`` and ``bios_attribute_value`` options will be removed. To maintain the existing behavior use the ``bios_attributes`` option instead. * :ref:`clc_aa_policy `: the ``wait`` parameter will be removed. It has always been ignored by the module. +* :ref:`redfish_config `, :ref:`redfish_command `: the behavior to select the first System, Manager, or Chassis resource to modify when multiple are present will be removed. Use the new ``resource_id`` option to specify target resource to modify. diff --git a/lib/ansible/module_utils/redfish_utils.py b/lib/ansible/module_utils/redfish_utils.py index c931c3f3b43..efd8def2959 100644 --- a/lib/ansible/module_utils/redfish_utils.py +++ b/lib/ansible/module_utils/redfish_utils.py @@ -244,7 +244,7 @@ class RedfishUtils(object): 'msg': "System resource %s not found" % self.resource_id} elif len(self.systems_uris) > 1: self.module.deprecate(DEPRECATE_MSG % {'resource': 'System'}, - version='2.13') + version='2.14') return {'ret': True} def _find_updateservice_resource(self): @@ -295,7 +295,7 @@ class RedfishUtils(object): 'msg': "Chassis resource %s not found" % self.resource_id} elif len(self.chassis_uris) > 1: self.module.deprecate(DEPRECATE_MSG % {'resource': 'Chassis'}, - version='2.13') + version='2.14') return {'ret': True} def _find_managers_resource(self): @@ -325,7 +325,7 @@ class RedfishUtils(object): 'msg': "Manager resource %s not found" % self.resource_id} elif len(self.manager_uris) > 1: self.module.deprecate(DEPRECATE_MSG % {'resource': 'Manager'}, - version='2.13') + version='2.14') return {'ret': True} def get_logs(self):