Skip to content

Commit e0b14c7

Browse files
pyfontanpatchback[bot]
authored andcommitted
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)
1 parent 5362908 commit e0b14c7

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
minor_changes:
2+
- redfish_confg - remove ``CapacityBytes`` from required paramaters of the ``CreateVolume`` command (https://github.com/ansible-collections/community.general/pull/8956).

plugins/module_utils/redfish_utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3679,8 +3679,8 @@ def create_volume(self, volume_details, storage_subsystem_id):
36793679
'msg': "Provided Storage Subsystem ID %s does not exist on the server" % storage_subsystem_id}
36803680

36813681
# Validate input parameters
3682-
required_parameters = ['RAIDType', 'Drives', 'CapacityBytes']
3683-
allowed_parameters = ['DisplayName', 'InitializeMethod', 'MediaSpanCount',
3682+
required_parameters = ['RAIDType', 'Drives']
3683+
allowed_parameters = ['CapacityBytes', 'DisplayName', 'InitializeMethod', 'MediaSpanCount',
36843684
'Name', 'ReadCachePolicy', 'StripSizeBytes', 'VolumeUsage', 'WriteCachePolicy']
36853685

36863686
for parameter in required_parameters:

plugins/modules/redfish_config.py

+3
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@
163163
required: false
164164
description:
165165
- Setting dict of volume to be created.
166+
- If C(CapacityBytes) key is not specified in this dictionary, the size of
167+
the volume will be determined by the Redfish service. It is possible the
168+
size will not be the maximum available size.
166169
type: dict
167170
default: {}
168171
version_added: '7.5.0'

0 commit comments

Comments
 (0)