dellemc.openmanage.redfish_storage_volume – Manages the storage volume configuration
dellemc.openmanage.redfish_storage_volume – Manages the storage volume configuration
Note
This plugin is part of the dellemc.openmanage collection (version 3.0.0).
To install it use: ansible-galaxy collection install dellemc.openmanage
.
To use it in a playbook, specify: dellemc.openmanage.redfish_storage_volume
.
New in version 2.1.0: of dellemc.openmanage
Synopsis
- This module allows to create, modify, initialize, or delete a single storage volume.
Requirements
The below requirements are needed on the host that executes this module.
- python >= 2.7.5
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
baseuri string / required |
IP address of the target out-of-band controller. For example- :. | |
block_size_bytes integer |
Block size in bytes.Only applicable when state is | |
capacity_bytes string |
Volume size in bytes. Only applicable when state is | |
command string |
|
|
controller_id string |
Fully Qualified Device Descriptor (FQDD) of the storage controller. For example- RAID.Slot.1-1. This option is mandatory when state is | |
drives list / elements=string |
FQDD of the Physical disks. For example- Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1. Only applicable when state is | |
encrypted boolean |
|
Indicates whether volume is currently utilizing encryption or not. Only applicable when state is |
encryption_types string |
|
The following encryption types can be selected.
Only applicable when state is |
initialize_type string |
|
Initialization type of existing volume. Only applicable when command is |
name string |
Name of the volume to be created. Only applicable when state is | |
oem dictionary |
Includes OEM extended payloads. Only applicable when state is present. | |
optimum_io_size_bytes integer |
Stripe size value must be in multiples of 64 * 1024. Only applicable when state is | |
password string / required |
Password of the target out-of-band controller. | |
state string |
|
|
username string / required |
Username of the target out-of-band controller. | |
volume_id string |
FQDD of existing volume. For example- Disk.Virtual.4:RAID.Slot.1-1. This option is mandatory in the following scenarios, state is state is command is | |
volume_type string |
|
One of the following volume types must be selected to create a volume.
|
Notes
Note
- Run this module from a system that has direct access to Redfish APIs.
- This module does not support
check_mode
.
Examples
---
- name: Create a volume with supported options
dellemc.openmanage.redfish_storage_volume:
baseuri: "192.168.0.1"
username: "username"
password: "password"
state: "present"
volume_type: "Mirrored"
name: "VD0"
controller_id: "RAID.Slot.1-1"
drives:
- Disk.Bay.5:Enclosure.Internal.0-1:RAID.Slot.1-1
- Disk.Bay.6:Enclosure.Internal.0-1:RAID.Slot.1-1
block_size_bytes: 512
capacity_bytes: 299439751168
optimum_io_size_bytes: 65536
encryption_types: NativeDriveEncryption
encrypted: true
- name: Create a volume with minimum options
dellemc.openmanage.redfish_storage_volume:
baseuri: "192.168.0.1"
username: "username"
password: "password"
state: "present"
controller_id: "RAID.Slot.1-1"
volume_type: "NonRedundant"
drives:
- Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1
- name: Modify a volume's encryption type settings
dellemc.openmanage.redfish_storage_volume:
baseuri: "192.168.0.1"
username: "username"
password: "password"
state: "present"
volume_id: "Disk.Virtual.5:RAID.Slot.1-1"
encryption_types: "ControllerAssisted"
encrypted: true
- name: Delete an existing volume
dellemc.openmanage.redfish_storage_volume:
baseuri: "192.168.0.1"
username: "username"
password: "password"
state: "absent"
volume_id: "Disk.Virtual.5:RAID.Slot.1-1"
- name: Initialize an existing volume
dellemc.openmanage.redfish_storage_volume:
baseuri: "192.168.0.1"
username: "username"
password: "password"
command: "initialize"
volume_id: "Disk.Virtual.6:RAID.Slot.1-1"
initialize_type: "Slow"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
error_info dictionary |
on http error |
Details of a http error.
Sample: {'error': {'@Message.ExtendedInfo': [{'Message': 'Unable to perform configuration operations because a configuration job for the device already exists.', 'MessageArgs': [], '[email protected]': 0, 'MessageId': 'IDRAC.1.6.STOR023', 'RelatedProperties': [], '[email protected]': 0, 'Resolution': 'Wait for the current job for the device to complete or cancel the current job before attempting more configuration operations on the device.', 'Severity': 'Informational'}], 'code': 'Base.1.2.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information'}} |
msg string |
always |
Overall status of the storage configuration operation.
Sample: Successfully submitted create volume task. |
task dictionary |
success |
Returns ID and URI of the created task.
Sample: {'id': 'JID_XXXXXXXXXXXXX', 'uri': '/redfish/v1/TaskService/Tasks/JID_XXXXXXXXXXXXX'} |
Authors
- Sajna Shetty(@Sajna-Shetty)
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/dellemc/openmanage/redfish_storage_volume_module.html