diff --git a/changelogs/fragments/8956-remove-capacitybytes-from-the-required-parameters_list.yml b/changelogs/fragments/8956-remove-capacitybytes-from-the-required-parameters_list.yml new file mode 100644 index 0000000000..d6879ccb06 --- /dev/null +++ b/changelogs/fragments/8956-remove-capacitybytes-from-the-required-parameters_list.yml @@ -0,0 +1,2 @@ +minor_changes: + - redfish_confg - remove ``CapacityBytes`` from required paramaters of the ``CreateVolume`` command (https://github.com/ansible-collections/community.general/pull/8956). diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index 102d826e6d..30309ac0a9 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -3777,8 +3777,8 @@ class RedfishUtils(object): 'msg': "Provided Storage Subsystem ID %s does not exist on the server" % storage_subsystem_id} # Validate input parameters - required_parameters = ['RAIDType', 'Drives', 'CapacityBytes'] - allowed_parameters = ['DisplayName', 'InitializeMethod', 'MediaSpanCount', + required_parameters = ['RAIDType', 'Drives'] + allowed_parameters = ['CapacityBytes', 'DisplayName', 'InitializeMethod', 'MediaSpanCount', 'Name', 'ReadCachePolicy', 'StripSizeBytes', 'VolumeUsage', 'WriteCachePolicy'] for parameter in required_parameters: diff --git a/plugins/modules/redfish_config.py b/plugins/modules/redfish_config.py index 25f3cffdb4..03146558f3 100644 --- a/plugins/modules/redfish_config.py +++ b/plugins/modules/redfish_config.py @@ -164,6 +164,9 @@ options: required: false description: - Setting dict of volume to be created. + - If C(CapacityBytes) key is not specified in this dictionary, the size of + the volume will be determined by the Redfish service. It is possible the + size will not be the maximum available size. type: dict default: {} version_added: '7.5.0'