Skip to content

Commit

Permalink
[PR #8956/b523d1b1 backport][stable-8] Remove 'CapacityBytes' from li…
Browse files Browse the repository at this point in the history
…st of required parameters (#9006)

Remove 'CapacityBytes' from list of required parameters (#8956)

* Remove 'CapacityBytes' from list of required parameters

* Add CHANGELOG fragment

* Fix sanity test failure whitespace before ']'

* Update changelogs/fragments/8956-remove-capacitybytes-from-the-required-parameters_list.yml

Co-authored-by: Alexei Znamensky <[email protected]>

* Add  description for the volume_details key CapacityBytes

* Update plugins/modules/redfish_config.py

Co-authored-by: Mike Raineri <[email protected]>

* Adjust description.

---------

Co-authored-by: Pierre-yves FONTANIERE <[email protected]>
Co-authored-by: Alexei Znamensky <[email protected]>
Co-authored-by: Mike Raineri <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit b523d1b)

Co-authored-by: Pierre-yves Fontaniere <[email protected]>
  • Loading branch information
patchback[bot] and pyfontan authored Oct 7, 2024
1 parent 5362908 commit 0ce3841
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -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).
4 changes: 2 additions & 2 deletions plugins/module_utils/redfish_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3679,8 +3679,8 @@ def create_volume(self, volume_details, storage_subsystem_id):
'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:
Expand Down
3 changes: 3 additions & 0 deletions plugins/modules/redfish_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@
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'
Expand Down

0 comments on commit 0ce3841

Please sign in to comment.